Table of Contents
A low-level client representing Amazon Lightsail
Amazon Lightsail is the easiest way to get started with Amazon Web Services (AWS) for developers who need to build websites or web applications. It includes everything you need to launch your project quickly - instances (virtual private servers), container services, storage buckets, managed databases, SSD-based block storage, static IP addresses, load balancers, content delivery network (CDN) distributions, DNS management of registered domains, and resource snapshots (backups) - for a low, predictable monthly price.
You can manage your Lightsail resources using the Lightsail console, Lightsail API, AWS Command Line Interface (AWS CLI), or SDKs. For more information about Lightsail concepts and tasks, see the Amazon Lightsail Developer Guide .
This API Reference provides detailed information about the actions, data types, parameters, and errors of the Lightsail service. For more information about the supported AWS Regions, endpoints, and service quotas of the Lightsail service, see Amazon Lightsail Endpoints and Quotas in the AWS General Reference .
import boto3
client = boto3.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': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Attaches an SSL/TLS certificate to your Amazon Lightsail content delivery network (CDN) distribution.
After the certificate is attached, your distribution accepts HTTPS traffic for all of the domains that are associated with the certificate.
Use the CreateCertificate action to create a certificate that you can attach to your distribution.
Warning
Only certificates created in the us-east-1 AWS Region can be attached to Lightsail distributions. Lightsail distributions are global resources that can reference an origin in any AWS Region, and distribute its content globally. However, all distributions are located in the us-east-1 Region.
See also: AWS API Documentation
Request Syntax
response = client.attach_certificate_to_distribution(
distributionName='string',
certificateName='string'
)
[REQUIRED]
The name of the distribution that the certificate will be attached to.
Use the GetDistributions action to get a list of distribution names that you can specify.
[REQUIRED]
The name of the certificate to attach to a distribution.
Only certificates with a status of ISSUED can be attached to a distribution.
Use the GetCertificates action to get a list of certificate names that you can specify.
Note
This is the name of the certificate resource type and is used only to reference the certificate in other API actions. It can be different than the domain name of the certificate. For example, your certificate name might be WordPress-Blog-Certificate and the domain name of the certificate might be example.com .
dict
Response Syntax
{
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
(dict) --
operation (dict) --
An object that describes the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Attaches a block storage disk to a running or stopped Lightsail instance and exposes it to the instance with the specified disk name.
The attach disk operation supports tag-based access control via resource tags applied to the resource identified by disk name . For more information, see the Amazon Lightsail Developer Guide .
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': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Attaches one or more Lightsail instances to a load balancer.
After some time, the instances are attached to the load balancer and the health check status is available.
The attach instances to load balancer operation supports tag-based access control via resource tags applied to the resource identified by load balancer name . For more information, see the Lightsail Developer Guide .
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': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Attaches a Transport Layer Security (TLS) certificate to your load balancer. TLS is just an updated, more secure version of Secure Socket Layer (SSL).
Once you create and validate your certificate, you can attach it to your load balancer. You can also use this API to rotate the certificates on your account. Use the AttachLoadBalancerTlsCertificate action with the non-attached certificate, and it will replace the existing one and become the attached certificate.
The AttachLoadBalancerTlsCertificate operation supports tag-based access control via resource tags applied to the resource identified by load balancer name . For more information, see the Amazon Lightsail Developer Guide .
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': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request.
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 AWS 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.
Exceptions
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': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Check if an operation can be paginated.
Closes ports for a specific Amazon Lightsail instance.
The CloseInstancePublicPorts action supports tag-based access control via resource tags applied to the resource identified by instanceName . For more information, see the Amazon Lightsail Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.close_instance_public_ports(
portInfo={
'fromPort': 123,
'toPort': 123,
'protocol': 'tcp'|'all'|'udp'|'icmp',
'cidrs': [
'string',
],
'ipv6Cidrs': [
'string',
],
'cidrListAliases': [
'string',
]
},
instanceName='string'
)
[REQUIRED]
An object to describe the ports to close for the specified instance.
The first port in a range of open ports on an instance.
Allowed ports:
The last port in a range of open ports on an instance.
Allowed ports:
The IP protocol name.
The name can be one of the following:
The IPv4 address, or range of IPv4 addresses (in CIDR notation) that are allowed to connect to an instance through the ports, and the protocol.
Note
The ipv6Cidrs parameter lists the IPv6 addresses that are allowed to connect to an instance.
Examples:
For more information about CIDR block notation, see Classless Inter-Domain Routing on Wikipedia .
The IPv6 address, or range of IPv6 addresses (in CIDR notation) that are allowed to connect to an instance through the ports, and the protocol. Only devices with an IPv6 address can connect to an instance through IPv6; otherwise, IPv4 should be used.
Note
The cidrs parameter lists the IPv4 addresses that are allowed to connect to an instance.
For more information about CIDR block notation, see Classless Inter-Domain Routing on Wikipedia .
An alias that defines access for a preconfigured range of IP addresses.
The only alias currently supported is lightsail-connect , which allows IP addresses of the browser-based RDP/SSH client in the Lightsail console to connect to your instance.
[REQUIRED]
The name of the instance for which to close ports.
dict
Response Syntax
{
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
(dict) --
operation (dict) --
An object that describes the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Copies a manual snapshot of an instance or disk as another manual snapshot, or copies an automatic snapshot of an instance or disk as a manual snapshot. This operation can also be used to copy a manual or automatic snapshot of an instance or a disk from one AWS Region to another in Amazon Lightsail.
When copying a manual snapshot , be sure to define the source region , source snapshot name , and target snapshot name parameters.
When copying an automatic snapshot , be sure to define the source region , source resource name , target snapshot name , and either the restore date or the use latest restorable auto snapshot parameters.
See also: AWS API Documentation
Request Syntax
response = client.copy_snapshot(
sourceSnapshotName='string',
sourceResourceName='string',
restoreDate='string',
useLatestRestorableAutoSnapshot=True|False,
targetSnapshotName='string',
sourceRegion='us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
)
The name of the source manual snapshot to copy.
Constraint:
The name of the source instance or disk from which the source automatic snapshot was created.
Constraint:
The date of the source automatic snapshot to copy. Use the get auto snapshots operation to identify the dates of the available automatic snapshots.
Constraints:
A Boolean value to indicate whether to use the latest available automatic snapshot of the specified source instance or disk.
Constraints:
[REQUIRED]
The name of the new manual snapshot to be created as a copy.
[REQUIRED]
The AWS Region where the source manual or automatic snapshot is located.
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Creates an Amazon Lightsail bucket.
A bucket is a cloud storage resource available in the Lightsail object storage service. Use buckets to store objects such as data and its descriptive metadata. For more information about buckets, see Buckets in Amazon Lightsail in the Amazon Lightsail Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.create_bucket(
bucketName='string',
bundleId='string',
tags=[
{
'key': 'string',
'value': 'string'
},
],
enableObjectVersioning=True|False
)
[REQUIRED]
The name for the bucket.
For more information about bucket names, see Bucket naming rules in Amazon Lightsail in the Amazon Lightsail Developer Guide .
[REQUIRED]
The ID of the bundle to use for the bucket.
A bucket bundle specifies the monthly cost, storage space, and data transfer quota for a bucket.
Use the GetBucketBundles action to get a list of bundle IDs that you can specify.
Use the UpdateBucketBundle action to change the bundle after the bucket is created.
The tag keys and optional values to add to the bucket during creation.
Use the TagResource action to tag the bucket after it's created.
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
A Boolean value that indicates whether to enable versioning of objects in the bucket.
For more information about versioning, see Enabling and suspending object versioning in a bucket in Amazon Lightsail in the Amazon Lightsail Developer Guide .
dict
Response Syntax
{
'bucket': {
'resourceType': 'string',
'accessRules': {
'getObject': 'public'|'private',
'allowPublicOverrides': True|False
},
'arn': 'string',
'bundleId': 'string',
'createdAt': datetime(2015, 1, 1),
'url': 'string',
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'name': 'string',
'supportCode': 'string',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'objectVersioning': 'string',
'ableToUpdateBundle': True|False,
'readonlyAccessAccounts': [
'string',
],
'resourcesReceivingAccess': [
{
'name': 'string',
'resourceType': 'string'
},
],
'state': {
'code': 'string',
'message': 'string'
},
'accessLogConfig': {
'enabled': True|False,
'destination': 'string',
'prefix': 'string'
}
},
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
bucket (dict) --
An object that describes the bucket that is created.
resourceType (string) --
The Lightsail resource type of the bucket (for example, Bucket ).
accessRules (dict) --
An object that describes the access rules of the bucket.
getObject (string) --
Specifies the anonymous access to all objects in a bucket.
The following options can be specified:
allowPublicOverrides (boolean) --
A Boolean value that indicates whether the access control list (ACL) permissions that are applied to individual objects override the getObject option that is currently specified.
When this is true, you can use the PutObjectAcl Amazon S3 API action to set individual objects to public (read-only) using the public-read ACL, or to private using the private ACL.
arn (string) --
The Amazon Resource Name (ARN) of the bucket.
bundleId (string) --
The ID of the bundle currently applied to the bucket.
A bucket bundle specifies the monthly cost, storage space, and data transfer quota for a bucket.
Use the UpdateBucketBundle action to change the bundle of a bucket.
createdAt (datetime) --
The timestamp when the distribution was created.
url (string) --
The URL of the bucket.
location (dict) --
Describes the resource location.
availabilityZone (string) --
The Availability Zone. Follows the format us-east-2a (case-sensitive).
regionName (string) --
The AWS Region name.
name (string) --
The name of the bucket.
supportCode (string) --
The support code for a bucket. Include this code in your email to support when you have questions about a Lightsail bucket. This code enables our support team to look up your Lightsail information more easily.
tags (list) --
The tag keys and optional values for the bucket. For more information, see Tags in Amazon Lightsail in the Amazon Lightsail Developer Guide .
(dict) --
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
key (string) --
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
value (string) --
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
objectVersioning (string) --
Indicates whether object versioning is enabled for the bucket.
The following options can be configured:
ableToUpdateBundle (boolean) --
Indicates whether the bundle that is currently applied to a bucket can be changed to another bundle.
You can update a bucket's bundle only one time within a monthly AWS billing cycle.
Use the UpdateBucketBundle action to change a bucket's bundle.
readonlyAccessAccounts (list) --
An array of strings that specify the AWS account IDs that have read-only access to the bucket.
resourcesReceivingAccess (list) --
An array of objects that describe Lightsail instances that have access to the bucket.
Use the SetResourceAccessForBucket action to update the instances that have access to a bucket.
(dict) --
Describes an Amazon Lightsail instance that has access to a Lightsail bucket.
name (string) --
The name of the Lightsail instance.
resourceType (string) --
The Lightsail resource type (for example, Instance ).
state (dict) --
An object that describes the state of the bucket.
code (string) --
The state code of the bucket.
The following codes are possible:
message (string) --
A message that describes the state of the bucket.
accessLogConfig (dict) --
An object that describes the access log configuration for the bucket.
enabled (boolean) --
A Boolean value that indicates whether bucket access logging is enabled for the bucket.
destination (string) --
The name of the bucket where the access is saved. The destination can be a Lightsail bucket in the same account, and in the same AWS Region as the source bucket.
Note
This parameter is required when enabling the access log for a bucket, and should be omitted when disabling the access log.
prefix (string) --
The optional object prefix for the bucket access log.
The prefix is an optional addition to the object key that organizes your access log files in the destination bucket. For example, if you specify a logs/ prefix, then each log object will begin with the logs/ prefix in its key (for example, logs/2021-11-01-21-32-16-E568B2907131C0C0 ).
Note
This parameter can be optionally specified when enabling the access log for a bucket, and should be omitted when disabling the access log.
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Creates a new access key for the specified Amazon Lightsail bucket. Access keys consist of an access key ID and corresponding secret access key.
Access keys grant full programmatic access to the specified bucket and its objects. You can have a maximum of two access keys per bucket. Use the GetBucketAccessKeys action to get a list of current access keys for a specific bucket. For more information about access keys, see Creating access keys for a bucket in Amazon Lightsail in the Amazon Lightsail Developer Guide .
Warning
The secretAccessKey value is returned only in response to the CreateBucketAccessKey action. You can get a secret access key only when you first create an access key; you cannot get the secret access key later. If you lose the secret access key, you must create a new access key.
See also: AWS API Documentation
Request Syntax
response = client.create_bucket_access_key(
bucketName='string'
)
[REQUIRED]
The name of the bucket that the new access key will belong to, and grant access to.
{
'accessKey': {
'accessKeyId': 'string',
'secretAccessKey': 'string',
'status': 'Active'|'Inactive',
'createdAt': datetime(2015, 1, 1),
'lastUsed': {
'lastUsedDate': datetime(2015, 1, 1),
'region': 'string',
'serviceName': 'string'
}
},
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
An object that describes the access key that is created.
The ID of the access key.
The secret access key used to sign requests.
You should store the secret access key in a safe location. We recommend that you delete the access key if the secret access key is compromised.
The status of the access key.
A status of Active means that the key is valid, while Inactive means it is not.
The timestamp when the access key was created.
An object that describes the last time the access key was used.
Note
This object does not include data in the response of a CreateBucketAccessKey action. If the access key has not been used, the region and serviceName values are N/A , and the lastUsedDate value is null.
The date and time when the access key was most recently used.
This value is null if the access key has not been used.
The AWS Region where this access key was most recently used.
This value is N/A if the access key has not been used.
The name of the AWS service with which this access key was most recently used.
This value is N/A if the access key has not been used.
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Creates an SSL/TLS certificate for an Amazon Lightsail content delivery network (CDN) distribution and a container service.
After the certificate is valid, use the AttachCertificateToDistribution action to use the certificate and its domains with your distribution. Or use the UpdateContainerService action to use the certificate and its domains with your container service.
Warning
Only certificates created in the us-east-1 AWS Region can be attached to Lightsail distributions. Lightsail distributions are global resources that can reference an origin in any AWS Region, and distribute its content globally. However, all distributions are located in the us-east-1 Region.
See also: AWS API Documentation
Request Syntax
response = client.create_certificate(
certificateName='string',
domainName='string',
subjectAlternativeNames=[
'string',
],
tags=[
{
'key': 'string',
'value': 'string'
},
]
)
[REQUIRED]
The name for the certificate.
[REQUIRED]
The domain name (e.g., example.com ) for the certificate.
An array of strings that specify the alternate domains (e.g., example2.com ) and subdomains (e.g., blog.example.com ) for the certificate.
You can specify a maximum of nine alternate domains (in addition to the primary domain name).
Wildcard domain entries (e.g., *.example.com ) are not supported.
The tag keys and optional values to add to the certificate during create.
Use the TagResource action to tag a resource after it's created.
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
dict
Response Syntax
{
'certificate': {
'certificateArn': 'string',
'certificateName': 'string',
'domainName': 'string',
'certificateDetail': {
'arn': 'string',
'name': 'string',
'domainName': 'string',
'status': 'PENDING_VALIDATION'|'ISSUED'|'INACTIVE'|'EXPIRED'|'VALIDATION_TIMED_OUT'|'REVOKED'|'FAILED',
'serialNumber': 'string',
'subjectAlternativeNames': [
'string',
],
'domainValidationRecords': [
{
'domainName': 'string',
'resourceRecord': {
'name': 'string',
'type': 'string',
'value': 'string'
}
},
],
'requestFailureReason': 'string',
'inUseResourceCount': 123,
'keyAlgorithm': 'string',
'createdAt': datetime(2015, 1, 1),
'issuedAt': datetime(2015, 1, 1),
'issuerCA': 'string',
'notBefore': datetime(2015, 1, 1),
'notAfter': datetime(2015, 1, 1),
'eligibleToRenew': 'string',
'renewalSummary': {
'domainValidationRecords': [
{
'domainName': 'string',
'resourceRecord': {
'name': 'string',
'type': 'string',
'value': 'string'
}
},
],
'renewalStatus': 'PendingAutoRenewal'|'PendingValidation'|'Success'|'Failed',
'renewalStatusReason': 'string',
'updatedAt': datetime(2015, 1, 1)
},
'revokedAt': datetime(2015, 1, 1),
'revocationReason': 'string',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'supportCode': 'string'
},
'tags': [
{
'key': 'string',
'value': 'string'
},
]
},
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
certificate (dict) --
An object that describes the certificate created.
certificateArn (string) --
The Amazon Resource Name (ARN) of the certificate.
certificateName (string) --
The name of the certificate.
domainName (string) --
The domain name of the certificate.
certificateDetail (dict) --
An object that describes a certificate in detail.
arn (string) --
The Amazon Resource Name (ARN) of the certificate.
name (string) --
The name of the certificate (e.g., my-certificate ).
domainName (string) --
The domain name of the certificate.
status (string) --
The validation status of the certificate.
serialNumber (string) --
The serial number of the certificate.
subjectAlternativeNames (list) --
An array of strings that specify the alternate domains (e.g., example2.com ) and subdomains (e.g., blog.example.com ) of the certificate.
domainValidationRecords (list) --
An array of objects that describe the domain validation records of the certificate.
(dict) --
Describes the domain validation records of an Amazon Lightsail SSL/TLS certificate.
domainName (string) --
The domain name of the certificate validation record. For example, example.com or www.example.com .
resourceRecord (dict) --
An object that describes the DNS records to add to your domain's DNS to validate it for the certificate.
name (string) --
The name of the record.
type (string) --
The DNS record type.
value (string) --
The value for the DNS record.
requestFailureReason (string) --
The validation failure reason, if any, of the certificate.
The following failure reasons are possible:
Note
You cannot request a certificate for Amazon-owned domain names such as those ending in amazonaws.com, cloudfront.net, or elasticbeanstalk.com.
inUseResourceCount (integer) --
The number of Lightsail resources that the certificate is attached to.
keyAlgorithm (string) --
The algorithm used to generate the key pair (the public and private key) of the certificate.
createdAt (datetime) --
The timestamp when the certificate was created.
issuedAt (datetime) --
The timestamp when the certificate was issued.
issuerCA (string) --
The certificate authority that issued the certificate.
notBefore (datetime) --
The timestamp when the certificate is first valid.
notAfter (datetime) --
The timestamp when the certificate expires.
eligibleToRenew (string) --
The renewal eligibility of the certificate.
renewalSummary (dict) --
An object that describes the status of the certificate renewal managed by Lightsail.
domainValidationRecords (list) --
An array of objects that describe the domain validation records of the certificate.
(dict) --
Describes the domain validation records of an Amazon Lightsail SSL/TLS certificate.
domainName (string) --
The domain name of the certificate validation record. For example, example.com or www.example.com .
resourceRecord (dict) --
An object that describes the DNS records to add to your domain's DNS to validate it for the certificate.
name (string) --
The name of the record.
type (string) --
The DNS record type.
value (string) --
The value for the DNS record.
renewalStatus (string) --
The renewal status of the certificate.
The following renewal status are possible:
renewalStatusReason (string) --
The reason for the renewal status of the certificate.
updatedAt (datetime) --
The timestamp when the certificate was last updated.
revokedAt (datetime) --
The timestamp when the certificate was revoked. This value is present only when the certificate status is REVOKED .
revocationReason (string) --
The reason the certificate was revoked. This value is present only when the certificate status is REVOKED .
tags (list) --
The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
(dict) --
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
key (string) --
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
value (string) --
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
supportCode (string) --
The support code. Include this code in your email to support when you have questions about your Lightsail certificate. This code enables our support team to look up your Lightsail information more easily.
tags (list) --
The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
(dict) --
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
key (string) --
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
value (string) --
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Creates an AWS CloudFormation stack, which creates a new Amazon EC2 instance from an exported Amazon Lightsail snapshot. This operation results in a CloudFormation stack record that can be used to track the AWS CloudFormation stack created. Use the get cloud formation stack records operation to get a list of the CloudFormation stacks created.
Warning
Wait until after your new Amazon EC2 instance is created before running the create cloud formation stack operation again with the same export snapshot record.
See also: AWS API Documentation
Request Syntax
response = client.create_cloud_formation_stack(
instances=[
{
'sourceName': 'string',
'instanceType': 'string',
'portInfoSource': 'DEFAULT'|'INSTANCE'|'NONE'|'CLOSED',
'userData': 'string',
'availabilityZone': 'string'
},
]
)
[REQUIRED]
An array of parameters that will be used to create the new Amazon EC2 instance. You can only pass one instance entry at a time in this array. You will get an invalid parameter error if you pass more than one instance entry in this array.
Describes the Amazon Elastic Compute Cloud instance and related resources to be created using the create cloud formation stack operation.
The name of the export snapshot record, which contains the exported Lightsail instance snapshot that will be used as the source of the new Amazon EC2 instance.
Use the get export snapshot records operation to get a list of export snapshot records that you can use to create a CloudFormation stack.
The instance type (e.g., t2.micro ) to use for the new Amazon EC2 instance.
The port configuration to use for the new Amazon EC2 instance.
The following configuration options are available:
Note
If you configured lightsail-connect as a cidrListAliases on your instance, or if you chose to allow the Lightsail browser-based SSH or RDP clients to connect to your instance, that configuration is not carried over to your new Amazon EC2 instance.
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 .
The Availability Zone for the new Amazon EC2 instance.
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Creates an email or SMS text message contact method.
A contact method is used to send you notifications about your Amazon Lightsail resources. You can add one email address and one mobile phone number contact method in each AWS Region. However, SMS text messaging is not supported in some AWS Regions, and SMS text messages cannot be sent to some countries/regions. For more information, see Notifications in Amazon Lightsail .
See also: AWS API Documentation
Request Syntax
response = client.create_contact_method(
protocol='Email'|'SMS',
contactEndpoint='string'
)
[REQUIRED]
The protocol of the contact method, such as Email or SMS (text messaging).
The SMS protocol is supported only in the following AWS Regions.
For a list of countries/regions where SMS text messages can be sent, and the latest AWS Regions where SMS text messaging is supported, see Supported Regions and Countries in the Amazon SNS Developer Guide .
For more information about notifications in Amazon Lightsail, see Notifications in Amazon Lightsail .
[REQUIRED]
The destination of the contact method, such as an email address or a mobile phone number.
Use the E.164 format when specifying a mobile phone number. E.164 is a standard for the phone number structure used for international telecommunication. Phone numbers that follow this format can have a maximum of 15 digits, and they are prefixed with the plus character (+) and the country code. For example, a U.S. phone number in E.164 format would be specified as +1XXX5550100. For more information, see E.164 on Wikipedia .
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Creates an Amazon Lightsail container service.
A Lightsail container service is a compute resource to which you can deploy containers. For more information, see Container services in Amazon Lightsail in the Lightsail Dev Guide .
See also: AWS API Documentation
Request Syntax
response = client.create_container_service(
serviceName='string',
power='nano'|'micro'|'small'|'medium'|'large'|'xlarge',
scale=123,
tags=[
{
'key': 'string',
'value': 'string'
},
],
publicDomainNames={
'string': [
'string',
]
},
deployment={
'containers': {
'string': {
'image': 'string',
'command': [
'string',
],
'environment': {
'string': 'string'
},
'ports': {
'string': 'HTTP'|'HTTPS'|'TCP'|'UDP'
}
}
},
'publicEndpoint': {
'containerName': 'string',
'containerPort': 123,
'healthCheck': {
'healthyThreshold': 123,
'unhealthyThreshold': 123,
'timeoutSeconds': 123,
'intervalSeconds': 123,
'path': 'string',
'successCodes': 'string'
}
}
}
)
[REQUIRED]
The name for the container service.
The name that you specify for your container service will make up part of its default domain. The default domain of a container service is typically https://<ServiceName>.<RandomGUID>.<AWSRegion>.cs.amazonlightsail.com . If the name of your container service is container-service-1 , and it's located in the US East (Ohio) AWS region (us-east-2 ), then the domain for your container service will be like the following example: https://container-service-1.ur4EXAMPLE2uq.us-east-2.cs.amazonlightsail.com
The following are the requirements for container service names:
[REQUIRED]
The power specification for the container service.
The power specifies the amount of memory, vCPUs, and base monthly cost of each node of the container service. The power and scale of a container service makes up its configured capacity. To determine the monthly price of your container service, multiply the base price of the power with the scale (the number of nodes) of the service.
Use the GetContainerServicePowers action to get a list of power options that you can specify using this parameter, and their base monthly cost.
[REQUIRED]
The scale specification for the container service.
The scale specifies the allocated compute nodes of the container service. The power and scale of a container service makes up its configured capacity. To determine the monthly price of your container service, multiply the base price of the power with the scale (the number of nodes) of the service.
The tag keys and optional values to add to the container service during create.
Use the TagResource action to tag a resource after it's created.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The public domain names to use with the container service, such as example.com and www.example.com .
You can specify up to four public domain names for a container service. The domain names that you specify are used when you create a deployment with a container configured as the public endpoint of your container service.
If you don't specify public domain names, then you can use the default domain of the container service.
Warning
You must create and validate an SSL/TLS certificate before you can use public domain names with your container service. Use the CreateCertificate action to create a certificate for the public domain names you want to use with your container service.
You can specify public domain names using a string to array map as shown in the example later on this page.
An object that describes a deployment for the container service.
A deployment specifies the containers that will be launched on the container service and their settings, such as the ports to open, the environment variables to apply, and the launch command to run. It also specifies the container that will serve as the public endpoint of the deployment and its settings, such as the HTTP or HTTPS port to use, and the health check configuration.
An object that describes the configuration for the containers of the deployment.
Describes the settings of a container that will be launched, or that is launched, to an Amazon Lightsail container service.
The name of the image used for the container.
Container images sourced from your Lightsail container service, that are registered and stored on your service, start with a colon (: ). For example, if your container service name is container-service-1 , the container image label is mystaticsite , and you want to use the third (3 ) version of the registered container image, then you should specify :container-service-1.mystaticsite.3 . To use the latest version of a container image, specify latest instead of a version number (for example, :container-service-1.mystaticsite.latest ). Lightsail will automatically use the highest numbered version of the registered container image.
Container images sourced from a public registry like Docker Hub don't start with a colon. For example, nginx:latest or nginx .
The launch command for the container.
The environment variables of the container.
The open firewall ports of the container.
An object that describes the endpoint of the deployment.
The name of the container for the endpoint.
The port of the container to which traffic is forwarded to.
An object that describes the health check configuration of the container.
The number of consecutive health checks successes required before moving the container to the Healthy state. The default value is 2 .
The number of consecutive health check failures required before moving the container to the Unhealthy state. The default value is 2 .
The amount of time, in seconds, during which no response means a failed health check. You can specify between 2 and 60 seconds. The default value is 2 .
The approximate interval, in seconds, between health checks of an individual container. You can specify between 5 and 300 seconds. The default value is 5 .
The path on the container on which to perform the health check. The default value is / .
The HTTP codes to use when checking for a successful response from a container. You can specify values between 200 and 499 . You can specify multiple values (for example, 200,202 ) or a range of values (for example, 200-299 ).
dict
Response Syntax
{
'containerService': {
'containerServiceName': 'string',
'arn': '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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'power': 'nano'|'micro'|'small'|'medium'|'large'|'xlarge',
'powerId': 'string',
'state': 'PENDING'|'READY'|'RUNNING'|'UPDATING'|'DELETING'|'DISABLED'|'DEPLOYING',
'stateDetail': {
'code': 'CREATING_SYSTEM_RESOURCES'|'CREATING_NETWORK_INFRASTRUCTURE'|'PROVISIONING_CERTIFICATE'|'PROVISIONING_SERVICE'|'CREATING_DEPLOYMENT'|'EVALUATING_HEALTH_CHECK'|'ACTIVATING_DEPLOYMENT'|'CERTIFICATE_LIMIT_EXCEEDED'|'UNKNOWN_ERROR',
'message': 'string'
},
'scale': 123,
'currentDeployment': {
'version': 123,
'state': 'ACTIVATING'|'ACTIVE'|'INACTIVE'|'FAILED',
'containers': {
'string': {
'image': 'string',
'command': [
'string',
],
'environment': {
'string': 'string'
},
'ports': {
'string': 'HTTP'|'HTTPS'|'TCP'|'UDP'
}
}
},
'publicEndpoint': {
'containerName': 'string',
'containerPort': 123,
'healthCheck': {
'healthyThreshold': 123,
'unhealthyThreshold': 123,
'timeoutSeconds': 123,
'intervalSeconds': 123,
'path': 'string',
'successCodes': 'string'
}
},
'createdAt': datetime(2015, 1, 1)
},
'nextDeployment': {
'version': 123,
'state': 'ACTIVATING'|'ACTIVE'|'INACTIVE'|'FAILED',
'containers': {
'string': {
'image': 'string',
'command': [
'string',
],
'environment': {
'string': 'string'
},
'ports': {
'string': 'HTTP'|'HTTPS'|'TCP'|'UDP'
}
}
},
'publicEndpoint': {
'containerName': 'string',
'containerPort': 123,
'healthCheck': {
'healthyThreshold': 123,
'unhealthyThreshold': 123,
'timeoutSeconds': 123,
'intervalSeconds': 123,
'path': 'string',
'successCodes': 'string'
}
},
'createdAt': datetime(2015, 1, 1)
},
'isDisabled': True|False,
'principalArn': 'string',
'privateDomainName': 'string',
'publicDomainNames': {
'string': [
'string',
]
},
'url': 'string'
}
}
Response Structure
(dict) --
containerService (dict) --
An object that describes a container service.
containerServiceName (string) --
The name of the container service.
arn (string) --
The Amazon Resource Name (ARN) of the container service.
createdAt (datetime) --
The timestamp when the container service was created.
location (dict) --
An object that describes the location of the container service, such as the AWS Region and Availability Zone.
availabilityZone (string) --
The Availability Zone. Follows the format us-east-2a (case-sensitive).
regionName (string) --
The AWS Region name.
resourceType (string) --
The Lightsail resource type of the container service (i.e., ContainerService ).
tags (list) --
The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
(dict) --
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
key (string) --
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
value (string) --
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
power (string) --
The power specification of the container service.
The power specifies the amount of RAM, the number of vCPUs, and the base price of the container service.
powerId (string) --
The ID of the power of the container service.
state (string) --
The current state of the container service.
The following container service states are possible:
stateDetail (dict) --
An object that describes the current state of the container service.
Note
The state detail is populated only when a container service is in a PENDING , DEPLOYING , or UPDATING state.
code (string) --
The state code of the container service.
The following state codes are possible:
message (string) --
A message that provides more information for the state code.
Note
The state detail is populated only when a container service is in a PENDING , DEPLOYING , or UPDATING state.
scale (integer) --
The scale specification of the container service.
The scale specifies the allocated compute nodes of the container service.
currentDeployment (dict) --
An object that describes the current container deployment of the container service.
version (integer) --
The version number of the deployment.
state (string) --
The state of the deployment.
A deployment can be in one of the following states:
containers (dict) --
An object that describes the configuration for the containers of the deployment.
(string) --
(dict) --
Describes the settings of a container that will be launched, or that is launched, to an Amazon Lightsail container service.
image (string) --
The name of the image used for the container.
Container images sourced from your Lightsail container service, that are registered and stored on your service, start with a colon (: ). For example, if your container service name is container-service-1 , the container image label is mystaticsite , and you want to use the third (3 ) version of the registered container image, then you should specify :container-service-1.mystaticsite.3 . To use the latest version of a container image, specify latest instead of a version number (for example, :container-service-1.mystaticsite.latest ). Lightsail will automatically use the highest numbered version of the registered container image.
Container images sourced from a public registry like Docker Hub don't start with a colon. For example, nginx:latest or nginx .
command (list) --
The launch command for the container.
environment (dict) --
The environment variables of the container.
ports (dict) --
The open firewall ports of the container.
publicEndpoint (dict) --
An object that describes the endpoint of the deployment.
containerName (string) --
The name of the container entry of the deployment that the endpoint configuration applies to.
containerPort (integer) --
The port of the specified container to which traffic is forwarded to.
healthCheck (dict) --
An object that describes the health check configuration of the container.
healthyThreshold (integer) --
The number of consecutive health checks successes required before moving the container to the Healthy state. The default value is 2 .
unhealthyThreshold (integer) --
The number of consecutive health check failures required before moving the container to the Unhealthy state. The default value is 2 .
timeoutSeconds (integer) --
The amount of time, in seconds, during which no response means a failed health check. You can specify between 2 and 60 seconds. The default value is 2 .
intervalSeconds (integer) --
The approximate interval, in seconds, between health checks of an individual container. You can specify between 5 and 300 seconds. The default value is 5 .
path (string) --
The path on the container on which to perform the health check. The default value is / .
successCodes (string) --
The HTTP codes to use when checking for a successful response from a container. You can specify values between 200 and 499 . You can specify multiple values (for example, 200,202 ) or a range of values (for example, 200-299 ).
createdAt (datetime) --
The timestamp when the deployment was created.
nextDeployment (dict) --
An object that describes the next deployment of the container service.
This value is null when there is no deployment in a pending state.
version (integer) --
The version number of the deployment.
state (string) --
The state of the deployment.
A deployment can be in one of the following states:
containers (dict) --
An object that describes the configuration for the containers of the deployment.
(string) --
(dict) --
Describes the settings of a container that will be launched, or that is launched, to an Amazon Lightsail container service.
image (string) --
The name of the image used for the container.
Container images sourced from your Lightsail container service, that are registered and stored on your service, start with a colon (: ). For example, if your container service name is container-service-1 , the container image label is mystaticsite , and you want to use the third (3 ) version of the registered container image, then you should specify :container-service-1.mystaticsite.3 . To use the latest version of a container image, specify latest instead of a version number (for example, :container-service-1.mystaticsite.latest ). Lightsail will automatically use the highest numbered version of the registered container image.
Container images sourced from a public registry like Docker Hub don't start with a colon. For example, nginx:latest or nginx .
command (list) --
The launch command for the container.
environment (dict) --
The environment variables of the container.
ports (dict) --
The open firewall ports of the container.
publicEndpoint (dict) --
An object that describes the endpoint of the deployment.
containerName (string) --
The name of the container entry of the deployment that the endpoint configuration applies to.
containerPort (integer) --
The port of the specified container to which traffic is forwarded to.
healthCheck (dict) --
An object that describes the health check configuration of the container.
healthyThreshold (integer) --
The number of consecutive health checks successes required before moving the container to the Healthy state. The default value is 2 .
unhealthyThreshold (integer) --
The number of consecutive health check failures required before moving the container to the Unhealthy state. The default value is 2 .
timeoutSeconds (integer) --
The amount of time, in seconds, during which no response means a failed health check. You can specify between 2 and 60 seconds. The default value is 2 .
intervalSeconds (integer) --
The approximate interval, in seconds, between health checks of an individual container. You can specify between 5 and 300 seconds. The default value is 5 .
path (string) --
The path on the container on which to perform the health check. The default value is / .
successCodes (string) --
The HTTP codes to use when checking for a successful response from a container. You can specify values between 200 and 499 . You can specify multiple values (for example, 200,202 ) or a range of values (for example, 200-299 ).
createdAt (datetime) --
The timestamp when the deployment was created.
isDisabled (boolean) --
A Boolean value indicating whether the container service is disabled.
principalArn (string) --
The principal ARN of the container service.
The principal ARN can be used to create a trust relationship between your standard AWS account and your Lightsail container service. This allows you to give your service permission to access resources in your standard AWS account.
privateDomainName (string) --
The private domain name of the container service.
The private domain name is accessible only by other resources within the default virtual private cloud (VPC) of your Lightsail account.
publicDomainNames (dict) --
The public domain name of the container service, such as example.com and www.example.com .
You can specify up to four public domain names for a container service. The domain names that you specify are used when you create a deployment with a container configured as the public endpoint of your container service.
If you don't specify public domain names, then you can use the default domain of the container service.
Warning
You must create and validate an SSL/TLS certificate before you can use public domain names with your container service. Use the CreateCertificate action to create a certificate for the public domain names you want to use with your container service.
See CreateContainerService or UpdateContainerService for information about how to specify public domain names for your Lightsail container service.
url (string) --
The publicly accessible URL of the container service.
If no public endpoint is specified in the currentDeployment , this URL returns a 404 response.
Exceptions
Creates a deployment for your Amazon Lightsail container service.
A deployment specifies the containers that will be launched on the container service and their settings, such as the ports to open, the environment variables to apply, and the launch command to run. It also specifies the container that will serve as the public endpoint of the deployment and its settings, such as the HTTP or HTTPS port to use, and the health check configuration.
You can deploy containers to your container service using container images from a public registry like Docker Hub, or from your local machine. For more information, see Creating container images for your Amazon Lightsail container services in the Amazon Lightsail Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.create_container_service_deployment(
serviceName='string',
containers={
'string': {
'image': 'string',
'command': [
'string',
],
'environment': {
'string': 'string'
},
'ports': {
'string': 'HTTP'|'HTTPS'|'TCP'|'UDP'
}
}
},
publicEndpoint={
'containerName': 'string',
'containerPort': 123,
'healthCheck': {
'healthyThreshold': 123,
'unhealthyThreshold': 123,
'timeoutSeconds': 123,
'intervalSeconds': 123,
'path': 'string',
'successCodes': 'string'
}
}
)
[REQUIRED]
The name of the container service for which to create the deployment.
An object that describes the settings of the containers that will be launched on the container service.
Describes the settings of a container that will be launched, or that is launched, to an Amazon Lightsail container service.
The name of the image used for the container.
Container images sourced from your Lightsail container service, that are registered and stored on your service, start with a colon (: ). For example, if your container service name is container-service-1 , the container image label is mystaticsite , and you want to use the third (3 ) version of the registered container image, then you should specify :container-service-1.mystaticsite.3 . To use the latest version of a container image, specify latest instead of a version number (for example, :container-service-1.mystaticsite.latest ). Lightsail will automatically use the highest numbered version of the registered container image.
Container images sourced from a public registry like Docker Hub don't start with a colon. For example, nginx:latest or nginx .
The launch command for the container.
The environment variables of the container.
The open firewall ports of the container.
An object that describes the settings of the public endpoint for the container service.
The name of the container for the endpoint.
The port of the container to which traffic is forwarded to.
An object that describes the health check configuration of the container.
The number of consecutive health checks successes required before moving the container to the Healthy state. The default value is 2 .
The number of consecutive health check failures required before moving the container to the Unhealthy state. The default value is 2 .
The amount of time, in seconds, during which no response means a failed health check. You can specify between 2 and 60 seconds. The default value is 2 .
The approximate interval, in seconds, between health checks of an individual container. You can specify between 5 and 300 seconds. The default value is 5 .
The path on the container on which to perform the health check. The default value is / .
The HTTP codes to use when checking for a successful response from a container. You can specify values between 200 and 499 . You can specify multiple values (for example, 200,202 ) or a range of values (for example, 200-299 ).
dict
Response Syntax
{
'containerService': {
'containerServiceName': 'string',
'arn': '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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'power': 'nano'|'micro'|'small'|'medium'|'large'|'xlarge',
'powerId': 'string',
'state': 'PENDING'|'READY'|'RUNNING'|'UPDATING'|'DELETING'|'DISABLED'|'DEPLOYING',
'stateDetail': {
'code': 'CREATING_SYSTEM_RESOURCES'|'CREATING_NETWORK_INFRASTRUCTURE'|'PROVISIONING_CERTIFICATE'|'PROVISIONING_SERVICE'|'CREATING_DEPLOYMENT'|'EVALUATING_HEALTH_CHECK'|'ACTIVATING_DEPLOYMENT'|'CERTIFICATE_LIMIT_EXCEEDED'|'UNKNOWN_ERROR',
'message': 'string'
},
'scale': 123,
'currentDeployment': {
'version': 123,
'state': 'ACTIVATING'|'ACTIVE'|'INACTIVE'|'FAILED',
'containers': {
'string': {
'image': 'string',
'command': [
'string',
],
'environment': {
'string': 'string'
},
'ports': {
'string': 'HTTP'|'HTTPS'|'TCP'|'UDP'
}
}
},
'publicEndpoint': {
'containerName': 'string',
'containerPort': 123,
'healthCheck': {
'healthyThreshold': 123,
'unhealthyThreshold': 123,
'timeoutSeconds': 123,
'intervalSeconds': 123,
'path': 'string',
'successCodes': 'string'
}
},
'createdAt': datetime(2015, 1, 1)
},
'nextDeployment': {
'version': 123,
'state': 'ACTIVATING'|'ACTIVE'|'INACTIVE'|'FAILED',
'containers': {
'string': {
'image': 'string',
'command': [
'string',
],
'environment': {
'string': 'string'
},
'ports': {
'string': 'HTTP'|'HTTPS'|'TCP'|'UDP'
}
}
},
'publicEndpoint': {
'containerName': 'string',
'containerPort': 123,
'healthCheck': {
'healthyThreshold': 123,
'unhealthyThreshold': 123,
'timeoutSeconds': 123,
'intervalSeconds': 123,
'path': 'string',
'successCodes': 'string'
}
},
'createdAt': datetime(2015, 1, 1)
},
'isDisabled': True|False,
'principalArn': 'string',
'privateDomainName': 'string',
'publicDomainNames': {
'string': [
'string',
]
},
'url': 'string'
}
}
Response Structure
(dict) --
containerService (dict) --
An object that describes a container service.
containerServiceName (string) --
The name of the container service.
arn (string) --
The Amazon Resource Name (ARN) of the container service.
createdAt (datetime) --
The timestamp when the container service was created.
location (dict) --
An object that describes the location of the container service, such as the AWS Region and Availability Zone.
availabilityZone (string) --
The Availability Zone. Follows the format us-east-2a (case-sensitive).
regionName (string) --
The AWS Region name.
resourceType (string) --
The Lightsail resource type of the container service (i.e., ContainerService ).
tags (list) --
The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
(dict) --
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
key (string) --
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
value (string) --
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
power (string) --
The power specification of the container service.
The power specifies the amount of RAM, the number of vCPUs, and the base price of the container service.
powerId (string) --
The ID of the power of the container service.
state (string) --
The current state of the container service.
The following container service states are possible:
stateDetail (dict) --
An object that describes the current state of the container service.
Note
The state detail is populated only when a container service is in a PENDING , DEPLOYING , or UPDATING state.
code (string) --
The state code of the container service.
The following state codes are possible:
message (string) --
A message that provides more information for the state code.
Note
The state detail is populated only when a container service is in a PENDING , DEPLOYING , or UPDATING state.
scale (integer) --
The scale specification of the container service.
The scale specifies the allocated compute nodes of the container service.
currentDeployment (dict) --
An object that describes the current container deployment of the container service.
version (integer) --
The version number of the deployment.
state (string) --
The state of the deployment.
A deployment can be in one of the following states:
containers (dict) --
An object that describes the configuration for the containers of the deployment.
(string) --
(dict) --
Describes the settings of a container that will be launched, or that is launched, to an Amazon Lightsail container service.
image (string) --
The name of the image used for the container.
Container images sourced from your Lightsail container service, that are registered and stored on your service, start with a colon (: ). For example, if your container service name is container-service-1 , the container image label is mystaticsite , and you want to use the third (3 ) version of the registered container image, then you should specify :container-service-1.mystaticsite.3 . To use the latest version of a container image, specify latest instead of a version number (for example, :container-service-1.mystaticsite.latest ). Lightsail will automatically use the highest numbered version of the registered container image.
Container images sourced from a public registry like Docker Hub don't start with a colon. For example, nginx:latest or nginx .
command (list) --
The launch command for the container.
environment (dict) --
The environment variables of the container.
ports (dict) --
The open firewall ports of the container.
publicEndpoint (dict) --
An object that describes the endpoint of the deployment.
containerName (string) --
The name of the container entry of the deployment that the endpoint configuration applies to.
containerPort (integer) --
The port of the specified container to which traffic is forwarded to.
healthCheck (dict) --
An object that describes the health check configuration of the container.
healthyThreshold (integer) --
The number of consecutive health checks successes required before moving the container to the Healthy state. The default value is 2 .
unhealthyThreshold (integer) --
The number of consecutive health check failures required before moving the container to the Unhealthy state. The default value is 2 .
timeoutSeconds (integer) --
The amount of time, in seconds, during which no response means a failed health check. You can specify between 2 and 60 seconds. The default value is 2 .
intervalSeconds (integer) --
The approximate interval, in seconds, between health checks of an individual container. You can specify between 5 and 300 seconds. The default value is 5 .
path (string) --
The path on the container on which to perform the health check. The default value is / .
successCodes (string) --
The HTTP codes to use when checking for a successful response from a container. You can specify values between 200 and 499 . You can specify multiple values (for example, 200,202 ) or a range of values (for example, 200-299 ).
createdAt (datetime) --
The timestamp when the deployment was created.
nextDeployment (dict) --
An object that describes the next deployment of the container service.
This value is null when there is no deployment in a pending state.
version (integer) --
The version number of the deployment.
state (string) --
The state of the deployment.
A deployment can be in one of the following states:
containers (dict) --
An object that describes the configuration for the containers of the deployment.
(string) --
(dict) --
Describes the settings of a container that will be launched, or that is launched, to an Amazon Lightsail container service.
image (string) --
The name of the image used for the container.
Container images sourced from your Lightsail container service, that are registered and stored on your service, start with a colon (: ). For example, if your container service name is container-service-1 , the container image label is mystaticsite , and you want to use the third (3 ) version of the registered container image, then you should specify :container-service-1.mystaticsite.3 . To use the latest version of a container image, specify latest instead of a version number (for example, :container-service-1.mystaticsite.latest ). Lightsail will automatically use the highest numbered version of the registered container image.
Container images sourced from a public registry like Docker Hub don't start with a colon. For example, nginx:latest or nginx .
command (list) --
The launch command for the container.
environment (dict) --
The environment variables of the container.
ports (dict) --
The open firewall ports of the container.
publicEndpoint (dict) --
An object that describes the endpoint of the deployment.
containerName (string) --
The name of the container entry of the deployment that the endpoint configuration applies to.
containerPort (integer) --
The port of the specified container to which traffic is forwarded to.
healthCheck (dict) --
An object that describes the health check configuration of the container.
healthyThreshold (integer) --
The number of consecutive health checks successes required before moving the container to the Healthy state. The default value is 2 .
unhealthyThreshold (integer) --
The number of consecutive health check failures required before moving the container to the Unhealthy state. The default value is 2 .
timeoutSeconds (integer) --
The amount of time, in seconds, during which no response means a failed health check. You can specify between 2 and 60 seconds. The default value is 2 .
intervalSeconds (integer) --
The approximate interval, in seconds, between health checks of an individual container. You can specify between 5 and 300 seconds. The default value is 5 .
path (string) --
The path on the container on which to perform the health check. The default value is / .
successCodes (string) --
The HTTP codes to use when checking for a successful response from a container. You can specify values between 200 and 499 . You can specify multiple values (for example, 200,202 ) or a range of values (for example, 200-299 ).
createdAt (datetime) --
The timestamp when the deployment was created.
isDisabled (boolean) --
A Boolean value indicating whether the container service is disabled.
principalArn (string) --
The principal ARN of the container service.
The principal ARN can be used to create a trust relationship between your standard AWS account and your Lightsail container service. This allows you to give your service permission to access resources in your standard AWS account.
privateDomainName (string) --
The private domain name of the container service.
The private domain name is accessible only by other resources within the default virtual private cloud (VPC) of your Lightsail account.
publicDomainNames (dict) --
The public domain name of the container service, such as example.com and www.example.com .
You can specify up to four public domain names for a container service. The domain names that you specify are used when you create a deployment with a container configured as the public endpoint of your container service.
If you don't specify public domain names, then you can use the default domain of the container service.
Warning
You must create and validate an SSL/TLS certificate before you can use public domain names with your container service. Use the CreateCertificate action to create a certificate for the public domain names you want to use with your container service.
See CreateContainerService or UpdateContainerService for information about how to specify public domain names for your Lightsail container service.
url (string) --
The publicly accessible URL of the container service.
If no public endpoint is specified in the currentDeployment , this URL returns a 404 response.
Exceptions
Creates a temporary set of log in credentials that you can use to log in to the Docker process on your local machine. After you're logged in, you can use the native Docker commands to push your local container images to the container image registry of your Amazon Lightsail account so that you can use them with your Lightsail container service. The log in credentials expire 12 hours after they are created, at which point you will need to create a new set of log in credentials.
Note
You can only push container images to the container service registry of your Lightsail account. You cannot pull container images or perform any other container image management actions on the container service registry.
After you push your container images to the container image registry of your Lightsail account, use the RegisterContainerImage action to register the pushed images to a specific Lightsail container service.
Note
This action is not required if you install and use the Lightsail Control (lightsailctl) plugin to push container images to your Lightsail container service. For more information, see Pushing and managing container images on your Amazon Lightsail container services in the Amazon Lightsail Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.create_container_service_registry_login()
{
'registryLogin': {
'username': 'string',
'password': 'string',
'expiresAt': datetime(2015, 1, 1),
'registry': 'string'
}
}
Response Structure
An object that describes the log in information for the container service registry of your Lightsail account.
The container service registry username to use to push container images to the container image registry of a Lightsail account.
The container service registry password to use to push container images to the container image registry of a Lightsail account
The timestamp of when the container image registry username and password expire.
The log in credentials expire 12 hours after they are created, at which point you will need to create a new set of log in credentials using the CreateContainerServiceRegistryLogin action.
The address to use to push container images to the container image registry of a Lightsail account.
Exceptions
Creates a block storage disk that can be attached to an Amazon Lightsail instance in the same Availability Zone (e.g., us-east-2a ).
The create disk operation supports tag-based access control via request tags. For more information, see the Amazon Lightsail Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.create_disk(
diskName='string',
availabilityZone='string',
sizeInGb=123,
tags=[
{
'key': 'string',
'value': 'string'
},
],
addOns=[
{
'addOnType': 'AutoSnapshot',
'autoSnapshotAddOnRequest': {
'snapshotTimeOfDay': 'string'
}
},
]
)
[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 ). Use the same Availability Zone as the Lightsail instance to which you want to attach the disk.
Use the get regions operation to list the Availability Zones where Lightsail is currently available.
[REQUIRED]
The size of the disk in GB (e.g., 32 ).
The tag keys and optional values to add to the resource during create.
Use the TagResource action to tag a resource after it's created.
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
An array of objects that represent the add-ons to enable for the new disk.
Describes a request to enable, modify, or disable an add-on for an Amazon Lightsail resource.
Note
An additional cost may be associated with enabling add-ons. For more information, see the Lightsail pricing page .
The add-on type.
An object that represents additional parameters when enabling or modifying the automatic snapshot add-on.
The daily time when an automatic snapshot will be created.
Constraints:
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Creates a block storage disk from a manual or automatic snapshot of a disk. The resulting disk can be attached to an Amazon Lightsail instance in the same Availability Zone (e.g., us-east-2a ).
The create disk from snapshot operation supports tag-based access control via request tags and resource tags applied to the resource identified by disk snapshot name . For more information, see the Amazon Lightsail Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.create_disk_from_snapshot(
diskName='string',
diskSnapshotName='string',
availabilityZone='string',
sizeInGb=123,
tags=[
{
'key': 'string',
'value': 'string'
},
],
addOns=[
{
'addOnType': 'AutoSnapshot',
'autoSnapshotAddOnRequest': {
'snapshotTimeOfDay': 'string'
}
},
],
sourceDiskName='string',
restoreDate='string',
useLatestRestorableAutoSnapshot=True|False
)
[REQUIRED]
The unique Lightsail disk name (e.g., my-disk ).
The name of the disk snapshot (e.g., my-snapshot ) from which to create the new storage disk.
Constraint:
[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 ).
The tag keys and optional values to add to the resource during create.
Use the TagResource action to tag a resource after it's created.
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
An array of objects that represent the add-ons to enable for the new disk.
Describes a request to enable, modify, or disable an add-on for an Amazon Lightsail resource.
Note
An additional cost may be associated with enabling add-ons. For more information, see the Lightsail pricing page .
The add-on type.
An object that represents additional parameters when enabling or modifying the automatic snapshot add-on.
The daily time when an automatic snapshot will be created.
Constraints:
The name of the source disk from which the source automatic snapshot was created.
Constraints:
The date of the automatic snapshot to use for the new disk. Use the get auto snapshots operation to identify the dates of the available automatic snapshots.
Constraints:
A Boolean value to indicate whether to use the latest available automatic snapshot.
Constraints:
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Creates a snapshot of a block storage disk. You can use snapshots for backups, to make copies of disks, and to save data before shutting down a Lightsail instance.
You can take a snapshot of an attached disk that is in use; however, snapshots only capture data that has been written to your disk at the time the snapshot command is issued. This may exclude any data that has been cached by any applications or the operating system. If you can pause any file systems on the disk long enough to take a snapshot, your snapshot should be complete. Nevertheless, if you cannot pause all file writes to the disk, you should unmount the disk from within the Lightsail instance, issue the create disk snapshot command, and then remount the disk to ensure a consistent and complete snapshot. You may remount and use your disk while the snapshot status is pending.
You can also use this operation to create a snapshot of an instance's system volume. You might want to do this, for example, to recover data from the system volume of a botched instance or to create a backup of the system volume like you would for a block storage disk. To create a snapshot of a system volume, just define the instance name parameter when issuing the snapshot command, and a snapshot of the defined instance's system volume will be created. After the snapshot is available, you can create a block storage disk from the snapshot and attach it to a running instance to access the data on the disk.
The create disk snapshot operation supports tag-based access control via request tags. For more information, see the Amazon Lightsail Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.create_disk_snapshot(
diskName='string',
diskSnapshotName='string',
instanceName='string',
tags=[
{
'key': 'string',
'value': 'string'
},
]
)
The unique name of the source disk (e.g., Disk-Virginia-1 ).
Note
This parameter cannot be defined together with the instance name parameter. The disk name and instance name parameters are mutually exclusive.
[REQUIRED]
The name of the destination disk snapshot (e.g., my-disk-snapshot ) based on the source disk.
The unique name of the source instance (e.g., Amazon_Linux-512MB-Virginia-1 ). When this is defined, a snapshot of the instance's system volume is created.
Note
This parameter cannot be defined together with the disk name parameter. The instance name and disk name parameters are mutually exclusive.
The tag keys and optional values to add to the resource during create.
Use the TagResource action to tag a resource after it's created.
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Creates an Amazon Lightsail content delivery network (CDN) distribution.
A distribution is a globally distributed network of caching servers that improve the performance of your website or web application hosted on a Lightsail instance. For more information, see Content delivery networks in Amazon Lightsail .
See also: AWS API Documentation
Request Syntax
response = client.create_distribution(
distributionName='string',
origin={
'name': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1',
'protocolPolicy': 'http-only'|'https-only'
},
defaultCacheBehavior={
'behavior': 'dont-cache'|'cache'
},
cacheBehaviorSettings={
'defaultTTL': 123,
'minimumTTL': 123,
'maximumTTL': 123,
'allowedHTTPMethods': 'string',
'cachedHTTPMethods': 'string',
'forwardedCookies': {
'option': 'none'|'allow-list'|'all',
'cookiesAllowList': [
'string',
]
},
'forwardedHeaders': {
'option': 'none'|'allow-list'|'all',
'headersAllowList': [
'Accept'|'Accept-Charset'|'Accept-Datetime'|'Accept-Encoding'|'Accept-Language'|'Authorization'|'CloudFront-Forwarded-Proto'|'CloudFront-Is-Desktop-Viewer'|'CloudFront-Is-Mobile-Viewer'|'CloudFront-Is-SmartTV-Viewer'|'CloudFront-Is-Tablet-Viewer'|'CloudFront-Viewer-Country'|'Host'|'Origin'|'Referer',
]
},
'forwardedQueryStrings': {
'option': True|False,
'queryStringsAllowList': [
'string',
]
}
},
cacheBehaviors=[
{
'path': 'string',
'behavior': 'dont-cache'|'cache'
},
],
bundleId='string',
ipAddressType='dualstack'|'ipv4',
tags=[
{
'key': 'string',
'value': 'string'
},
]
)
[REQUIRED]
The name for the distribution.
[REQUIRED]
An object that describes the origin resource for the distribution, such as a Lightsail instance or load balancer.
The distribution pulls, caches, and serves content from the origin.
The name of the origin resource.
The AWS Region name of the origin resource.
The protocol that your Amazon Lightsail distribution uses when establishing a connection with your origin to pull content.
[REQUIRED]
An object that describes the default cache behavior for the distribution.
The cache behavior of the distribution.
The following cache behaviors can be specified:
An object that describes the cache behavior settings for the distribution.
The default amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the content has been updated.
Note
The value specified applies only when the origin does not add HTTP headers such as Cache-Control max-age , Cache-Control s-maxage , and Expires to objects.
The minimum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated.
A value of 0 must be specified for minimumTTL if the distribution is configured to forward all headers to the origin.
The maximum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated.
The value specified applies only when the origin adds HTTP headers such as Cache-Control max-age , Cache-Control s-maxage , and Expires to objects.
The HTTP methods that are processed and forwarded to the distribution's origin.
You can specify the following options:
If you specify the third option, you might need to restrict access to your distribution's origin so users can't perform operations that you don't want them to. For example, you might not want users to have permission to delete objects from your origin.
The HTTP method responses that are cached by your distribution.
You can specify the following options:
An object that describes the cookies that are forwarded to the origin. Your content is cached based on the cookies that are forwarded.
Specifies which cookies to forward to the distribution's origin for a cache behavior: all , none , or allow-list to forward only the cookies specified in the cookiesAllowList parameter.
The specific cookies to forward to your distribution's origin.
An object that describes the headers that are forwarded to the origin. Your content is cached based on the headers that are forwarded.
The headers that you want your distribution to forward to your origin and base caching on.
You can configure your distribution to do one of the following:
The specific headers to forward to your distribution's origin.
An object that describes the query strings that are forwarded to the origin. Your content is cached based on the query strings that are forwarded.
Indicates whether the distribution forwards and caches based on query strings.
The specific query strings that the distribution forwards to the origin.
Your distribution will cache content based on the specified query strings.
If the option parameter is true, then your distribution forwards all query strings, regardless of what you specify using the queryStringsAllowList parameter.
An array of objects that describe the per-path cache behavior for the distribution.
Describes the per-path cache behavior of an Amazon Lightsail content delivery network (CDN) distribution.
A per-path cache behavior is used to override, or add an exception to, the default cache behavior of a distribution. For example, if the cacheBehavior is set to cache , then a per-path cache behavior can be used to specify a directory, file, or file type that your distribution will cache. Alternately, if the distribution's cacheBehavior is dont-cache , then a per-path cache behavior can be used to specify a directory, file, or file type that your distribution will not cache.
if the cacheBehavior's behavior is set to 'cache', then
The path to a directory or file to cached, or not cache. Use an asterisk symbol to specify wildcard directories (path/to/assets/* ), and file types (*.html, *jpg, *js ). Directories and file paths are case-sensitive.
Examples:
The cache behavior for the specified path.
You can specify one of the following per-path cache behaviors:
[REQUIRED]
The bundle ID to use for the distribution.
A distribution bundle describes the specifications of your distribution, such as the monthly cost and monthly network transfer quota.
Use the GetDistributionBundles action to get a list of distribution bundle IDs that you can specify.
The IP address type for the distribution.
The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6.
The default value is dualstack .
The tag keys and optional values to add to the distribution during create.
Use the TagResource action to tag a resource after it's created.
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
dict
Response Syntax
{
'distribution': {
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'alternativeDomainNames': [
'string',
],
'status': 'string',
'isEnabled': True|False,
'domainName': 'string',
'bundleId': 'string',
'certificateName': 'string',
'origin': {
'name': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1',
'protocolPolicy': 'http-only'|'https-only'
},
'originPublicDNS': 'string',
'defaultCacheBehavior': {
'behavior': 'dont-cache'|'cache'
},
'cacheBehaviorSettings': {
'defaultTTL': 123,
'minimumTTL': 123,
'maximumTTL': 123,
'allowedHTTPMethods': 'string',
'cachedHTTPMethods': 'string',
'forwardedCookies': {
'option': 'none'|'allow-list'|'all',
'cookiesAllowList': [
'string',
]
},
'forwardedHeaders': {
'option': 'none'|'allow-list'|'all',
'headersAllowList': [
'Accept'|'Accept-Charset'|'Accept-Datetime'|'Accept-Encoding'|'Accept-Language'|'Authorization'|'CloudFront-Forwarded-Proto'|'CloudFront-Is-Desktop-Viewer'|'CloudFront-Is-Mobile-Viewer'|'CloudFront-Is-SmartTV-Viewer'|'CloudFront-Is-Tablet-Viewer'|'CloudFront-Viewer-Country'|'Host'|'Origin'|'Referer',
]
},
'forwardedQueryStrings': {
'option': True|False,
'queryStringsAllowList': [
'string',
]
}
},
'cacheBehaviors': [
{
'path': 'string',
'behavior': 'dont-cache'|'cache'
},
],
'ableToUpdateBundle': True|False,
'ipAddressType': 'dualstack'|'ipv4',
'tags': [
{
'key': 'string',
'value': 'string'
},
]
},
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
(dict) --
distribution (dict) --
An object that describes the distribution created.
name (string) --
The name of the distribution.
arn (string) --
The Amazon Resource Name (ARN) of the distribution.
supportCode (string) --
The support code. Include this code in your email to support when you have questions about your Lightsail distribution. This code enables our support team to look up your Lightsail information more easily.
createdAt (datetime) --
The timestamp when the distribution was created.
location (dict) --
An object that describes the location of the distribution, such as the AWS Region and Availability Zone.
Note
Lightsail distributions are global resources that can reference an origin in any AWS Region, and distribute its content globally. However, all distributions are located in the us-east-1 Region.
availabilityZone (string) --
The Availability Zone. Follows the format us-east-2a (case-sensitive).
regionName (string) --
The AWS Region name.
resourceType (string) --
The Lightsail resource type (e.g., Distribution ).
alternativeDomainNames (list) --
The alternate domain names of the distribution.
status (string) --
The status of the distribution.
isEnabled (boolean) --
Indicates whether the distribution is enabled.
domainName (string) --
The domain name of the distribution.
bundleId (string) --
The ID of the bundle currently applied to the distribution.
certificateName (string) --
The name of the SSL/TLS certificate attached to the distribution, if any.
origin (dict) --
An object that describes the origin resource of the distribution, such as a Lightsail instance or load balancer.
The distribution pulls, caches, and serves content from the origin.
name (string) --
The name of the origin resource.
resourceType (string) --
The resource type of the origin resource (e.g., Instance ).
regionName (string) --
The AWS Region name of the origin resource.
protocolPolicy (string) --
The protocol that your Amazon Lightsail distribution uses when establishing a connection with your origin to pull content.
originPublicDNS (string) --
The public DNS of the origin.
defaultCacheBehavior (dict) --
An object that describes the default cache behavior of the distribution.
behavior (string) --
The cache behavior of the distribution.
The following cache behaviors can be specified:
cacheBehaviorSettings (dict) --
An object that describes the cache behavior settings of the distribution.
defaultTTL (integer) --
The default amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the content has been updated.
Note
The value specified applies only when the origin does not add HTTP headers such as Cache-Control max-age , Cache-Control s-maxage , and Expires to objects.
minimumTTL (integer) --
The minimum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated.
A value of 0 must be specified for minimumTTL if the distribution is configured to forward all headers to the origin.
maximumTTL (integer) --
The maximum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated.
The value specified applies only when the origin adds HTTP headers such as Cache-Control max-age , Cache-Control s-maxage , and Expires to objects.
allowedHTTPMethods (string) --
The HTTP methods that are processed and forwarded to the distribution's origin.
You can specify the following options:
If you specify the third option, you might need to restrict access to your distribution's origin so users can't perform operations that you don't want them to. For example, you might not want users to have permission to delete objects from your origin.
cachedHTTPMethods (string) --
The HTTP method responses that are cached by your distribution.
You can specify the following options:
forwardedCookies (dict) --
An object that describes the cookies that are forwarded to the origin. Your content is cached based on the cookies that are forwarded.
option (string) --
Specifies which cookies to forward to the distribution's origin for a cache behavior: all , none , or allow-list to forward only the cookies specified in the cookiesAllowList parameter.
cookiesAllowList (list) --
The specific cookies to forward to your distribution's origin.
forwardedHeaders (dict) --
An object that describes the headers that are forwarded to the origin. Your content is cached based on the headers that are forwarded.
option (string) --
The headers that you want your distribution to forward to your origin and base caching on.
You can configure your distribution to do one of the following:
headersAllowList (list) --
The specific headers to forward to your distribution's origin.
forwardedQueryStrings (dict) --
An object that describes the query strings that are forwarded to the origin. Your content is cached based on the query strings that are forwarded.
option (boolean) --
Indicates whether the distribution forwards and caches based on query strings.
queryStringsAllowList (list) --
The specific query strings that the distribution forwards to the origin.
Your distribution will cache content based on the specified query strings.
If the option parameter is true, then your distribution forwards all query strings, regardless of what you specify using the queryStringsAllowList parameter.
cacheBehaviors (list) --
An array of objects that describe the per-path cache behavior of the distribution.
(dict) --
Describes the per-path cache behavior of an Amazon Lightsail content delivery network (CDN) distribution.
A per-path cache behavior is used to override, or add an exception to, the default cache behavior of a distribution. For example, if the cacheBehavior is set to cache , then a per-path cache behavior can be used to specify a directory, file, or file type that your distribution will cache. Alternately, if the distribution's cacheBehavior is dont-cache , then a per-path cache behavior can be used to specify a directory, file, or file type that your distribution will not cache.
if the cacheBehavior's behavior is set to 'cache', then
path (string) --
The path to a directory or file to cached, or not cache. Use an asterisk symbol to specify wildcard directories (path/to/assets/* ), and file types (*.html, *jpg, *js ). Directories and file paths are case-sensitive.
Examples:
behavior (string) --
The cache behavior for the specified path.
You can specify one of the following per-path cache behaviors:
ableToUpdateBundle (boolean) --
Indicates whether the bundle that is currently applied to your distribution, specified using the distributionName parameter, can be changed to another bundle.
Use the UpdateDistributionBundle action to change your distribution's bundle.
ipAddressType (string) --
The IP address type of the distribution.
The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6.
tags (list) --
The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
(dict) --
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
key (string) --
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
value (string) --
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
operation (dict) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Creates a domain resource for the specified domain (e.g., example.com).
The create domain operation supports tag-based access control via request tags. For more information, see the Amazon Lightsail Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.create_domain(
domainName='string',
tags=[
{
'key': 'string',
'value': '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 using Lightsail.
The tag keys and optional values to add to the resource during create.
Use the TagResource action to tag a resource after it's created.
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
dict
Response Syntax
{
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
(dict) --
operation (dict) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Creates one of the following domain name system (DNS) records in a domain DNS zone: Address (A), canonical name (CNAME), mail exchanger (MX), name server (NS), start of authority (SOA), service locator (SRV), or text (TXT).
The create domain entry operation supports tag-based access control via resource tags applied to the resource identified by domain name . For more information, see the Amazon Lightsail Developer Guide .
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 IP address (e.g., 192.0.2.0 ), or 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 . For Lightsail distributions, the value looks like exampled1182ne.cloudfront.net . For Lightsail container services, the value looks like container-service-1.example23scljs.us-west-2.cs.amazonlightsail.com . Be sure to also set isAlias to true when setting up an A record for a Lightsail load balancer, distribution, or container service.
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, such as address for IPv4 (A), address for IPv6 (AAAA), canonical name (CNAME), mail exchanger (MX), name server (NS), start of authority (SOA), service locator (SRV), or text (TXT).
The following domain entry types can be used:
(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': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
(dict) --
operation (dict) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Creates a snapshot of a specific virtual private server, or instance . You can use a snapshot to create a new instance that is based on that snapshot.
The create instance snapshot operation supports tag-based access control via request tags. For more information, see the Amazon Lightsail Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.create_instance_snapshot(
instanceSnapshotName='string',
instanceName='string',
tags=[
{
'key': 'string',
'value': 'string'
},
]
)
[REQUIRED]
The name for your new snapshot.
[REQUIRED]
The Lightsail instance on which to base your snapshot.
The tag keys and optional values to add to the resource during create.
Use the TagResource action to tag a resource after it's created.
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Creates one or more Amazon Lightsail instances.
The create instances operation supports tag-based access control via request tags. For more information, see the Lightsail Developer Guide .
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',
tags=[
{
'key': 'string',
'value': 'string'
},
],
addOns=[
{
'addOnType': 'AutoSnapshot',
'autoSnapshotAddOnRequest': {
'snapshotTimeOfDay': 'string'
}
},
],
ipAddressType='dualstack'|'ipv4'
)
[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 ).
Note
Use active blueprints when creating new instances. Inactive blueprints are listed to support customers with existing instances and are not necessarily available to create new instances. Blueprints are marked inactive when they become outdated due to operating system updates or new application releases.
[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 Amazon Lightsail Developer Guide .
The tag keys and optional values to add to the resource during create.
Use the TagResource action to tag a resource after it's created.
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
An array of objects representing the add-ons to enable for the new instance.
Describes a request to enable, modify, or disable an add-on for an Amazon Lightsail resource.
Note
An additional cost may be associated with enabling add-ons. For more information, see the Lightsail pricing page .
The add-on type.
An object that represents additional parameters when enabling or modifying the automatic snapshot add-on.
The daily time when an automatic snapshot will be created.
Constraints:
The IP address type for the instance.
The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6.
The default value is dualstack .
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Creates one or more new instances from a manual or automatic snapshot of an instance.
The create instances from snapshot operation supports tag-based access control via request tags and resource tags applied to the resource identified by instance snapshot name . For more information, see the Amazon Lightsail Developer Guide .
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',
tags=[
{
'key': 'string',
'value': 'string'
},
],
addOns=[
{
'addOnType': 'AutoSnapshot',
'autoSnapshotAddOnRequest': {
'snapshotTimeOfDay': 'string'
}
},
],
ipAddressType='dualstack'|'ipv4',
sourceInstanceName='string',
restoreDate='string',
useLatestRestorableAutoSnapshot=True|False
)
[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.
The name of the instance snapshot on which you are basing your new instances. Use the get instance snapshots operation to return information about your existing snapshots.
Constraint:
[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 Amazon Lightsail Developer Guide .
The tag keys and optional values to add to the resource during create.
Use the TagResource action to tag a resource after it's created.
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
An array of objects representing the add-ons to enable for the new instance.
Describes a request to enable, modify, or disable an add-on for an Amazon Lightsail resource.
Note
An additional cost may be associated with enabling add-ons. For more information, see the Lightsail pricing page .
The add-on type.
An object that represents additional parameters when enabling or modifying the automatic snapshot add-on.
The daily time when an automatic snapshot will be created.
Constraints:
The IP address type for the instance.
The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6.
The default value is dualstack .
The name of the source instance from which the source automatic snapshot was created.
Constraints:
The date of the automatic snapshot to use for the new instance. Use the get auto snapshots operation to identify the dates of the available automatic snapshots.
Constraints:
A Boolean value to indicate whether to use the latest available automatic snapshot.
Constraints:
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Creates an SSH key pair.
The create key pair operation supports tag-based access control via request tags. For more information, see the Amazon Lightsail Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.create_key_pair(
keyPairName='string',
tags=[
{
'key': 'string',
'value': 'string'
},
]
)
[REQUIRED]
The name for your new key pair.
The tag keys and optional values to add to the resource during create.
Use the TagResource action to tag a resource after it's created.
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
dict
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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'fingerprint': 'string'
},
'publicKeyBase64': 'string',
'privateKeyBase64': 'string',
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
(dict) --
keyPair (dict) --
An array of key-value pairs containing information about the new key pair you just created.
name (string) --
The friendly name of the SSH key pair.
arn (string) --
The Amazon Resource Name (ARN) of the key pair (e.g., arn:aws:lightsail:us-east-2:123456789101:KeyPair/05859e3d-331d-48ba-9034-12345EXAMPLE ).
supportCode (string) --
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.
createdAt (datetime) --
The timestamp when the key pair was created (e.g., 1479816991.349 ).
location (dict) --
The region name and Availability Zone where the key pair was created.
availabilityZone (string) --
The Availability Zone. Follows the format us-east-2a (case-sensitive).
regionName (string) --
The AWS Region name.
resourceType (string) --
The resource type (usually KeyPair ).
tags (list) --
The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
(dict) --
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
key (string) --
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
value (string) --
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
fingerprint (string) --
The RSA fingerprint of the key pair.
publicKeyBase64 (string) --
A base64-encoded public key of the ssh-rsa type.
privateKeyBase64 (string) --
A base64-encoded RSA private key.
operation (dict) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Creates a Lightsail load balancer. To learn more about deciding whether to load balance your application, see Configure your Lightsail instances for load balancing . You can create up to 5 load balancers per AWS Region in your account.
When you create a load balancer, you can specify a unique name and port settings. To change additional load balancer settings, use the UpdateLoadBalancerAttribute operation.
The create load balancer operation supports tag-based access control via request tags. For more information, see the Amazon Lightsail Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.create_load_balancer(
loadBalancerName='string',
instancePort=123,
healthCheckPath='string',
certificateName='string',
certificateDomainName='string',
certificateAlternativeNames=[
'string',
],
tags=[
{
'key': 'string',
'value': 'string'
},
],
ipAddressType='dualstack'|'ipv4'
)
[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 ).
The tag keys and optional values to add to the resource during create.
Use the TagResource action to tag a resource after it's created.
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The IP address type for the load balancer.
The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6.
The default value is dualstack .
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Creates an SSL/TLS certificate for an Amazon Lightsail load balancer.
TLS is just an updated, more secure version of Secure Socket Layer (SSL).
The CreateLoadBalancerTlsCertificate operation supports tag-based access control via resource tags applied to the resource identified by load balancer name . For more information, see the Amazon Lightsail Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.create_load_balancer_tls_certificate(
loadBalancerName='string',
certificateName='string',
certificateDomainName='string',
certificateAlternativeNames=[
'string',
],
tags=[
{
'key': 'string',
'value': '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 ).
The tag keys and optional values to add to the resource during create.
Use the TagResource action to tag a resource after it's created.
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Creates a new database in Amazon Lightsail.
The create relational database operation supports tag-based access control via request tags. For more information, see the Amazon Lightsail Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.create_relational_database(
relationalDatabaseName='string',
availabilityZone='string',
relationalDatabaseBlueprintId='string',
relationalDatabaseBundleId='string',
masterDatabaseName='string',
masterUsername='string',
masterUserPassword='string',
preferredBackupWindow='string',
preferredMaintenanceWindow='string',
publiclyAccessible=True|False,
tags=[
{
'key': 'string',
'value': 'string'
},
]
)
[REQUIRED]
The name to use for your new Lightsail database resource.
Constraints:
The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
You can get a list of Availability Zones by using the get regions operation. Be sure to add the include relational database Availability Zones parameter to your request.
[REQUIRED]
The blueprint ID for your new database. A blueprint describes the major engine version of a database.
You can get a list of database blueprints IDs by using the get relational database blueprints operation.
[REQUIRED]
The bundle ID for your new database. A bundle describes the performance specifications for your database.
You can get a list of database bundle IDs by using the get relational database bundles operation.
[REQUIRED]
The meaning of this parameter differs according to the database engine you use.
MySQL
The name of the database to create when the Lightsail database resource is created. If this parameter isn't specified, no database is created in the database resource.
Constraints:
PostgreSQL
The name of the database to create when the Lightsail database resource is created. If this parameter isn't specified, a database named postgres is created in the database resource.
Constraints:
[REQUIRED]
The name for the master user.
MySQL
Constraints:
PostgreSQL
Constraints:
The password for the master user. The password can include any printable ASCII character except "/", """, or "@". It cannot contain spaces.
MySQL
Constraints: Must contain from 8 to 41 characters.
PostgreSQL
Constraints: Must contain from 8 to 128 characters.
The daily time range during which automated backups are created for your new database if automated backups are enabled.
The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region. For more information about the preferred backup window time blocks for each region, see the Working With Backups guide in the Amazon Relational Database Service (Amazon RDS) documentation.
Constraints:
The weekly time range during which system maintenance can occur on your new database.
The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region, occurring on a random day of the week.
Constraints:
The tag keys and optional values to add to the resource during create.
Use the TagResource action to tag a resource after it's created.
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Creates a new database from an existing database snapshot in Amazon Lightsail.
You can create a new database from a snapshot in if something goes wrong with your original database, or to change it to a different plan, such as a high availability or standard plan.
The create relational database from snapshot operation supports tag-based access control via request tags and resource tags applied to the resource identified by relationalDatabaseSnapshotName. For more information, see the Amazon Lightsail Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.create_relational_database_from_snapshot(
relationalDatabaseName='string',
availabilityZone='string',
publiclyAccessible=True|False,
relationalDatabaseSnapshotName='string',
relationalDatabaseBundleId='string',
sourceRelationalDatabaseName='string',
restoreTime=datetime(2015, 1, 1),
useLatestRestorableTime=True|False,
tags=[
{
'key': 'string',
'value': 'string'
},
]
)
[REQUIRED]
The name to use for your new Lightsail database resource.
Constraints:
The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
You can get a list of Availability Zones by using the get regions operation. Be sure to add the include relational database Availability Zones parameter to your request.
The bundle ID for your new database. A bundle describes the performance specifications for your database.
You can get a list of database bundle IDs by using the get relational database bundles operation.
When creating a new database from a snapshot, you cannot choose a bundle that is smaller than the bundle of the source database.
The date and time to restore your database from.
Constraints:
Specifies whether your database is restored from the latest backup time. A value of true restores from the latest backup time.
Default: false
Constraints: Cannot be specified if the restore time parameter is provided.
The tag keys and optional values to add to the resource during create.
Use the TagResource action to tag a resource after it's created.
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Creates a snapshot of your database in Amazon Lightsail. You can use snapshots for backups, to make copies of a database, and to save data before deleting a database.
The create relational database snapshot operation supports tag-based access control via request tags. For more information, see the Amazon Lightsail Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.create_relational_database_snapshot(
relationalDatabaseName='string',
relationalDatabaseSnapshotName='string',
tags=[
{
'key': 'string',
'value': 'string'
},
]
)
[REQUIRED]
The name of the database on which to base your new snapshot.
[REQUIRED]
The name for your new database snapshot.
Constraints:
The tag keys and optional values to add to the resource during create.
Use the TagResource action to tag a resource after it's created.
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Deletes an alarm.
An alarm is used to monitor a single metric for one of your resources. When a metric condition is met, the alarm can notify you by email, SMS text message, and a banner displayed on the Amazon Lightsail console. For more information, see Alarms in Amazon Lightsail .
See also: AWS API Documentation
Request Syntax
response = client.delete_alarm(
alarmName='string'
)
[REQUIRED]
The name of the alarm to delete.
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Deletes an automatic snapshot of an instance or disk. For more information, see the Amazon Lightsail Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.delete_auto_snapshot(
resourceName='string',
date='string'
)
[REQUIRED]
The name of the source instance or disk from which to delete the automatic snapshot.
[REQUIRED]
The date of the automatic snapshot to delete in YYYY-MM-DD format. Use the get auto snapshots operation to get the available automatic snapshots for a resource.
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Deletes a Amazon Lightsail bucket.
Note
When you delete your bucket, the bucket name is released and can be reused for a new bucket in your account or another AWS account.
See also: AWS API Documentation
Request Syntax
response = client.delete_bucket(
bucketName='string',
forceDelete=True|False
)
[REQUIRED]
The name of the bucket to delete.
Use the GetBuckets action to get a list of bucket names that you can specify.
A Boolean value that indicates whether to force delete the bucket.
You must force delete the bucket if it has one of the following conditions:
Warning
Force deleting a bucket might impact other resources that rely on the bucket, such as instances, distributions, or software that use the issued access keys.
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Deletes an access key for the specified Amazon Lightsail bucket.
We recommend that you delete an access key if the secret access key is compromised.
For more information about access keys, see Creating access keys for a bucket in Amazon Lightsail in the Amazon Lightsail Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.delete_bucket_access_key(
bucketName='string',
accessKeyId='string'
)
[REQUIRED]
The name of the bucket that the access key belongs to.
[REQUIRED]
The ID of the access key to delete.
Use the GetBucketAccessKeys action to get a list of access key IDs that you can specify.
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Deletes an SSL/TLS certificate for your Amazon Lightsail content delivery network (CDN) distribution.
Certificates that are currently attached to a distribution cannot be deleted. Use the DetachCertificateFromDistribution action to detach a certificate from a distribution.
See also: AWS API Documentation
Request Syntax
response = client.delete_certificate(
certificateName='string'
)
[REQUIRED]
The name of the certificate to delete.
Use the GetCertificates action to get a list of certificate names that you can specify.
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Deletes a contact method.
A contact method is used to send you notifications about your Amazon Lightsail resources. You can add one email address and one mobile phone number contact method in each AWS Region. However, SMS text messaging is not supported in some AWS Regions, and SMS text messages cannot be sent to some countries/regions. For more information, see Notifications in Amazon Lightsail .
See also: AWS API Documentation
Request Syntax
response = client.delete_contact_method(
protocol='Email'|'SMS'
)
[REQUIRED]
The protocol that will be deleted, such as Email or SMS (text messaging).
Note
To delete an Email and an SMS contact method if you added both, you must run separate DeleteContactMethod actions to delete each protocol.
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Deletes a container image that is registered to your Amazon Lightsail container service.
See also: AWS API Documentation
Request Syntax
response = client.delete_container_image(
serviceName='string',
image='string'
)
[REQUIRED]
The name of the container service for which to delete a registered container image.
[REQUIRED]
The name of the container image to delete from the container service.
Use the GetContainerImages action to get the name of the container images that are registered to a container service.
Note
Container images sourced from your Lightsail container service, that are registered and stored on your service, start with a colon (: ). For example, :container-service-1.mystaticwebsite.1 . Container images sourced from a public registry like Docker Hub don't start with a colon. For example, nginx:latest or nginx .
dict
Response Syntax
{}
Response Structure
Exceptions
Deletes your Amazon Lightsail container service.
See also: AWS API Documentation
Request Syntax
response = client.delete_container_service(
serviceName='string'
)
[REQUIRED]
The name of the container service to delete.
{}
Response Structure
Exceptions
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.
The delete disk operation supports tag-based access control via resource tags applied to the resource identified by disk name . For more information, see the Amazon Lightsail Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.delete_disk(
diskName='string',
forceDeleteAddOns=True|False
)
[REQUIRED]
The unique name of the disk you want to delete (e.g., my-disk ).
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Deletes the specified disk snapshot.
When you make periodic snapshots of a disk, the snapshots are incremental, and only the blocks on the device that have changed since your last snapshot are saved in the new snapshot. When you delete a snapshot, only the data not needed for any other snapshot is removed. So regardless of which prior snapshots have been deleted, all active snapshots will have access to all the information needed to restore the disk.
The delete disk snapshot operation supports tag-based access control via resource tags applied to the resource identified by disk snapshot name . For more information, see the Amazon Lightsail Developer Guide .
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': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Deletes your Amazon Lightsail content delivery network (CDN) distribution.
See also: AWS API Documentation
Request Syntax
response = client.delete_distribution(
distributionName='string'
)
The name of the distribution to delete.
Use the GetDistributions action to get a list of distribution names that you can specify.
{
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
An object that describes the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request.
The ID of the operation.
The resource name.
The resource type.
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
The AWS 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.
Exceptions
Deletes the specified domain recordset and all of its domain records.
The delete domain operation supports tag-based access control via resource tags applied to the resource identified by domain name . For more information, see the Amazon Lightsail Developer Guide .
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': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request.
The ID of the operation.
The resource name.
The resource type.
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
The AWS 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.
Exceptions
Deletes a specific domain entry.
The delete domain entry operation supports tag-based access control via resource tags applied to the resource identified by domain name . For more information, see the Amazon Lightsail Developer Guide .
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 IP address (e.g., 192.0.2.0 ), or 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 . For Lightsail distributions, the value looks like exampled1182ne.cloudfront.net . For Lightsail container services, the value looks like container-service-1.example23scljs.us-west-2.cs.amazonlightsail.com . Be sure to also set isAlias to true when setting up an A record for a Lightsail load balancer, distribution, or container service.
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, such as address for IPv4 (A), address for IPv6 (AAAA), canonical name (CNAME), mail exchanger (MX), name server (NS), start of authority (SOA), service locator (SRV), or text (TXT).
The following domain entry types can be used:
(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': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
(dict) --
operation (dict) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Deletes an Amazon Lightsail instance.
The delete instance operation supports tag-based access control via resource tags applied to the resource identified by instance name . For more information, see the Amazon Lightsail Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.delete_instance(
instanceName='string',
forceDeleteAddOns=True|False
)
[REQUIRED]
The name of the instance to delete.
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Deletes a specific snapshot of a virtual private server (or instance ).
The delete instance snapshot operation supports tag-based access control via resource tags applied to the resource identified by instance snapshot name . For more information, see the Amazon Lightsail Developer Guide .
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': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Deletes a specific SSH key pair.
The delete key pair operation supports tag-based access control via resource tags applied to the resource identified by key pair name . For more information, see the Amazon Lightsail Developer Guide .
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': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request.
The ID of the operation.
The resource name.
The resource type.
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
The AWS 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.
Exceptions
Deletes the known host key or certificate used by the Amazon Lightsail browser-based SSH or RDP clients to authenticate an instance. This operation enables the Lightsail browser-based SSH or RDP clients to connect to the instance after a host key mismatch.
Warning
Perform this operation only if you were expecting the host key or certificate mismatch or if you are familiar with the new host key or certificate on the instance. For more information, see Troubleshooting connection issues when using the Amazon Lightsail browser-based SSH or RDP client .
See also: AWS API Documentation
Request Syntax
response = client.delete_known_host_keys(
instanceName='string'
)
[REQUIRED]
The name of the instance for which you want to reset the host key or certificate.
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Deletes a Lightsail load balancer and all its associated SSL/TLS certificates. Once the load balancer is deleted, you will need to create a new load balancer, create a new certificate, and verify domain ownership again.
The delete load balancer operation supports tag-based access control via resource tags applied to the resource identified by load balancer name . For more information, see the Amazon Lightsail Developer Guide .
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': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Deletes an SSL/TLS certificate associated with a Lightsail load balancer.
The DeleteLoadBalancerTlsCertificate operation supports tag-based access control via resource tags applied to the resource identified by load balancer name . For more information, see the Amazon Lightsail Developer Guide .
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': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Deletes a database in Amazon Lightsail.
The delete relational database operation supports tag-based access control via resource tags applied to the resource identified by relationalDatabaseName. For more information, see the Amazon Lightsail Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.delete_relational_database(
relationalDatabaseName='string',
skipFinalSnapshot=True|False,
finalRelationalDatabaseSnapshotName='string'
)
[REQUIRED]
The name of the database that you are deleting.
Determines whether a final database snapshot is created before your database is deleted. If true is specified, no database snapshot is created. If false is specified, a database snapshot is created before your database is deleted.
You must specify the final relational database snapshot name parameter if the skip final snapshot parameter is false .
Default: false
The name of the database snapshot created if skip final snapshot is false , which is the default value for that parameter.
Note
Specifying this parameter and also specifying the skip final snapshot parameter to true results in an error.
Constraints:
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Deletes a database snapshot in Amazon Lightsail.
The delete relational database snapshot operation supports tag-based access control via resource tags applied to the resource identified by relationalDatabaseName. For more information, see the Amazon Lightsail Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.delete_relational_database_snapshot(
relationalDatabaseSnapshotName='string'
)
[REQUIRED]
The name of the database snapshot that you are deleting.
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Detaches an SSL/TLS certificate from your Amazon Lightsail content delivery network (CDN) distribution.
After the certificate is detached, your distribution stops accepting traffic for all of the domains that are associated with the certificate.
See also: AWS API Documentation
Request Syntax
response = client.detach_certificate_from_distribution(
distributionName='string'
)
[REQUIRED]
The name of the distribution from which to detach the certificate.
Use the GetDistributions action to get a list of distribution names that you can specify.
{
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
An object that describes the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request.
The ID of the operation.
The resource name.
The resource type.
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
The AWS 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.
Exceptions
Detaches a stopped block storage disk from a Lightsail instance. Make sure to unmount any file systems on the device within your operating system before stopping the instance and detaching the disk.
The detach disk operation supports tag-based access control via resource tags applied to the resource identified by disk name . For more information, see the Amazon Lightsail Developer Guide .
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': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Detaches the specified instances from a Lightsail load balancer.
This operation waits until the instances are no longer needed before they are detached from the load balancer.
The detach instances from load balancer operation supports tag-based access control via resource tags applied to the resource identified by load balancer name . For more information, see the Amazon Lightsail Developer Guide .
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': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
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': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Disables an add-on for an Amazon Lightsail resource. For more information, see the Amazon Lightsail Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.disable_add_on(
addOnType='AutoSnapshot',
resourceName='string'
)
[REQUIRED]
The add-on type to disable.
[REQUIRED]
The name of the source resource for which to disable the add-on.
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
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.
Exceptions
Enables or modifies an add-on for an Amazon Lightsail resource. For more information, see the Amazon Lightsail Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.enable_add_on(
resourceName='string',
addOnRequest={
'addOnType': 'AutoSnapshot',
'autoSnapshotAddOnRequest': {
'snapshotTimeOfDay': 'string'
}
}
)
[REQUIRED]
The name of the source resource for which to enable or modify the add-on.
[REQUIRED]
An array of strings representing the add-on to enable or modify.
The add-on type.
An object that represents additional parameters when enabling or modifying the automatic snapshot add-on.
The daily time when an automatic snapshot will be created.
Constraints:
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Exports an Amazon Lightsail instance or block storage disk snapshot to Amazon Elastic Compute Cloud (Amazon EC2). This operation results in an export snapshot record that can be used with the create cloud formation stack operation to create new Amazon EC2 instances.
Exported instance snapshots appear in Amazon EC2 as Amazon Machine Images (AMIs), and the instance system disk appears as an Amazon Elastic Block Store (Amazon EBS) volume. Exported disk snapshots appear in Amazon EC2 as Amazon EBS volumes. Snapshots are exported to the same Amazon Web Services Region in Amazon EC2 as the source Lightsail snapshot.
The export snapshot operation supports tag-based access control via resource tags applied to the resource identified by source snapshot name . For more information, see the Amazon Lightsail Developer Guide .
Note
Use the get instance snapshots or get disk snapshots operations to get a list of snapshots that you can export to Amazon EC2.
See also: AWS API Documentation
Request Syntax
response = client.export_snapshot(
sourceSnapshotName='string'
)
[REQUIRED]
The name of the instance or disk snapshot to be exported to Amazon EC2.
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Returns the names of all active (not deleted) resources.
See also: AWS API Documentation
Request Syntax
response = client.get_active_names(
pageToken='string'
)
The token to advance to the next page of results from your request.
To get a page token, perform an initial GetActiveNames request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.
{
'activeNames': [
'string',
],
'nextPageToken': 'string'
}
Response Structure
The list of active names returned by the get active names request.
The token to advance to the next page of results from your request.
A next page token is not returned if there are no more results to display.
To get the next page of results, perform another GetActiveNames request and specify the next page token using the pageToken parameter.
Exceptions
Returns information about the configured alarms. Specify an alarm name in your request to return information about a specific alarm, or specify a monitored resource name to return information about all alarms for a specific resource.
An alarm is used to monitor a single metric for one of your resources. When a metric condition is met, the alarm can notify you by email, SMS text message, and a banner displayed on the Amazon Lightsail console. For more information, see Alarms in Amazon Lightsail .
See also: AWS API Documentation
Request Syntax
response = client.get_alarms(
alarmName='string',
pageToken='string',
monitoredResourceName='string'
)
The name of the alarm.
Specify an alarm name to return information about a specific alarm.
The token to advance to the next page of results from your request.
To get a page token, perform an initial GetAlarms request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.
The name of the Lightsail resource being monitored by the alarm.
Specify a monitored resource name to return information about all alarms for a specific resource.
dict
Response Syntax
{
'alarms': [
{
'name': 'string',
'arn': '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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'supportCode': 'string',
'monitoredResourceInfo': {
'arn': 'string',
'name': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket'
},
'comparisonOperator': 'GreaterThanOrEqualToThreshold'|'GreaterThanThreshold'|'LessThanThreshold'|'LessThanOrEqualToThreshold',
'evaluationPeriods': 123,
'period': 123,
'threshold': 123.0,
'datapointsToAlarm': 123,
'treatMissingData': 'breaching'|'notBreaching'|'ignore'|'missing',
'statistic': 'Minimum'|'Maximum'|'Sum'|'Average'|'SampleCount',
'metricName': 'CPUUtilization'|'NetworkIn'|'NetworkOut'|'StatusCheckFailed'|'StatusCheckFailed_Instance'|'StatusCheckFailed_System'|'ClientTLSNegotiationErrorCount'|'HealthyHostCount'|'UnhealthyHostCount'|'HTTPCode_LB_4XX_Count'|'HTTPCode_LB_5XX_Count'|'HTTPCode_Instance_2XX_Count'|'HTTPCode_Instance_3XX_Count'|'HTTPCode_Instance_4XX_Count'|'HTTPCode_Instance_5XX_Count'|'InstanceResponseTime'|'RejectedConnectionCount'|'RequestCount'|'DatabaseConnections'|'DiskQueueDepth'|'FreeStorageSpace'|'NetworkReceiveThroughput'|'NetworkTransmitThroughput'|'BurstCapacityTime'|'BurstCapacityPercentage',
'state': 'OK'|'ALARM'|'INSUFFICIENT_DATA',
'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',
'contactProtocols': [
'Email'|'SMS',
],
'notificationTriggers': [
'OK'|'ALARM'|'INSUFFICIENT_DATA',
],
'notificationEnabled': True|False
},
],
'nextPageToken': 'string'
}
Response Structure
(dict) --
alarms (list) --
An array of objects that describe the alarms.
(dict) --
Describes an alarm.
An alarm is a way to monitor your Lightsail resource metrics. For more information, see Alarms in Amazon Lightsail .
name (string) --
The name of the alarm.
arn (string) --
The Amazon Resource Name (ARN) of the alarm.
createdAt (datetime) --
The timestamp when the alarm was created.
location (dict) --
An object that lists information about the location of the alarm.
availabilityZone (string) --
The Availability Zone. Follows the format us-east-2a (case-sensitive).
regionName (string) --
The AWS Region name.
resourceType (string) --
The Lightsail resource type (e.g., Alarm ).
supportCode (string) --
The support code. Include this code in your email to support when you have questions about your Lightsail alarm. This code enables our support team to look up your Lightsail information more easily.
monitoredResourceInfo (dict) --
An object that lists information about the resource monitored by the alarm.
arn (string) --
The Amazon Resource Name (ARN) of the resource being monitored.
name (string) --
The name of the Lightsail resource being monitored.
resourceType (string) --
The Lightsail resource type of the resource being monitored.
Instances, load balancers, and relational databases are the only Lightsail resources that can currently be monitored by alarms.
comparisonOperator (string) --
The arithmetic operation used when comparing the specified statistic and threshold.
evaluationPeriods (integer) --
The number of periods over which data is compared to the specified threshold.
period (integer) --
The period, in seconds, over which the statistic is applied.
threshold (float) --
The value against which the specified statistic is compared.
datapointsToAlarm (integer) --
The number of data points that must not within the specified threshold to trigger the alarm.
treatMissingData (string) --
Specifies how the alarm handles missing data points.
An alarm can treat missing data in the following ways:
statistic (string) --
The statistic for the metric associated with the alarm.
The following statistics are available:
metricName (string) --
The name of the metric associated with the alarm.
state (string) --
The current state of the alarm.
An alarm has the following possible states:
unit (string) --
The unit of the metric associated with the alarm.
contactProtocols (list) --
The contact protocols for the alarm, such as Email , SMS (text messaging), or both.
notificationTriggers (list) --
The alarm states that trigger a notification.
notificationEnabled (boolean) --
Indicates whether the alarm is enabled.
nextPageToken (string) --
The token to advance to the next page of results from your request.
A next page token is not returned if there are no more results to display.
To get the next page of results, perform another GetAlarms request and specify the next page token using the pageToken parameter.
Exceptions
Returns the available automatic snapshots for an instance or disk. For more information, see the Amazon Lightsail Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.get_auto_snapshots(
resourceName='string'
)
[REQUIRED]
The name of the source instance or disk from which to get automatic snapshot information.
{
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'autoSnapshots': [
{
'date': 'string',
'createdAt': datetime(2015, 1, 1),
'status': 'Success'|'Failed'|'InProgress'|'NotFound',
'fromAttachedDisks': [
{
'path': 'string',
'sizeInGb': 123
},
]
},
]
}
Response Structure
The name of the source instance or disk for the automatic snapshots.
The resource type (e.g., Instance or Disk ).
An array of objects that describe the automatic snapshots that are available for the specified source instance or disk.
Describes an automatic snapshot.
The date of the automatic snapshot in YYYY-MM-DD format.
The timestamp when the automatic snapshot was created.
The status of the automatic snapshot.
An array of objects that describe the block storage disks attached to the instance when the automatic snapshot was created.
Describes a block storage disk that is attached to an instance, and is included in an automatic snapshot.
The path of the disk (e.g., /dev/xvdf ).
The size of the disk in GB.
Exceptions
Returns the list of available instance images, or blueprints . You can use a blueprint to create a new instance already running a specific operating system, as well as a preinstalled app or development stack. The software each instance is running depends on the blueprint image you choose.
Note
Use active blueprints when creating new instances. Inactive blueprints are listed to support customers with existing instances and are not necessarily available to create new instances. Blueprints are marked inactive when they become outdated due to operating system updates or new application releases.
See also: AWS API Documentation
Request Syntax
response = client.get_blueprints(
includeInactive=True|False,
pageToken='string'
)
The token to advance to the next page of results from your request.
To get a page token, perform an initial GetBlueprints request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.
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. Inactive blueprints are listed to support customers with existing instances but are not necessarily available for launch of new instances. Blueprints are marked inactive when they become outdated due to operating system updates or new application releases.
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) --
The token to advance to the next page of results from your request.
A next page token is not returned if there are no more results to display.
To get the next page of results, perform another GetBlueprints request and specify the next page token using the pageToken parameter.
Exceptions
Returns the existing access key IDs for the specified Amazon Lightsail bucket.
Warning
This action does not return the secret access key value of an access key. You can get a secret access key only when you create it from the response of the CreateBucketAccessKey action. If you lose the secret access key, you must create a new access key.
See also: AWS API Documentation
Request Syntax
response = client.get_bucket_access_keys(
bucketName='string'
)
[REQUIRED]
The name of the bucket for which to return access keys.
{
'accessKeys': [
{
'accessKeyId': 'string',
'secretAccessKey': 'string',
'status': 'Active'|'Inactive',
'createdAt': datetime(2015, 1, 1),
'lastUsed': {
'lastUsedDate': datetime(2015, 1, 1),
'region': 'string',
'serviceName': 'string'
}
},
]
}
Response Structure
An object that describes the access keys for the specified bucket.
Describes an access key for an Amazon Lightsail bucket.
Access keys grant full programmatic access to the specified bucket and its objects. You can have a maximum of two access keys per bucket. Use the CreateBucketAccessKey action to create an access key for a specific bucket. For more information about access keys, see Creating access keys for a bucket in Amazon Lightsail in the Amazon Lightsail Developer Guide .
Warning
The secretAccessKey value is returned only in response to the CreateBucketAccessKey action. You can get a secret access key only when you first create an access key; you cannot get the secret access key later. If you lose the secret access key, you must create a new access key.
The ID of the access key.
The secret access key used to sign requests.
You should store the secret access key in a safe location. We recommend that you delete the access key if the secret access key is compromised.
The status of the access key.
A status of Active means that the key is valid, while Inactive means it is not.
The timestamp when the access key was created.
An object that describes the last time the access key was used.
Note
This object does not include data in the response of a CreateBucketAccessKey action. If the access key has not been used, the region and serviceName values are N/A , and the lastUsedDate value is null.
The date and time when the access key was most recently used.
This value is null if the access key has not been used.
The AWS Region where this access key was most recently used.
This value is N/A if the access key has not been used.
The name of the AWS service with which this access key was most recently used.
This value is N/A if the access key has not been used.
Exceptions
Returns the bundles that you can apply to a Amazon Lightsail bucket.
The bucket bundle specifies the monthly cost, storage quota, and data transfer quota for a bucket.
Use the UpdateBucketBundle action to update the bundle for a bucket.
See also: AWS API Documentation
Request Syntax
response = client.get_bucket_bundles(
includeInactive=True|False
)
{
'bundles': [
{
'bundleId': 'string',
'name': 'string',
'price': ...,
'storagePerMonthInGb': 123,
'transferPerMonthInGb': 123,
'isActive': True|False
},
]
}
Response Structure
An object that describes bucket bundles.
Describes the specifications of a bundle that can be applied to an Amazon Lightsail bucket.
A bucket bundle specifies the monthly cost, storage space, and data transfer quota for a bucket.
The ID of the bundle.
The name of the bundle.
The monthly price of the bundle, in US dollars.
The storage size of the bundle, in GB.
The monthly network transfer quota of the bundle.
Indicates whether the bundle is active. Use for a new or existing bucket.
Exceptions
Returns the data points of a specific metric for an Amazon Lightsail bucket.
Metrics report the utilization of a bucket. View and collect metric data regularly to monitor the number of objects stored in a bucket (including object versions) and the storage space used by those objects.
See also: AWS API Documentation
Request Syntax
response = client.get_bucket_metric_data(
bucketName='string',
metricName='BucketSizeBytes'|'NumberOfObjects',
startTime=datetime(2015, 1, 1),
endTime=datetime(2015, 1, 1),
period=123,
statistics=[
'Minimum'|'Maximum'|'Sum'|'Average'|'SampleCount',
],
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'
)
[REQUIRED]
The name of the bucket for which to get metric data.
[REQUIRED]
The metric for which you want to return information.
Valid bucket metric names are listed below, along with the most useful statistics to include in your request, and the published unit value.
Note
These bucket metrics are reported once per day.
[REQUIRED]
The timestamp indicating the earliest data to be returned.
[REQUIRED]
The timestamp indicating the latest data to be returned.
[REQUIRED]
The granularity, in seconds, of the returned data points.
Note
Bucket storage metrics are reported once per day. Therefore, you should specify a period of 86400 seconds, which is the number of seconds in a day.
[REQUIRED]
The statistic for the metric.
The following statistics are available:
[REQUIRED]
The unit for the metric data request.
Valid units depend on the metric data being requested. For the valid units with each available metric, see the metricName parameter.
dict
Response Syntax
{
'metricName': 'BucketSizeBytes'|'NumberOfObjects',
'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 name of the metric returned.
metricData (list) --
An array of objects that describe the metric data returned.
(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.
Exceptions
Returns information about one or more Amazon Lightsail buckets.
For more information about buckets, see Buckets in Amazon Lightsail in the Amazon Lightsail Developer Guide ..
See also: AWS API Documentation
Request Syntax
response = client.get_buckets(
bucketName='string',
pageToken='string',
includeConnectedResources=True|False
)
The name of the bucket for which to return information.
When omitted, the response includes all of your buckets in the AWS Region where the request is made.
The token to advance to the next page of results from your request.
To get a page token, perform an initial GetBuckets request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.
dict
Response Syntax
{
'buckets': [
{
'resourceType': 'string',
'accessRules': {
'getObject': 'public'|'private',
'allowPublicOverrides': True|False
},
'arn': 'string',
'bundleId': 'string',
'createdAt': datetime(2015, 1, 1),
'url': 'string',
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'name': 'string',
'supportCode': 'string',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'objectVersioning': 'string',
'ableToUpdateBundle': True|False,
'readonlyAccessAccounts': [
'string',
],
'resourcesReceivingAccess': [
{
'name': 'string',
'resourceType': 'string'
},
],
'state': {
'code': 'string',
'message': 'string'
},
'accessLogConfig': {
'enabled': True|False,
'destination': 'string',
'prefix': 'string'
}
},
],
'nextPageToken': 'string'
}
Response Structure
(dict) --
buckets (list) --
An array of objects that describe buckets.
(dict) --
Describes an Amazon Lightsail bucket.
resourceType (string) --
The Lightsail resource type of the bucket (for example, Bucket ).
accessRules (dict) --
An object that describes the access rules of the bucket.
getObject (string) --
Specifies the anonymous access to all objects in a bucket.
The following options can be specified:
allowPublicOverrides (boolean) --
A Boolean value that indicates whether the access control list (ACL) permissions that are applied to individual objects override the getObject option that is currently specified.
When this is true, you can use the PutObjectAcl Amazon S3 API action to set individual objects to public (read-only) using the public-read ACL, or to private using the private ACL.
arn (string) --
The Amazon Resource Name (ARN) of the bucket.
bundleId (string) --
The ID of the bundle currently applied to the bucket.
A bucket bundle specifies the monthly cost, storage space, and data transfer quota for a bucket.
Use the UpdateBucketBundle action to change the bundle of a bucket.
createdAt (datetime) --
The timestamp when the distribution was created.
url (string) --
The URL of the bucket.
location (dict) --
Describes the resource location.
availabilityZone (string) --
The Availability Zone. Follows the format us-east-2a (case-sensitive).
regionName (string) --
The AWS Region name.
name (string) --
The name of the bucket.
supportCode (string) --
The support code for a bucket. Include this code in your email to support when you have questions about a Lightsail bucket. This code enables our support team to look up your Lightsail information more easily.
tags (list) --
The tag keys and optional values for the bucket. For more information, see Tags in Amazon Lightsail in the Amazon Lightsail Developer Guide .
(dict) --
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
key (string) --
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
value (string) --
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
objectVersioning (string) --
Indicates whether object versioning is enabled for the bucket.
The following options can be configured:
ableToUpdateBundle (boolean) --
Indicates whether the bundle that is currently applied to a bucket can be changed to another bundle.
You can update a bucket's bundle only one time within a monthly AWS billing cycle.
Use the UpdateBucketBundle action to change a bucket's bundle.
readonlyAccessAccounts (list) --
An array of strings that specify the AWS account IDs that have read-only access to the bucket.
resourcesReceivingAccess (list) --
An array of objects that describe Lightsail instances that have access to the bucket.
Use the SetResourceAccessForBucket action to update the instances that have access to a bucket.
(dict) --
Describes an Amazon Lightsail instance that has access to a Lightsail bucket.
name (string) --
The name of the Lightsail instance.
resourceType (string) --
The Lightsail resource type (for example, Instance ).
state (dict) --
An object that describes the state of the bucket.
code (string) --
The state code of the bucket.
The following codes are possible:
message (string) --
A message that describes the state of the bucket.
accessLogConfig (dict) --
An object that describes the access log configuration for the bucket.
enabled (boolean) --
A Boolean value that indicates whether bucket access logging is enabled for the bucket.
destination (string) --
The name of the bucket where the access is saved. The destination can be a Lightsail bucket in the same account, and in the same AWS Region as the source bucket.
Note
This parameter is required when enabling the access log for a bucket, and should be omitted when disabling the access log.
prefix (string) --
The optional object prefix for the bucket access log.
The prefix is an optional addition to the object key that organizes your access log files in the destination bucket. For example, if you specify a logs/ prefix, then each log object will begin with the logs/ prefix in its key (for example, logs/2021-11-01-21-32-16-E568B2907131C0C0 ).
Note
This parameter can be optionally specified when enabling the access log for a bucket, and should be omitted when disabling the access log.
nextPageToken (string) --
The token to advance to the next page of results from your request.
A next page token is not returned if there are no more results to display.
To get the next page of results, perform another GetBuckets request and specify the next page token using the pageToken parameter.
Exceptions
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'
)
The token to advance to the next page of results from your request.
To get a page token, perform an initial GetBundles request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.
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 ) of the bundle.
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) --
The token to advance to the next page of results from your request.
A next page token is not returned if there are no more results to display.
To get the next page of results, perform another GetBundles request and specify the next page token using the pageToken parameter.
Exceptions
Returns information about one or more Amazon Lightsail SSL/TLS certificates.
Note
To get a summary of a certificate, ommit includeCertificateDetails from your request. The response will include only the certificate Amazon Resource Name (ARN), certificate name, domain name, and tags.
See also: AWS API Documentation
Request Syntax
response = client.get_certificates(
certificateStatuses=[
'PENDING_VALIDATION'|'ISSUED'|'INACTIVE'|'EXPIRED'|'VALIDATION_TIMED_OUT'|'REVOKED'|'FAILED',
],
includeCertificateDetails=True|False,
certificateName='string'
)
The status of the certificates for which to return information.
For example, specify ISSUED to return only certificates with an ISSUED status.
When omitted, the response includes all of your certificates in the AWS Region where the request is made, regardless of their current status.
Indicates whether to include detailed information about the certificates in the response.
When omitted, the response includes only the certificate names, Amazon Resource Names (ARNs), domain names, and tags.
The name for the certificate for which to return information.
When omitted, the response includes all of your certificates in the AWS Region where the request is made.
dict
Response Syntax
{
'certificates': [
{
'certificateArn': 'string',
'certificateName': 'string',
'domainName': 'string',
'certificateDetail': {
'arn': 'string',
'name': 'string',
'domainName': 'string',
'status': 'PENDING_VALIDATION'|'ISSUED'|'INACTIVE'|'EXPIRED'|'VALIDATION_TIMED_OUT'|'REVOKED'|'FAILED',
'serialNumber': 'string',
'subjectAlternativeNames': [
'string',
],
'domainValidationRecords': [
{
'domainName': 'string',
'resourceRecord': {
'name': 'string',
'type': 'string',
'value': 'string'
}
},
],
'requestFailureReason': 'string',
'inUseResourceCount': 123,
'keyAlgorithm': 'string',
'createdAt': datetime(2015, 1, 1),
'issuedAt': datetime(2015, 1, 1),
'issuerCA': 'string',
'notBefore': datetime(2015, 1, 1),
'notAfter': datetime(2015, 1, 1),
'eligibleToRenew': 'string',
'renewalSummary': {
'domainValidationRecords': [
{
'domainName': 'string',
'resourceRecord': {
'name': 'string',
'type': 'string',
'value': 'string'
}
},
],
'renewalStatus': 'PendingAutoRenewal'|'PendingValidation'|'Success'|'Failed',
'renewalStatusReason': 'string',
'updatedAt': datetime(2015, 1, 1)
},
'revokedAt': datetime(2015, 1, 1),
'revocationReason': 'string',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'supportCode': 'string'
},
'tags': [
{
'key': 'string',
'value': 'string'
},
]
},
]
}
Response Structure
(dict) --
certificates (list) --
An object that describes certificates.
(dict) --
Describes an Amazon Lightsail SSL/TLS certificate.
certificateArn (string) --
The Amazon Resource Name (ARN) of the certificate.
certificateName (string) --
The name of the certificate.
domainName (string) --
The domain name of the certificate.
certificateDetail (dict) --
An object that describes a certificate in detail.
arn (string) --
The Amazon Resource Name (ARN) of the certificate.
name (string) --
The name of the certificate (e.g., my-certificate ).
domainName (string) --
The domain name of the certificate.
status (string) --
The validation status of the certificate.
serialNumber (string) --
The serial number of the certificate.
subjectAlternativeNames (list) --
An array of strings that specify the alternate domains (e.g., example2.com ) and subdomains (e.g., blog.example.com ) of the certificate.
domainValidationRecords (list) --
An array of objects that describe the domain validation records of the certificate.
(dict) --
Describes the domain validation records of an Amazon Lightsail SSL/TLS certificate.
domainName (string) --
The domain name of the certificate validation record. For example, example.com or www.example.com .
resourceRecord (dict) --
An object that describes the DNS records to add to your domain's DNS to validate it for the certificate.
name (string) --
The name of the record.
type (string) --
The DNS record type.
value (string) --
The value for the DNS record.
requestFailureReason (string) --
The validation failure reason, if any, of the certificate.
The following failure reasons are possible:
Note
You cannot request a certificate for Amazon-owned domain names such as those ending in amazonaws.com, cloudfront.net, or elasticbeanstalk.com.
inUseResourceCount (integer) --
The number of Lightsail resources that the certificate is attached to.
keyAlgorithm (string) --
The algorithm used to generate the key pair (the public and private key) of the certificate.
createdAt (datetime) --
The timestamp when the certificate was created.
issuedAt (datetime) --
The timestamp when the certificate was issued.
issuerCA (string) --
The certificate authority that issued the certificate.
notBefore (datetime) --
The timestamp when the certificate is first valid.
notAfter (datetime) --
The timestamp when the certificate expires.
eligibleToRenew (string) --
The renewal eligibility of the certificate.
renewalSummary (dict) --
An object that describes the status of the certificate renewal managed by Lightsail.
domainValidationRecords (list) --
An array of objects that describe the domain validation records of the certificate.
(dict) --
Describes the domain validation records of an Amazon Lightsail SSL/TLS certificate.
domainName (string) --
The domain name of the certificate validation record. For example, example.com or www.example.com .
resourceRecord (dict) --
An object that describes the DNS records to add to your domain's DNS to validate it for the certificate.
name (string) --
The name of the record.
type (string) --
The DNS record type.
value (string) --
The value for the DNS record.
renewalStatus (string) --
The renewal status of the certificate.
The following renewal status are possible:
renewalStatusReason (string) --
The reason for the renewal status of the certificate.
updatedAt (datetime) --
The timestamp when the certificate was last updated.
revokedAt (datetime) --
The timestamp when the certificate was revoked. This value is present only when the certificate status is REVOKED .
revocationReason (string) --
The reason the certificate was revoked. This value is present only when the certificate status is REVOKED .
tags (list) --
The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
(dict) --
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
key (string) --
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
value (string) --
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
supportCode (string) --
The support code. Include this code in your email to support when you have questions about your Lightsail certificate. This code enables our support team to look up your Lightsail information more easily.
tags (list) --
The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
(dict) --
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
key (string) --
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
value (string) --
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
Exceptions
Returns the CloudFormation stack record created as a result of the create cloud formation stack operation.
An AWS CloudFormation stack is used to create a new Amazon EC2 instance from an exported Lightsail snapshot.
See also: AWS API Documentation
Request Syntax
response = client.get_cloud_formation_stack_records(
pageToken='string'
)
The token to advance to the next page of results from your request.
To get a page token, perform an initial GetClouFormationStackRecords request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.
{
'cloudFormationStackRecords': [
{
'name': 'string',
'arn': '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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'state': 'Started'|'Succeeded'|'Failed',
'sourceInfo': [
{
'resourceType': 'ExportSnapshotRecord',
'name': 'string',
'arn': 'string'
},
],
'destinationInfo': {
'id': 'string',
'service': 'string'
}
},
],
'nextPageToken': 'string'
}
Response Structure
A list of objects describing the CloudFormation stack records.
Describes a CloudFormation stack record created as a result of the create cloud formation stack action.
A CloudFormation stack record provides information about the AWS CloudFormation stack used to create a new Amazon Elastic Compute Cloud instance from an exported Lightsail instance snapshot.
The name of the CloudFormation stack record. It starts with CloudFormationStackRecord followed by a GUID.
The Amazon Resource Name (ARN) of the CloudFormation stack record.
The date when the CloudFormation stack record was created.
A list of objects describing the Availability Zone and AWS Region of the CloudFormation stack record.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The Lightsail resource type (e.g., CloudFormationStackRecord ).
The current state of the CloudFormation stack record.
A list of objects describing the source of the CloudFormation stack record.
Describes the source of a CloudFormation stack record (i.e., the export snapshot record).
The Lightsail resource type (e.g., ExportSnapshotRecord ).
The name of the record.
The Amazon Resource Name (ARN) of the export snapshot record.
A list of objects describing the destination service, which is AWS CloudFormation, and the Amazon Resource Name (ARN) of the AWS CloudFormation stack.
The ID of the resource created at the destination.
The destination service of the record.
The token to advance to the next page of results from your request.
A next page token is not returned if there are no more results to display.
To get the next page of results, perform another GetCloudFormationStackRecords request and specify the next page token using the pageToken parameter.
Exceptions
Returns information about the configured contact methods. Specify a protocol in your request to return information about a specific contact method.
A contact method is used to send you notifications about your Amazon Lightsail resources. You can add one email address and one mobile phone number contact method in each AWS Region. However, SMS text messaging is not supported in some AWS Regions, and SMS text messages cannot be sent to some countries/regions. For more information, see Notifications in Amazon Lightsail .
See also: AWS API Documentation
Request Syntax
response = client.get_contact_methods(
protocols=[
'Email'|'SMS',
]
)
The protocols used to send notifications, such as Email , or SMS (text messaging).
Specify a protocol in your request to return information about a specific contact method protocol.
{
'contactMethods': [
{
'contactEndpoint': 'string',
'status': 'PendingVerification'|'Valid'|'Invalid',
'protocol': 'Email'|'SMS',
'name': 'string',
'arn': '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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'supportCode': 'string'
},
]
}
Response Structure
An array of objects that describe the contact methods.
Describes a contact method.
A contact method is a way to send you notifications. For more information, see Notifications in Amazon Lightsail .
The destination of the contact method, such as an email address or a mobile phone number.
The current status of the contact method.
A contact method has the following possible status:
The protocol of the contact method, such as email or SMS (text messaging).
The name of the contact method.
The Amazon Resource Name (ARN) of the contact method.
The timestamp when the contact method was created.
Describes the resource location.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The Lightsail resource type (e.g., ContactMethod ).
The support code. Include this code in your email to support when you have questions about your Lightsail contact method. This code enables our support team to look up your Lightsail information more easily.
Exceptions
Returns information about Amazon Lightsail containers, such as the current version of the Lightsail Control (lightsailctl) plugin.
See also: AWS API Documentation
Request Syntax
response = client.get_container_api_metadata()
{
'metadata': [
{
'string': 'string'
},
]
}
Response Structure
Metadata about Lightsail containers, such as the current version of the Lightsail Control (lightsailctl) plugin.
Exceptions
Returns the container images that are registered to your Amazon Lightsail container service.
Note
If you created a deployment on your Lightsail container service that uses container images from a public registry like Docker Hub, those images are not returned as part of this action. Those images are not registered to your Lightsail container service.
See also: AWS API Documentation
Request Syntax
response = client.get_container_images(
serviceName='string'
)
[REQUIRED]
The name of the container service for which to return registered container images.
{
'containerImages': [
{
'image': 'string',
'digest': 'string',
'createdAt': datetime(2015, 1, 1)
},
]
}
Response Structure
An array of objects that describe container images that are registered to the container service.
Describes a container image that is registered to an Amazon Lightsail container service.
The name of the container image.
The digest of the container image.
The timestamp when the container image was created.
Exceptions
Returns the log events of a container of your Amazon Lightsail container service.
If your container service has more than one node (i.e., a scale greater than 1), then the log events that are returned for the specified container are merged from all nodes on your container service.
Note
Container logs are retained for a certain amount of time. For more information, see Amazon Lightsail endpoints and quotas in the AWS General Reference .
See also: AWS API Documentation
Request Syntax
response = client.get_container_log(
serviceName='string',
containerName='string',
startTime=datetime(2015, 1, 1),
endTime=datetime(2015, 1, 1),
filterPattern='string',
pageToken='string'
)
[REQUIRED]
The name of the container service for which to get a container log.
[REQUIRED]
The name of the container that is either running or previously ran on the container service for which to return a log.
The start of the time interval for which to get log data.
Constraints:
You can convert a human-friendly time to Unix time format using a converter like Epoch converter .
The end of the time interval for which to get log data.
Constraints:
You can convert a human-friendly time to Unix time format using a converter like Epoch converter .
The pattern to use to filter the returned log events to a specific term.
The following are a few examples of filter patterns that you can specify:
The token to advance to the next page of results from your request.
To get a page token, perform an initial GetContainerLog request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.
dict
Response Syntax
{
'logEvents': [
{
'createdAt': datetime(2015, 1, 1),
'message': 'string'
},
],
'nextPageToken': 'string'
}
Response Structure
(dict) --
logEvents (list) --
An array of objects that describe the log events of a container.
(dict) --
Describes the log events of a container of an Amazon Lightsail container service.
createdAt (datetime) --
The timestamp when the container service log event was created.
message (string) --
The message of the container service log event.
nextPageToken (string) --
The token to advance to the next page of results from your request.
A next page token is not returned if there are no more results to display.
To get the next page of results, perform another GetContainerLog request and specify the next page token using the pageToken parameter.
Exceptions
Returns the deployments for your Amazon Lightsail container service
A deployment specifies the settings, such as the ports and launch command, of containers that are deployed to your container service.
The deployments are ordered by version in ascending order. The newest version is listed at the top of the response.
Note
A set number of deployments are kept before the oldest one is replaced with the newest one. For more information, see Amazon Lightsail endpoints and quotas in the AWS General Reference .
See also: AWS API Documentation
Request Syntax
response = client.get_container_service_deployments(
serviceName='string'
)
[REQUIRED]
The name of the container service for which to return deployments.
{
'deployments': [
{
'version': 123,
'state': 'ACTIVATING'|'ACTIVE'|'INACTIVE'|'FAILED',
'containers': {
'string': {
'image': 'string',
'command': [
'string',
],
'environment': {
'string': 'string'
},
'ports': {
'string': 'HTTP'|'HTTPS'|'TCP'|'UDP'
}
}
},
'publicEndpoint': {
'containerName': 'string',
'containerPort': 123,
'healthCheck': {
'healthyThreshold': 123,
'unhealthyThreshold': 123,
'timeoutSeconds': 123,
'intervalSeconds': 123,
'path': 'string',
'successCodes': 'string'
}
},
'createdAt': datetime(2015, 1, 1)
},
]
}
Response Structure
An array of objects that describe deployments for a container service.
Describes a container deployment configuration of an Amazon Lightsail container service.
A deployment specifies the settings, such as the ports and launch command, of containers that are deployed to your container service.
The version number of the deployment.
The state of the deployment.
A deployment can be in one of the following states:
An object that describes the configuration for the containers of the deployment.
Describes the settings of a container that will be launched, or that is launched, to an Amazon Lightsail container service.
The name of the image used for the container.
Container images sourced from your Lightsail container service, that are registered and stored on your service, start with a colon (: ). For example, if your container service name is container-service-1 , the container image label is mystaticsite , and you want to use the third (3 ) version of the registered container image, then you should specify :container-service-1.mystaticsite.3 . To use the latest version of a container image, specify latest instead of a version number (for example, :container-service-1.mystaticsite.latest ). Lightsail will automatically use the highest numbered version of the registered container image.
Container images sourced from a public registry like Docker Hub don't start with a colon. For example, nginx:latest or nginx .
The launch command for the container.
The environment variables of the container.
The open firewall ports of the container.
An object that describes the endpoint of the deployment.
The name of the container entry of the deployment that the endpoint configuration applies to.
The port of the specified container to which traffic is forwarded to.
An object that describes the health check configuration of the container.
The number of consecutive health checks successes required before moving the container to the Healthy state. The default value is 2 .
The number of consecutive health check failures required before moving the container to the Unhealthy state. The default value is 2 .
The amount of time, in seconds, during which no response means a failed health check. You can specify between 2 and 60 seconds. The default value is 2 .
The approximate interval, in seconds, between health checks of an individual container. You can specify between 5 and 300 seconds. The default value is 5 .
The path on the container on which to perform the health check. The default value is / .
The HTTP codes to use when checking for a successful response from a container. You can specify values between 200 and 499 . You can specify multiple values (for example, 200,202 ) or a range of values (for example, 200-299 ).
The timestamp when the deployment was created.
Exceptions
Returns the data points of a specific metric of your Amazon Lightsail container service.
Metrics report the utilization of your resources. Monitor and collect metric data regularly to maintain the reliability, availability, and performance of your resources.
See also: AWS API Documentation
Request Syntax
response = client.get_container_service_metric_data(
serviceName='string',
metricName='CPUUtilization'|'MemoryUtilization',
startTime=datetime(2015, 1, 1),
endTime=datetime(2015, 1, 1),
period=123,
statistics=[
'Minimum'|'Maximum'|'Sum'|'Average'|'SampleCount',
]
)
[REQUIRED]
The name of the container service for which to get metric data.
[REQUIRED]
The metric for which you want to return information.
Valid container service metric names are listed below, along with the most useful statistics to include in your request, and the published unit value.
[REQUIRED]
The start time of the time period.
[REQUIRED]
The end time of the time period.
[REQUIRED]
The granularity, in seconds, of the returned data points.
All container service metric data is available in 5-minute (300 seconds) granularity.
[REQUIRED]
The statistic for the metric.
The following statistics are available:
dict
Response Syntax
{
'metricName': 'CPUUtilization'|'MemoryUtilization',
'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 name of the metric returned.
metricData (list) --
An array of objects that describe the metric data returned.
(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.
Exceptions
Returns the list of powers that can be specified for your Amazon Lightsail container services.
The power specifies the amount of memory, the number of vCPUs, and the base price of the container service.
See also: AWS API Documentation
Request Syntax
response = client.get_container_service_powers()
{
'powers': [
{
'powerId': 'string',
'price': ...,
'cpuCount': ...,
'ramSizeInGb': ...,
'name': 'string',
'isActive': True|False
},
]
}
Response Structure
An array of objects that describe the powers that can be specified for a container service.
Describes the powers that can be specified for an Amazon Lightsail container service.
The power specifies the amount of RAM, the number of vCPUs, and the base price of the container service.
The ID of the power (e.g., nano-1 ).
The monthly price of the power in USD.
The number of vCPUs included in the power.
The amount of RAM (in GB) of the power.
The friendly name of the power (e.g., nano ).
A Boolean value indicating whether the power is active and can be specified for container services.
Exceptions
Returns information about one or more of your Amazon Lightsail container services.
See also: AWS API Documentation
Request Syntax
response = client.get_container_services(
serviceName='string'
)
The name of the container service for which to return information.
When omitted, the response includes all of your container services in the AWS Region where the request is made.
{
'containerServices': [
{
'containerServiceName': 'string',
'arn': '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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'power': 'nano'|'micro'|'small'|'medium'|'large'|'xlarge',
'powerId': 'string',
'state': 'PENDING'|'READY'|'RUNNING'|'UPDATING'|'DELETING'|'DISABLED'|'DEPLOYING',
'stateDetail': {
'code': 'CREATING_SYSTEM_RESOURCES'|'CREATING_NETWORK_INFRASTRUCTURE'|'PROVISIONING_CERTIFICATE'|'PROVISIONING_SERVICE'|'CREATING_DEPLOYMENT'|'EVALUATING_HEALTH_CHECK'|'ACTIVATING_DEPLOYMENT'|'CERTIFICATE_LIMIT_EXCEEDED'|'UNKNOWN_ERROR',
'message': 'string'
},
'scale': 123,
'currentDeployment': {
'version': 123,
'state': 'ACTIVATING'|'ACTIVE'|'INACTIVE'|'FAILED',
'containers': {
'string': {
'image': 'string',
'command': [
'string',
],
'environment': {
'string': 'string'
},
'ports': {
'string': 'HTTP'|'HTTPS'|'TCP'|'UDP'
}
}
},
'publicEndpoint': {
'containerName': 'string',
'containerPort': 123,
'healthCheck': {
'healthyThreshold': 123,
'unhealthyThreshold': 123,
'timeoutSeconds': 123,
'intervalSeconds': 123,
'path': 'string',
'successCodes': 'string'
}
},
'createdAt': datetime(2015, 1, 1)
},
'nextDeployment': {
'version': 123,
'state': 'ACTIVATING'|'ACTIVE'|'INACTIVE'|'FAILED',
'containers': {
'string': {
'image': 'string',
'command': [
'string',
],
'environment': {
'string': 'string'
},
'ports': {
'string': 'HTTP'|'HTTPS'|'TCP'|'UDP'
}
}
},
'publicEndpoint': {
'containerName': 'string',
'containerPort': 123,
'healthCheck': {
'healthyThreshold': 123,
'unhealthyThreshold': 123,
'timeoutSeconds': 123,
'intervalSeconds': 123,
'path': 'string',
'successCodes': 'string'
}
},
'createdAt': datetime(2015, 1, 1)
},
'isDisabled': True|False,
'principalArn': 'string',
'privateDomainName': 'string',
'publicDomainNames': {
'string': [
'string',
]
},
'url': 'string'
},
]
}
Response Structure
An array of objects that describe one or more container services.
Describes an Amazon Lightsail container service.
The name of the container service.
The Amazon Resource Name (ARN) of the container service.
The timestamp when the container service was created.
An object that describes the location of the container service, such as the AWS Region and Availability Zone.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The Lightsail resource type of the container service (i.e., ContainerService ).
The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The power specification of the container service.
The power specifies the amount of RAM, the number of vCPUs, and the base price of the container service.
The ID of the power of the container service.
The current state of the container service.
The following container service states are possible:
An object that describes the current state of the container service.
Note
The state detail is populated only when a container service is in a PENDING , DEPLOYING , or UPDATING state.
The state code of the container service.
The following state codes are possible:
A message that provides more information for the state code.
Note
The state detail is populated only when a container service is in a PENDING , DEPLOYING , or UPDATING state.
The scale specification of the container service.
The scale specifies the allocated compute nodes of the container service.
An object that describes the current container deployment of the container service.
The version number of the deployment.
The state of the deployment.
A deployment can be in one of the following states:
An object that describes the configuration for the containers of the deployment.
Describes the settings of a container that will be launched, or that is launched, to an Amazon Lightsail container service.
The name of the image used for the container.
Container images sourced from your Lightsail container service, that are registered and stored on your service, start with a colon (: ). For example, if your container service name is container-service-1 , the container image label is mystaticsite , and you want to use the third (3 ) version of the registered container image, then you should specify :container-service-1.mystaticsite.3 . To use the latest version of a container image, specify latest instead of a version number (for example, :container-service-1.mystaticsite.latest ). Lightsail will automatically use the highest numbered version of the registered container image.
Container images sourced from a public registry like Docker Hub don't start with a colon. For example, nginx:latest or nginx .
The launch command for the container.
The environment variables of the container.
The open firewall ports of the container.
An object that describes the endpoint of the deployment.
The name of the container entry of the deployment that the endpoint configuration applies to.
The port of the specified container to which traffic is forwarded to.
An object that describes the health check configuration of the container.
The number of consecutive health checks successes required before moving the container to the Healthy state. The default value is 2 .
The number of consecutive health check failures required before moving the container to the Unhealthy state. The default value is 2 .
The amount of time, in seconds, during which no response means a failed health check. You can specify between 2 and 60 seconds. The default value is 2 .
The approximate interval, in seconds, between health checks of an individual container. You can specify between 5 and 300 seconds. The default value is 5 .
The path on the container on which to perform the health check. The default value is / .
The HTTP codes to use when checking for a successful response from a container. You can specify values between 200 and 499 . You can specify multiple values (for example, 200,202 ) or a range of values (for example, 200-299 ).
The timestamp when the deployment was created.
An object that describes the next deployment of the container service.
This value is null when there is no deployment in a pending state.
The version number of the deployment.
The state of the deployment.
A deployment can be in one of the following states:
An object that describes the configuration for the containers of the deployment.
Describes the settings of a container that will be launched, or that is launched, to an Amazon Lightsail container service.
The name of the image used for the container.
Container images sourced from your Lightsail container service, that are registered and stored on your service, start with a colon (: ). For example, if your container service name is container-service-1 , the container image label is mystaticsite , and you want to use the third (3 ) version of the registered container image, then you should specify :container-service-1.mystaticsite.3 . To use the latest version of a container image, specify latest instead of a version number (for example, :container-service-1.mystaticsite.latest ). Lightsail will automatically use the highest numbered version of the registered container image.
Container images sourced from a public registry like Docker Hub don't start with a colon. For example, nginx:latest or nginx .
The launch command for the container.
The environment variables of the container.
The open firewall ports of the container.
An object that describes the endpoint of the deployment.
The name of the container entry of the deployment that the endpoint configuration applies to.
The port of the specified container to which traffic is forwarded to.
An object that describes the health check configuration of the container.
The number of consecutive health checks successes required before moving the container to the Healthy state. The default value is 2 .
The number of consecutive health check failures required before moving the container to the Unhealthy state. The default value is 2 .
The amount of time, in seconds, during which no response means a failed health check. You can specify between 2 and 60 seconds. The default value is 2 .
The approximate interval, in seconds, between health checks of an individual container. You can specify between 5 and 300 seconds. The default value is 5 .
The path on the container on which to perform the health check. The default value is / .
The HTTP codes to use when checking for a successful response from a container. You can specify values between 200 and 499 . You can specify multiple values (for example, 200,202 ) or a range of values (for example, 200-299 ).
The timestamp when the deployment was created.
A Boolean value indicating whether the container service is disabled.
The principal ARN of the container service.
The principal ARN can be used to create a trust relationship between your standard AWS account and your Lightsail container service. This allows you to give your service permission to access resources in your standard AWS account.
The private domain name of the container service.
The private domain name is accessible only by other resources within the default virtual private cloud (VPC) of your Lightsail account.
The public domain name of the container service, such as example.com and www.example.com .
You can specify up to four public domain names for a container service. The domain names that you specify are used when you create a deployment with a container configured as the public endpoint of your container service.
If you don't specify public domain names, then you can use the default domain of the container service.
Warning
You must create and validate an SSL/TLS certificate before you can use public domain names with your container service. Use the CreateCertificate action to create a certificate for the public domain names you want to use with your container service.
See CreateContainerService or UpdateContainerService for information about how to specify public domain names for your Lightsail container service.
The publicly accessible URL of the container service.
If no public endpoint is specified in the currentDeployment , this URL returns a 404 response.
Exceptions
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-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'addOns': [
{
'name': 'string',
'status': 'string',
'snapshotTimeOfDay': 'string',
'nextSnapshotTimeOfDay': 'string'
},
],
'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 tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
An array of objects representing the add-ons enabled on the disk.
Describes an add-on that is enabled for an Amazon Lightsail resource.
The name of the add-on.
The status of the add-on.
The daily time when an automatic snapshot is created.
The time shown is in HH:00 format, and in Coordinated Universal Time (UTC).
The snapshot is automatically created between the time shown and up to 45 minutes after.
The next daily time an automatic snapshot will be created.
The time shown is in HH:00 format, and in Coordinated Universal Time (UTC).
The snapshot is automatically created between the time shown and up to 45 minutes after.
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.
Exceptions
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-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'sizeInGb': 123,
'state': 'pending'|'completed'|'error'|'unknown',
'progress': 'string',
'fromDiskName': 'string',
'fromDiskArn': 'string',
'fromInstanceName': 'string',
'fromInstanceArn': 'string',
'isFromAutoSnapshot': True|False
}
}
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 tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The size of the disk in GB.
The status of the disk snapshot operation.
The progress of the snapshot.
The unique name of the source disk from which the disk snapshot was created.
The Amazon Resource Name (ARN) of the source disk from which the disk snapshot was created.
The unique name of the source instance from which the disk (system volume) snapshot was created.
The Amazon Resource Name (ARN) of the source instance from which the disk (system volume) snapshot was created.
A Boolean value indicating whether the snapshot was created from an automatic snapshot.
Exceptions
Returns information about all block storage disk snapshots in your AWS account and region.
See also: AWS API Documentation
Request Syntax
response = client.get_disk_snapshots(
pageToken='string'
)
The token to advance to the next page of results from your request.
To get a page token, perform an initial GetDiskSnapshots request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.
{
'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-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'sizeInGb': 123,
'state': 'pending'|'completed'|'error'|'unknown',
'progress': 'string',
'fromDiskName': 'string',
'fromDiskArn': 'string',
'fromInstanceName': 'string',
'fromInstanceArn': 'string',
'isFromAutoSnapshot': True|False
},
],
'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 tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The size of the disk in GB.
The status of the disk snapshot operation.
The progress of the snapshot.
The unique name of the source disk from which the disk snapshot was created.
The Amazon Resource Name (ARN) of the source disk from which the disk snapshot was created.
The unique name of the source instance from which the disk (system volume) snapshot was created.
The Amazon Resource Name (ARN) of the source instance from which the disk (system volume) snapshot was created.
A Boolean value indicating whether the snapshot was created from an automatic snapshot.
The token to advance to the next page of results from your request.
A next page token is not returned if there are no more results to display.
To get the next page of results, perform another GetDiskSnapshots request and specify the next page token using the pageToken parameter.
Exceptions
Returns information about all block storage disks in your AWS account and region.
See also: AWS API Documentation
Request Syntax
response = client.get_disks(
pageToken='string'
)
The token to advance to the next page of results from your request.
To get a page token, perform an initial GetDisks request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.
{
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'addOns': [
{
'name': 'string',
'status': 'string',
'snapshotTimeOfDay': 'string',
'nextSnapshotTimeOfDay': 'string'
},
],
'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 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 tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
An array of objects representing the add-ons enabled on the disk.
Describes an add-on that is enabled for an Amazon Lightsail resource.
The name of the add-on.
The status of the add-on.
The daily time when an automatic snapshot is created.
The time shown is in HH:00 format, and in Coordinated Universal Time (UTC).
The snapshot is automatically created between the time shown and up to 45 minutes after.
The next daily time an automatic snapshot will be created.
The time shown is in HH:00 format, and in Coordinated Universal Time (UTC).
The snapshot is automatically created between the time shown and up to 45 minutes after.
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 token to advance to the next page of results from your request.
A next page token is not returned if there are no more results to display.
To get the next page of results, perform another GetDisks request and specify the next page token using the pageToken parameter.
Exceptions
Returns the bundles that can be applied to your Amazon Lightsail content delivery network (CDN) distributions.
A distribution bundle specifies the monthly network transfer quota and monthly cost of your dsitribution.
See also: AWS API Documentation
Request Syntax
response = client.get_distribution_bundles()
{
'bundles': [
{
'bundleId': 'string',
'name': 'string',
'price': ...,
'transferPerMonthInGb': 123,
'isActive': True|False
},
]
}
Response Structure
An object that describes a distribution bundle.
Describes the specifications of a distribution bundle.
The ID of the bundle.
The name of the distribution bundle.
The monthly price, in US dollars, of the bundle.
The monthly network transfer quota of the bundle.
Indicates whether the bundle is active, and can be specified for a new or existing distribution.
Exceptions
Returns the timestamp and status of the last cache reset of a specific Amazon Lightsail content delivery network (CDN) distribution.
See also: AWS API Documentation
Request Syntax
response = client.get_distribution_latest_cache_reset(
distributionName='string'
)
The name of the distribution for which to return the timestamp of the last cache reset.
Use the GetDistributions action to get a list of distribution names that you can specify.
When omitted, the response includes the latest cache reset timestamp of all your distributions.
{
'status': 'string',
'createTime': datetime(2015, 1, 1)
}
Response Structure
The status of the last cache reset.
The timestamp of the last cache reset (e.g., 1479734909.17 ) in Unix time format.
Exceptions
Returns the data points of a specific metric for an Amazon Lightsail content delivery network (CDN) distribution.
Metrics report the utilization of your resources, and the error counts generated by them. Monitor and collect metric data regularly to maintain the reliability, availability, and performance of your resources.
See also: AWS API Documentation
Request Syntax
response = client.get_distribution_metric_data(
distributionName='string',
metricName='Requests'|'BytesDownloaded'|'BytesUploaded'|'TotalErrorRate'|'Http4xxErrorRate'|'Http5xxErrorRate',
startTime=datetime(2015, 1, 1),
endTime=datetime(2015, 1, 1),
period=123,
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 distribution for which to get metric data.
Use the GetDistributions action to get a list of distribution names that you can specify.
[REQUIRED]
The metric for which you want to return information.
Valid distribution metric names are listed below, along with the most useful statistics to include in your request, and the published unit value.
[REQUIRED]
The start of the time interval for which to get metric data.
Constraints:
You can convert a human-friendly time to Unix time format using a converter like Epoch converter .
[REQUIRED]
The end of the time interval for which to get metric data.
Constraints:
You can convert a human-friendly time to Unix time format using a converter like Epoch converter .
[REQUIRED]
The granularity, in seconds, for the metric data points that will be returned.
[REQUIRED]
The unit for the metric data request.
Valid units depend on the metric data being requested. For the valid units with each available metric, see the metricName parameter.
[REQUIRED]
The statistic for the metric.
The following statistics are available:
dict
Response Syntax
{
'metricName': 'Requests'|'BytesDownloaded'|'BytesUploaded'|'TotalErrorRate'|'Http4xxErrorRate'|'Http5xxErrorRate',
'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 name of the metric returned.
metricData (list) --
An array of objects that describe the metric data returned.
(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.
Exceptions
Returns information about one or more of your Amazon Lightsail content delivery network (CDN) distributions.
See also: AWS API Documentation
Request Syntax
response = client.get_distributions(
distributionName='string',
pageToken='string'
)
The name of the distribution for which to return information.
When omitted, the response includes all of your distributions in the AWS Region where the request is made.
The token to advance to the next page of results from your request.
To get a page token, perform an initial GetDistributions request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.
dict
Response Syntax
{
'distributions': [
{
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'alternativeDomainNames': [
'string',
],
'status': 'string',
'isEnabled': True|False,
'domainName': 'string',
'bundleId': 'string',
'certificateName': 'string',
'origin': {
'name': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1',
'protocolPolicy': 'http-only'|'https-only'
},
'originPublicDNS': 'string',
'defaultCacheBehavior': {
'behavior': 'dont-cache'|'cache'
},
'cacheBehaviorSettings': {
'defaultTTL': 123,
'minimumTTL': 123,
'maximumTTL': 123,
'allowedHTTPMethods': 'string',
'cachedHTTPMethods': 'string',
'forwardedCookies': {
'option': 'none'|'allow-list'|'all',
'cookiesAllowList': [
'string',
]
},
'forwardedHeaders': {
'option': 'none'|'allow-list'|'all',
'headersAllowList': [
'Accept'|'Accept-Charset'|'Accept-Datetime'|'Accept-Encoding'|'Accept-Language'|'Authorization'|'CloudFront-Forwarded-Proto'|'CloudFront-Is-Desktop-Viewer'|'CloudFront-Is-Mobile-Viewer'|'CloudFront-Is-SmartTV-Viewer'|'CloudFront-Is-Tablet-Viewer'|'CloudFront-Viewer-Country'|'Host'|'Origin'|'Referer',
]
},
'forwardedQueryStrings': {
'option': True|False,
'queryStringsAllowList': [
'string',
]
}
},
'cacheBehaviors': [
{
'path': 'string',
'behavior': 'dont-cache'|'cache'
},
],
'ableToUpdateBundle': True|False,
'ipAddressType': 'dualstack'|'ipv4',
'tags': [
{
'key': 'string',
'value': 'string'
},
]
},
],
'nextPageToken': 'string'
}
Response Structure
(dict) --
distributions (list) --
An array of objects that describe your distributions.
(dict) --
Describes an Amazon Lightsail content delivery network (CDN) distribution.
name (string) --
The name of the distribution.
arn (string) --
The Amazon Resource Name (ARN) of the distribution.
supportCode (string) --
The support code. Include this code in your email to support when you have questions about your Lightsail distribution. This code enables our support team to look up your Lightsail information more easily.
createdAt (datetime) --
The timestamp when the distribution was created.
location (dict) --
An object that describes the location of the distribution, such as the AWS Region and Availability Zone.
Note
Lightsail distributions are global resources that can reference an origin in any AWS Region, and distribute its content globally. However, all distributions are located in the us-east-1 Region.
availabilityZone (string) --
The Availability Zone. Follows the format us-east-2a (case-sensitive).
regionName (string) --
The AWS Region name.
resourceType (string) --
The Lightsail resource type (e.g., Distribution ).
alternativeDomainNames (list) --
The alternate domain names of the distribution.
status (string) --
The status of the distribution.
isEnabled (boolean) --
Indicates whether the distribution is enabled.
domainName (string) --
The domain name of the distribution.
bundleId (string) --
The ID of the bundle currently applied to the distribution.
certificateName (string) --
The name of the SSL/TLS certificate attached to the distribution, if any.
origin (dict) --
An object that describes the origin resource of the distribution, such as a Lightsail instance or load balancer.
The distribution pulls, caches, and serves content from the origin.
name (string) --
The name of the origin resource.
resourceType (string) --
The resource type of the origin resource (e.g., Instance ).
regionName (string) --
The AWS Region name of the origin resource.
protocolPolicy (string) --
The protocol that your Amazon Lightsail distribution uses when establishing a connection with your origin to pull content.
originPublicDNS (string) --
The public DNS of the origin.
defaultCacheBehavior (dict) --
An object that describes the default cache behavior of the distribution.
behavior (string) --
The cache behavior of the distribution.
The following cache behaviors can be specified:
cacheBehaviorSettings (dict) --
An object that describes the cache behavior settings of the distribution.
defaultTTL (integer) --
The default amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the content has been updated.
Note
The value specified applies only when the origin does not add HTTP headers such as Cache-Control max-age , Cache-Control s-maxage , and Expires to objects.
minimumTTL (integer) --
The minimum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated.
A value of 0 must be specified for minimumTTL if the distribution is configured to forward all headers to the origin.
maximumTTL (integer) --
The maximum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated.
The value specified applies only when the origin adds HTTP headers such as Cache-Control max-age , Cache-Control s-maxage , and Expires to objects.
allowedHTTPMethods (string) --
The HTTP methods that are processed and forwarded to the distribution's origin.
You can specify the following options:
If you specify the third option, you might need to restrict access to your distribution's origin so users can't perform operations that you don't want them to. For example, you might not want users to have permission to delete objects from your origin.
cachedHTTPMethods (string) --
The HTTP method responses that are cached by your distribution.
You can specify the following options:
forwardedCookies (dict) --
An object that describes the cookies that are forwarded to the origin. Your content is cached based on the cookies that are forwarded.
option (string) --
Specifies which cookies to forward to the distribution's origin for a cache behavior: all , none , or allow-list to forward only the cookies specified in the cookiesAllowList parameter.
cookiesAllowList (list) --
The specific cookies to forward to your distribution's origin.
forwardedHeaders (dict) --
An object that describes the headers that are forwarded to the origin. Your content is cached based on the headers that are forwarded.
option (string) --
The headers that you want your distribution to forward to your origin and base caching on.
You can configure your distribution to do one of the following:
headersAllowList (list) --
The specific headers to forward to your distribution's origin.
forwardedQueryStrings (dict) --
An object that describes the query strings that are forwarded to the origin. Your content is cached based on the query strings that are forwarded.
option (boolean) --
Indicates whether the distribution forwards and caches based on query strings.
queryStringsAllowList (list) --
The specific query strings that the distribution forwards to the origin.
Your distribution will cache content based on the specified query strings.
If the option parameter is true, then your distribution forwards all query strings, regardless of what you specify using the queryStringsAllowList parameter.
cacheBehaviors (list) --
An array of objects that describe the per-path cache behavior of the distribution.
(dict) --
Describes the per-path cache behavior of an Amazon Lightsail content delivery network (CDN) distribution.
A per-path cache behavior is used to override, or add an exception to, the default cache behavior of a distribution. For example, if the cacheBehavior is set to cache , then a per-path cache behavior can be used to specify a directory, file, or file type that your distribution will cache. Alternately, if the distribution's cacheBehavior is dont-cache , then a per-path cache behavior can be used to specify a directory, file, or file type that your distribution will not cache.
if the cacheBehavior's behavior is set to 'cache', then
path (string) --
The path to a directory or file to cached, or not cache. Use an asterisk symbol to specify wildcard directories (path/to/assets/* ), and file types (*.html, *jpg, *js ). Directories and file paths are case-sensitive.
Examples:
behavior (string) --
The cache behavior for the specified path.
You can specify one of the following per-path cache behaviors:
ableToUpdateBundle (boolean) --
Indicates whether the bundle that is currently applied to your distribution, specified using the distributionName parameter, can be changed to another bundle.
Use the UpdateDistributionBundle action to change your distribution's bundle.
ipAddressType (string) --
The IP address type of the distribution.
The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6.
tags (list) --
The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
(dict) --
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
key (string) --
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
value (string) --
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
nextPageToken (string) --
The token to advance to the next page of results from your request.
A next page token is not returned if there are no more results to display.
To get the next page of results, perform another GetDistributions request and specify the next page token using the pageToken parameter.
Exceptions
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-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'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.
The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
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 IP address (e.g., 192.0.2.0 ), or 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 . For Lightsail distributions, the value looks like exampled1182ne.cloudfront.net . For Lightsail container services, the value looks like container-service-1.example23scljs.us-west-2.cs.amazonlightsail.com . Be sure to also set isAlias to true when setting up an A record for a Lightsail load balancer, distribution, or container service.
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, such as address for IPv4 (A), address for IPv6 (AAAA), canonical name (CNAME), mail exchanger (MX), name server (NS), start of authority (SOA), service locator (SRV), or text (TXT).
The following domain entry types can be used:
(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.
Exceptions
Returns a list of all domains in the user's account.
See also: AWS API Documentation
Request Syntax
response = client.get_domains(
pageToken='string'
)
The token to advance to the next page of results from your request.
To get a page token, perform an initial GetDomains request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.
{
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'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.
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.
The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
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 IP address (e.g., 192.0.2.0 ), or 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 . For Lightsail distributions, the value looks like exampled1182ne.cloudfront.net . For Lightsail container services, the value looks like container-service-1.example23scljs.us-west-2.cs.amazonlightsail.com . Be sure to also set isAlias to true when setting up an A record for a Lightsail load balancer, distribution, or container service.
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, such as address for IPv4 (A), address for IPv6 (AAAA), canonical name (CNAME), mail exchanger (MX), name server (NS), start of authority (SOA), service locator (SRV), or text (TXT).
The following domain entry types can be used:
(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.
The token to advance to the next page of results from your request.
A next page token is not returned if there are no more results to display.
To get the next page of results, perform another GetDomains request and specify the next page token using the pageToken parameter.
Exceptions
Returns all export snapshot records created as a result of the export snapshot operation.
An export snapshot record can be used to create a new Amazon EC2 instance and its related resources with the CreateCloudFormationStack action.
See also: AWS API Documentation
Request Syntax
response = client.get_export_snapshot_records(
pageToken='string'
)
The token to advance to the next page of results from your request.
To get a page token, perform an initial GetExportSnapshotRecords request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.
{
'exportSnapshotRecords': [
{
'name': 'string',
'arn': '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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'state': 'Started'|'Succeeded'|'Failed',
'sourceInfo': {
'resourceType': 'InstanceSnapshot'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'name': 'string',
'arn': 'string',
'fromResourceName': 'string',
'fromResourceArn': 'string',
'instanceSnapshotInfo': {
'fromBundleId': 'string',
'fromBlueprintId': 'string',
'fromDiskInfo': [
{
'name': 'string',
'path': 'string',
'sizeInGb': 123,
'isSystemDisk': True|False
},
]
},
'diskSnapshotInfo': {
'sizeInGb': 123
}
},
'destinationInfo': {
'id': 'string',
'service': 'string'
}
},
],
'nextPageToken': 'string'
}
Response Structure
A list of objects describing the export snapshot records.
Describes an export snapshot record.
The export snapshot record name.
The Amazon Resource Name (ARN) of the export snapshot record.
The date when the export snapshot record was created.
The AWS Region and Availability Zone where the export snapshot record is located.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The Lightsail resource type (e.g., ExportSnapshotRecord ).
The state of the export snapshot record.
A list of objects describing the source of the export snapshot record.
The Lightsail resource type (e.g., InstanceSnapshot or DiskSnapshot ).
The date when the source instance or disk snapshot was created.
The name of the source instance or disk snapshot.
The Amazon Resource Name (ARN) of the source instance or disk snapshot.
The name of the snapshot's source instance or disk.
The Amazon Resource Name (ARN) of the snapshot's source instance or disk.
A list of objects describing an instance snapshot.
The bundle ID from which the source instance was created (e.g., micro_1_0 ).
The blueprint ID from which the source instance (e.g., os_debian_8_3 ).
A list of objects describing the disks that were attached to the source instance.
Describes a disk.
The disk name.
The disk path.
The size of the disk in GB (e.g., 32 ).
A Boolean value indicating whether this disk is a system disk (has an operating system loaded on it).
A list of objects describing a disk snapshot.
The size of the disk in GB (e.g., 32 ).
A list of objects describing the destination of the export snapshot record.
The ID of the resource created at the destination.
The destination service of the record.
The token to advance to the next page of results from your request.
A next page token is not returned if there are no more results to display.
To get the next page of results, perform another GetExportSnapshotRecords request and specify the next page token using the pageToken parameter.
Exceptions
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-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'blueprintId': 'string',
'blueprintName': 'string',
'bundleId': 'string',
'addOns': [
{
'name': 'string',
'status': 'string',
'snapshotTimeOfDay': 'string',
'nextSnapshotTimeOfDay': 'string'
},
],
'isStaticIp': True|False,
'privateIpAddress': 'string',
'publicIpAddress': 'string',
'ipv6Addresses': [
'string',
],
'ipAddressType': 'dualstack'|'ipv4',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'addOns': [
{
'name': 'string',
'status': 'string',
'snapshotTimeOfDay': 'string',
'nextSnapshotTimeOfDay': 'string'
},
],
'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'|'icmp',
'accessFrom': 'string',
'accessType': 'Public'|'Private',
'commonName': 'string',
'accessDirection': 'inbound'|'outbound',
'cidrs': [
'string',
],
'ipv6Cidrs': [
'string',
],
'cidrListAliases': [
'string',
]
},
]
},
'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 ) in Unix time format.
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 tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
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 ).
An array of objects representing the add-ons enabled on the instance.
Describes an add-on that is enabled for an Amazon Lightsail resource.
The name of the add-on.
The status of the add-on.
The daily time when an automatic snapshot is created.
The time shown is in HH:00 format, and in Coordinated Universal Time (UTC).
The snapshot is automatically created between the time shown and up to 45 minutes after.
The next daily time an automatic snapshot will be created.
The time shown is in HH:00 format, and in Coordinated Universal Time (UTC).
The snapshot is automatically created between the time shown and up to 45 minutes after.
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 addresses of the instance.
The IP address type of the instance.
The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6.
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 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 tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
An array of objects representing the add-ons enabled on the disk.
Describes an add-on that is enabled for an Amazon Lightsail resource.
The name of the add-on.
The status of the add-on.
The daily time when an automatic snapshot is created.
The time shown is in HH:00 format, and in Coordinated Universal Time (UTC).
The snapshot is automatically created between the time shown and up to 45 minutes after.
The next daily time an automatic snapshot will be created.
The time shown is in HH:00 format, and in Coordinated Universal Time (UTC).
The snapshot is automatically created between the time shown and up to 45 minutes after.
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 ports for an Amazon Lightsail instance.
The first port in a range of open ports on an instance.
Allowed ports:
The last port in a range of open ports on an instance.
Allowed ports:
The IP protocol name.
The name can be one of the following:
The location from which access is allowed. For example, Anywhere (0.0.0.0/0) , or Custom if a specific IP address or range of IP addresses is allowed.
The type of access (Public or Private ).
The common name of the port information.
The access direction (inbound or outbound ).
Note
Lightsail currently supports only inbound access direction.
The IPv4 address, or range of IPv4 addresses (in CIDR notation) that are allowed to connect to an instance through the ports, and the protocol.
Note
The ipv6Cidrs parameter lists the IPv6 addresses that are allowed to connect to an instance.
For more information about CIDR block notation, see Classless Inter-Domain Routing on Wikipedia .
The IPv6 address, or range of IPv6 addresses (in CIDR notation) that are allowed to connect to an instance through the ports, and the protocol. Only devices with an IPv6 address can connect to an instance through IPv6; otherwise, IPv4 should be used.
Note
The cidrs parameter lists the IPv4 addresses that are allowed to connect to an instance.
For more information about CIDR block notation, see Classless Inter-Domain Routing on Wikipedia .
An alias that defines access for a preconfigured range of IP addresses.
The only alias currently supported is lightsail-connect , which allows IP addresses of the browser-based RDP/SSH client in the Lightsail console to connect to your instance.
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 ).
Exceptions
Returns temporary SSH keys you can use to connect to a specific virtual private server, or instance .
The get instance access details operation supports tag-based access control via resource tags applied to the resource identified by instance name . For more information, see the Amazon Lightsail Developer Guide .
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',
'hostKeys': [
{
'algorithm': 'string',
'publicKey': 'string',
'witnessedAt': datetime(2015, 1, 1),
'fingerprintSHA1': 'string',
'fingerprintSHA256': 'string',
'notValidBefore': datetime(2015, 1, 1),
'notValidAfter': datetime(2015, 1, 1)
},
]
}
}
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.
hostKeys (list) --
Describes the public SSH host keys or the RDP certificate.
(dict) --
Describes the public SSH host keys or the RDP certificate.
algorithm (string) --
The SSH host key algorithm or the RDP certificate format.
For SSH host keys, the algorithm may be ssh-rsa , ecdsa-sha2-nistp256 , ssh-ed25519 , etc. For RDP certificates, the algorithm is always x509-cert .
publicKey (string) --
The public SSH host key or the RDP certificate.
witnessedAt (datetime) --
The time that the SSH host key or RDP certificate was recorded by Lightsail.
fingerprintSHA1 (string) --
The SHA-1 fingerprint of the returned SSH host key or RDP certificate.
fingerprintSHA256 (string) --
The SHA-256 fingerprint of the returned SSH host key or RDP certificate.
notValidBefore (datetime) --
The returned RDP certificate is valid after this point in time.
This value is listed only for RDP certificates.
notValidAfter (datetime) --
The returned RDP certificate is not valid after this point in time.
This value is listed only for RDP certificates.
Exceptions
Returns the data points for the specified Amazon Lightsail instance metric, given an instance name.
Metrics report the utilization of your resources, and the error counts generated by them. Monitor and collect metric data regularly to maintain the reliability, availability, and performance of your resources.
See also: AWS API Documentation
Request Syntax
response = client.get_instance_metric_data(
instanceName='string',
metricName='CPUUtilization'|'NetworkIn'|'NetworkOut'|'StatusCheckFailed'|'StatusCheckFailed_Instance'|'StatusCheckFailed_System'|'BurstCapacityTime'|'BurstCapacityPercentage',
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 for which you want to return information.
Valid instance metric names are listed below, along with the most useful statistics to include in your request, and the published unit value.
[REQUIRED]
The granularity, in seconds, of the returned data points.
The StatusCheckFailed , StatusCheckFailed_Instance , and StatusCheckFailed_System instance metric data is available in 1-minute (60 seconds) granularity. All other instance metric data is available in 5-minute (300 seconds) granularity.
[REQUIRED]
The start time of the time period.
[REQUIRED]
The end time of the time period.
[REQUIRED]
The unit for the metric data request. Valid units depend on the metric data being requested. For the valid units to specify with each available metric, see the metricName parameter.
[REQUIRED]
The statistic for the metric.
The following statistics are available:
dict
Response Syntax
{
'metricName': 'CPUUtilization'|'NetworkIn'|'NetworkOut'|'StatusCheckFailed'|'StatusCheckFailed_Instance'|'StatusCheckFailed_System'|'BurstCapacityTime'|'BurstCapacityPercentage',
'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 name of the metric returned.
metricData (list) --
An array of objects that describe the metric data returned.
(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.
Exceptions
Returns the firewall port states for a specific Amazon Lightsail instance, the IP addresses allowed to connect to the instance through the ports, and the protocol.
See also: AWS API Documentation
Request Syntax
response = client.get_instance_port_states(
instanceName='string'
)
[REQUIRED]
The name of the instance for which to return firewall port states.
{
'portStates': [
{
'fromPort': 123,
'toPort': 123,
'protocol': 'tcp'|'all'|'udp'|'icmp',
'state': 'open'|'closed',
'cidrs': [
'string',
],
'ipv6Cidrs': [
'string',
],
'cidrListAliases': [
'string',
]
},
]
}
Response Structure
An array of objects that describe the firewall port states for the specified instance.
Describes open ports on an instance, the IP addresses allowed to connect to the instance through the ports, and the protocol.
The first port in a range of open ports on an instance.
Allowed ports:
The last port in a range of open ports on an instance.
Allowed ports:
The IP protocol name.
The name can be one of the following:
Specifies whether the instance port is open or closed .
Note
The port state for Lightsail instances is always open .
The IPv4 address, or range of IPv4 addresses (in CIDR notation) that are allowed to connect to an instance through the ports, and the protocol.
Note
The ipv6Cidrs parameter lists the IPv6 addresses that are allowed to connect to an instance.
For more information about CIDR block notation, see Classless Inter-Domain Routing on Wikipedia .
The IPv6 address, or range of IPv6 addresses (in CIDR notation) that are allowed to connect to an instance through the ports, and the protocol. Only devices with an IPv6 address can connect to an instance through IPv6; otherwise, IPv4 should be used.
Note
The cidrs parameter lists the IPv4 addresses that are allowed to connect to an instance.
For more information about CIDR block notation, see Classless Inter-Domain Routing on Wikipedia .
An alias that defines access for a preconfigured range of IP addresses.
The only alias currently supported is lightsail-connect , which allows IP addresses of the browser-based RDP/SSH client in the Lightsail console to connect to your instance.
Exceptions
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-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'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-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'addOns': [
{
'name': 'string',
'status': 'string',
'snapshotTimeOfDay': 'string',
'nextSnapshotTimeOfDay': 'string'
},
],
'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',
'isFromAutoSnapshot': True|False,
'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 tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The state the snapshot is in.
The progress of the snapshot.
Note
This is populated only for disk snapshots, and is null for instance snapshots.
An array of disk objects containing information about all block storage disks.
Describes a 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 tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
An array of objects representing the add-ons enabled on the disk.
Describes an add-on that is enabled for an Amazon Lightsail resource.
The name of the add-on.
The status of the add-on.
The daily time when an automatic snapshot is created.
The time shown is in HH:00 format, and in Coordinated Universal Time (UTC).
The snapshot is automatically created between the time shown and up to 45 minutes after.
The next daily time an automatic snapshot will be created.
The time shown is in HH:00 format, and in Coordinated Universal Time (UTC).
The snapshot is automatically created between the time shown and up to 45 minutes after.
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 ).
A Boolean value indicating whether the snapshot was created from an automatic snapshot.
The size in GB of the SSD.
Exceptions
Returns all instance snapshots for the user's account.
See also: AWS API Documentation
Request Syntax
response = client.get_instance_snapshots(
pageToken='string'
)
The token to advance to the next page of results from your request.
To get a page token, perform an initial GetInstanceSnapshots request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.
{
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'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-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'addOns': [
{
'name': 'string',
'status': 'string',
'snapshotTimeOfDay': 'string',
'nextSnapshotTimeOfDay': 'string'
},
],
'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',
'isFromAutoSnapshot': True|False,
'sizeInGb': 123
},
],
'nextPageToken': 'string'
}
Response Structure
An array of key-value pairs containing information about the results of your get instance snapshots request.
Describes an instance snapshot.
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 tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The state the snapshot is in.
The progress of the snapshot.
Note
This is populated only for disk snapshots, and is null for instance snapshots.
An array of disk objects containing information about all block storage disks.
Describes a 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 tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
An array of objects representing the add-ons enabled on the disk.
Describes an add-on that is enabled for an Amazon Lightsail resource.
The name of the add-on.
The status of the add-on.
The daily time when an automatic snapshot is created.
The time shown is in HH:00 format, and in Coordinated Universal Time (UTC).
The snapshot is automatically created between the time shown and up to 45 minutes after.
The next daily time an automatic snapshot will be created.
The time shown is in HH:00 format, and in Coordinated Universal Time (UTC).
The snapshot is automatically created between the time shown and up to 45 minutes after.
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 ).
A Boolean value indicating whether the snapshot was created from an automatic snapshot.
The size in GB of the SSD.
The token to advance to the next page of results from your request.
A next page token is not returned if there are no more results to display.
To get the next page of results, perform another GetInstanceSnapshots request and specify the next page token using the pageToken parameter.
Exceptions
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 ).
Exceptions
Returns information about all Amazon Lightsail virtual private servers, or instances .
See also: AWS API Documentation
Request Syntax
response = client.get_instances(
pageToken='string'
)
The token to advance to the next page of results from your request.
To get a page token, perform an initial GetInstances request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.
{
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'blueprintId': 'string',
'blueprintName': 'string',
'bundleId': 'string',
'addOns': [
{
'name': 'string',
'status': 'string',
'snapshotTimeOfDay': 'string',
'nextSnapshotTimeOfDay': 'string'
},
],
'isStaticIp': True|False,
'privateIpAddress': 'string',
'publicIpAddress': 'string',
'ipv6Addresses': [
'string',
],
'ipAddressType': 'dualstack'|'ipv4',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'addOns': [
{
'name': 'string',
'status': 'string',
'snapshotTimeOfDay': 'string',
'nextSnapshotTimeOfDay': 'string'
},
],
'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'|'icmp',
'accessFrom': 'string',
'accessType': 'Public'|'Private',
'commonName': 'string',
'accessDirection': 'inbound'|'outbound',
'cidrs': [
'string',
],
'ipv6Cidrs': [
'string',
],
'cidrListAliases': [
'string',
]
},
]
},
'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 ) in Unix time format.
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 tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
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 ).
An array of objects representing the add-ons enabled on the instance.
Describes an add-on that is enabled for an Amazon Lightsail resource.
The name of the add-on.
The status of the add-on.
The daily time when an automatic snapshot is created.
The time shown is in HH:00 format, and in Coordinated Universal Time (UTC).
The snapshot is automatically created between the time shown and up to 45 minutes after.
The next daily time an automatic snapshot will be created.
The time shown is in HH:00 format, and in Coordinated Universal Time (UTC).
The snapshot is automatically created between the time shown and up to 45 minutes after.
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 addresses of the instance.
The IP address type of the instance.
The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6.
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 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 tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
An array of objects representing the add-ons enabled on the disk.
Describes an add-on that is enabled for an Amazon Lightsail resource.
The name of the add-on.
The status of the add-on.
The daily time when an automatic snapshot is created.
The time shown is in HH:00 format, and in Coordinated Universal Time (UTC).
The snapshot is automatically created between the time shown and up to 45 minutes after.
The next daily time an automatic snapshot will be created.
The time shown is in HH:00 format, and in Coordinated Universal Time (UTC).
The snapshot is automatically created between the time shown and up to 45 minutes after.
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 ports for an Amazon Lightsail instance.
The first port in a range of open ports on an instance.
Allowed ports:
The last port in a range of open ports on an instance.
Allowed ports:
The IP protocol name.
The name can be one of the following:
The location from which access is allowed. For example, Anywhere (0.0.0.0/0) , or Custom if a specific IP address or range of IP addresses is allowed.
The type of access (Public or Private ).
The common name of the port information.
The access direction (inbound or outbound ).
Note
Lightsail currently supports only inbound access direction.
The IPv4 address, or range of IPv4 addresses (in CIDR notation) that are allowed to connect to an instance through the ports, and the protocol.
Note
The ipv6Cidrs parameter lists the IPv6 addresses that are allowed to connect to an instance.
For more information about CIDR block notation, see Classless Inter-Domain Routing on Wikipedia .
The IPv6 address, or range of IPv6 addresses (in CIDR notation) that are allowed to connect to an instance through the ports, and the protocol. Only devices with an IPv6 address can connect to an instance through IPv6; otherwise, IPv4 should be used.
Note
The cidrs parameter lists the IPv4 addresses that are allowed to connect to an instance.
For more information about CIDR block notation, see Classless Inter-Domain Routing on Wikipedia .
An alias that defines access for a preconfigured range of IP addresses.
The only alias currently supported is lightsail-connect , which allows IP addresses of the browser-based RDP/SSH client in the Lightsail console to connect to your instance.
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 ).
The token to advance to the next page of results from your request.
A next page token is not returned if there are no more results to display.
To get the next page of results, perform another GetInstances request and specify the next page token using the pageToken parameter.
Exceptions
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-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'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 tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The RSA fingerprint of the key pair.
Exceptions
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'
)
The token to advance to the next page of results from your request.
To get a page token, perform an initial GetKeyPairs request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.
{
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'fingerprint': 'string'
},
],
'nextPageToken': 'string'
}
Response Structure
An array of key-value pairs containing information about the key pairs.
Describes an 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 tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The RSA fingerprint of the key pair.
The token to advance to the next page of results from your request.
A next page token is not returned if there are no more results to display.
To get the next page of results, perform another GetKeyPairs request and specify the next page token using the pageToken parameter.
Exceptions
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-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'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'
},
'ipAddressType': 'dualstack'|'ipv4'
}
}
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 tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
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.
The IP address type of the load balancer.
The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6.
Exceptions
Returns information about health metrics for your Lightsail load balancer.
Metrics report the utilization of your resources, and the error counts generated by them. Monitor and collect metric data regularly to maintain the reliability, availability, and performance of your resources.
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 for which you want to return information.
Valid load balancer metric names are listed below, along with the most useful statistics to include in your request, and the published unit value.
[REQUIRED]
The granularity, in seconds, of the returned data points.
[REQUIRED]
The start time of the period.
[REQUIRED]
The end time of the period.
[REQUIRED]
The unit for the metric data request. Valid units depend on the metric data being requested. For the valid units with each available metric, see the metricName parameter.
[REQUIRED]
The statistic for the metric.
The following statistics are available:
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 name of the metric returned.
metricData (list) --
An array of objects that describe the metric data returned.
(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.
Exceptions
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-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'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 tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
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 validation 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 validation failure reason, if any, of the certificate.
The following failure reasons are possible:
Note
You cannot request a certificate for Amazon-owned domain names such as those ending in amazonaws.com, cloudfront.net, or elasticbeanstalk.com.
The time when the SSL/TLS certificate was issued.
The issuer of the certificate.
The algorithm 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 that describes the status of the certificate renewal managed by Lightsail.
The renewal status of the certificate.
The following renewal status are possible:
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. This value is present only when the certificate status is REVOKED .
The timestamp when the certificate was revoked. This value is present only when the certificate status is 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.
An array of strings that specify the alternate domains (e.g., example2.com ) and subdomains (e.g., blog.example.com ) for the certificate.
Exceptions
Returns information about all load balancers in an account.
See also: AWS API Documentation
Request Syntax
response = client.get_load_balancers(
pageToken='string'
)
The token to advance to the next page of results from your request.
To get a page token, perform an initial GetLoadBalancers request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.
{
'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-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'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'
},
'ipAddressType': 'dualstack'|'ipv4'
},
],
'nextPageToken': 'string'
}
Response Structure
An array of LoadBalancer objects describing your load balancers.
Describes a 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 tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
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.
The IP address type of the load balancer.
The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6.
The token to advance to the next page of results from your request.
A next page token is not returned if there are no more results to display.
To get the next page of results, perform another GetLoadBalancers request and specify the next page token using the pageToken parameter.
Exceptions
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': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request.
The ID of the operation.
The resource name.
The resource type.
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
The AWS 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.
Exceptions
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'
)
The token to advance to the next page of results from your request.
To get a page token, perform an initial GetOperations request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
],
'nextPageToken': 'string'
}
Response Structure
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
The token to advance to the next page of results from your request.
A next page token is not returned if there are no more results to display.
To get the next page of results, perform another GetOperations request and specify the next page token using the pageToken parameter.
Exceptions
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.
The token to advance to the next page of results from your request.
To get a page token, perform an initial GetOperationsForResource request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'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 objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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 next page token parameter instead.
nextPageToken (string) --
The token to advance to the next page of results from your request.
A next page token is not returned if there are no more results to display.
To get the next page of results, perform another GetOperationsForResource request and specify the next page token using the pageToken parameter.
Exceptions
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,
includeRelationalDatabaseAvailabilityZones=True|False
)
dict
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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1',
'availabilityZones': [
{
'zoneName': 'string',
'state': 'string'
},
],
'relationalDatabaseAvailabilityZones': [
{
'zoneName': 'string',
'state': 'string'
},
]
},
]
}
Response Structure
(dict) --
regions (list) --
An array of key-value pairs containing information about your get regions request.
(dict) --
Describes the AWS Region.
continentCode (string) --
The continent code (e.g., NA , meaning North America).
description (string) --
The description of the AWS Region (e.g., This region is recommended to serve users in the eastern United States and eastern Canada ).
displayName (string) --
The display name (e.g., Ohio ).
name (string) --
The region name (e.g., us-east-2 ).
availabilityZones (list) --
The Availability Zones. Follows the format us-east-2a (case-sensitive).
(dict) --
Describes an Availability Zone.
zoneName (string) --
The name of the Availability Zone. The format is us-east-2a (case-sensitive).
state (string) --
The state of the Availability Zone.
relationalDatabaseAvailabilityZones (list) --
The Availability Zones for databases. Follows the format us-east-2a (case-sensitive).
(dict) --
Describes an Availability Zone.
zoneName (string) --
The name of the Availability Zone. The format is us-east-2a (case-sensitive).
state (string) --
The state of the Availability Zone.
Exceptions
Returns information about a specific database in Amazon Lightsail.
See also: AWS API Documentation
Request Syntax
response = client.get_relational_database(
relationalDatabaseName='string'
)
[REQUIRED]
The name of the database that you are looking up.
{
'relationalDatabase': {
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'relationalDatabaseBlueprintId': 'string',
'relationalDatabaseBundleId': 'string',
'masterDatabaseName': 'string',
'hardware': {
'cpuCount': 123,
'diskSizeInGb': 123,
'ramSizeInGb': ...
},
'state': 'string',
'secondaryAvailabilityZone': 'string',
'backupRetentionEnabled': True|False,
'pendingModifiedValues': {
'masterUserPassword': 'string',
'engineVersion': 'string',
'backupRetentionEnabled': True|False
},
'engine': 'string',
'engineVersion': 'string',
'latestRestorableTime': datetime(2015, 1, 1),
'masterUsername': 'string',
'parameterApplyStatus': 'string',
'preferredBackupWindow': 'string',
'preferredMaintenanceWindow': 'string',
'publiclyAccessible': True|False,
'masterEndpoint': {
'port': 123,
'address': 'string'
},
'pendingMaintenanceActions': [
{
'action': 'string',
'description': 'string',
'currentApplyDate': datetime(2015, 1, 1)
},
],
'caCertificateIdentifier': 'string'
}
}
Response Structure
An object describing the specified database.
The unique name of the database resource in Lightsail.
The Amazon Resource Name (ARN) of the database.
The support code for the database. Include this code in your email to support when you have questions about a database in Lightsail. This code enables our support team to look up your Lightsail information more easily.
The timestamp when the database was created. Formatted in Unix time.
The Region name and Availability Zone where the database is located.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The Lightsail resource type for the database (for example, RelationalDatabase ).
The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The blueprint ID for the database. A blueprint describes the major engine version of a database.
The bundle ID for the database. A bundle describes the performance specifications for your database.
The name of the master database created when the Lightsail database resource is created.
Describes the hardware of the database.
The number of vCPUs for the database.
The size of the disk for the database.
The amount of RAM in GB for the database.
Describes the current state of the database.
Describes the secondary Availability Zone of a high availability database.
The secondary database is used for failover support of a high availability database.
A Boolean value indicating whether automated backup retention is enabled for the database.
Describes pending database value modifications.
The password for the master user of the database.
The database engine version.
A Boolean value indicating whether automated backup retention is enabled.
The database software (for example, MySQL ).
The database engine version (for example, 5.7.23 ).
The latest point in time to which the database can be restored. Formatted in Unix time.
The master user name of the database.
The status of parameter updates for the database.
The daily time range during which automated backups are created for the database (for example, 16:00-16:30 ).
The weekly time range during which system maintenance can occur on the database.
In the format ddd:hh24:mi-ddd:hh24:mi . For example, Tue:17:00-Tue:17:30 .
A Boolean value indicating whether the database is publicly accessible.
The master endpoint for the database.
Specifies the port that the database is listening on.
Specifies the DNS address of the database.
Describes the pending maintenance actions for the database.
Describes a pending database maintenance action.
The type of pending database maintenance action.
Additional detail about the pending database maintenance action.
The effective date of the pending database maintenance action.
The certificate associated with the database.
Exceptions
Returns a list of available database blueprints in Amazon Lightsail. A blueprint describes the major engine version of a database.
You can use a blueprint ID to create a new database that runs a specific database engine.
See also: AWS API Documentation
Request Syntax
response = client.get_relational_database_blueprints(
pageToken='string'
)
The token to advance to the next page of results from your request.
To get a page token, perform an initial GetRelationalDatabaseBlueprints request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.
{
'blueprints': [
{
'blueprintId': 'string',
'engine': 'mysql',
'engineVersion': 'string',
'engineDescription': 'string',
'engineVersionDescription': 'string',
'isEngineDefault': True|False
},
],
'nextPageToken': 'string'
}
Response Structure
An object describing the result of your get relational database blueprints request.
Describes a database image, or blueprint. A blueprint describes the major engine version of a database.
The ID for the database blueprint.
The database software of the database blueprint (for example, MySQL ).
The database engine version for the database blueprint (for example, 5.7.23 ).
The description of the database engine for the database blueprint.
The description of the database engine version for the database blueprint.
A Boolean value indicating whether the engine version is the default for the database blueprint.
The token to advance to the next page of results from your request.
A next page token is not returned if there are no more results to display.
To get the next page of results, perform another GetRelationalDatabaseBlueprints request and specify the next page token using the pageToken parameter.
Exceptions
Returns the list of bundles that are available in Amazon Lightsail. A bundle describes the performance specifications for a database.
You can use a bundle ID to create a new database with explicit performance specifications.
See also: AWS API Documentation
Request Syntax
response = client.get_relational_database_bundles(
pageToken='string'
)
The token to advance to the next page of results from your request.
To get a page token, perform an initial GetRelationalDatabaseBundles request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.
{
'bundles': [
{
'bundleId': 'string',
'name': 'string',
'price': ...,
'ramSizeInGb': ...,
'diskSizeInGb': 123,
'transferPerMonthInGb': 123,
'cpuCount': 123,
'isEncrypted': True|False,
'isActive': True|False
},
],
'nextPageToken': 'string'
}
Response Structure
An object describing the result of your get relational database bundles request.
Describes a database bundle. A bundle describes the performance specifications of the database.
The ID for the database bundle.
The name for the database bundle.
The cost of the database bundle in US currency.
The amount of RAM in GB (for example, 2.0 ) for the database bundle.
The size of the disk for the database bundle.
The data transfer rate per month in GB for the database bundle.
The number of virtual CPUs (vCPUs) for the database bundle.
A Boolean value indicating whether the database bundle is encrypted.
A Boolean value indicating whether the database bundle is active.
The token to advance to the next page of results from your request.
A next page token is not returned if there are no more results to display.
To get the next page of results, perform another GetRelationalDatabaseBundles request and specify the next page token using the pageToken parameter.
Exceptions
Returns a list of events for a specific database in Amazon Lightsail.
See also: AWS API Documentation
Request Syntax
response = client.get_relational_database_events(
relationalDatabaseName='string',
durationInMinutes=123,
pageToken='string'
)
[REQUIRED]
The name of the database from which to get events.
The number of minutes in the past from which to retrieve events. For example, to get all events from the past 2 hours, enter 120.
Default: 60
The minimum is 1 and the maximum is 14 days (20160 minutes).
The token to advance to the next page of results from your request.
To get a page token, perform an initial GetRelationalDatabaseEvents request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.
dict
Response Syntax
{
'relationalDatabaseEvents': [
{
'resource': 'string',
'createdAt': datetime(2015, 1, 1),
'message': 'string',
'eventCategories': [
'string',
]
},
],
'nextPageToken': 'string'
}
Response Structure
(dict) --
relationalDatabaseEvents (list) --
An object describing the result of your get relational database events request.
(dict) --
Describes an event for a database.
resource (string) --
The database that the database event relates to.
createdAt (datetime) --
The timestamp when the database event was created.
message (string) --
The message of the database event.
eventCategories (list) --
The category that the database event belongs to.
nextPageToken (string) --
The token to advance to the next page of results from your request.
A next page token is not returned if there are no more results to display.
To get the next page of results, perform another GetRelationalDatabaseEvents request and specify the next page token using the pageToken parameter.
Exceptions
Returns a list of log events for a database in Amazon Lightsail.
See also: AWS API Documentation
Request Syntax
response = client.get_relational_database_log_events(
relationalDatabaseName='string',
logStreamName='string',
startTime=datetime(2015, 1, 1),
endTime=datetime(2015, 1, 1),
startFromHead=True|False,
pageToken='string'
)
[REQUIRED]
The name of your database for which to get log events.
[REQUIRED]
The name of the log stream.
Use the get relational database log streams operation to get a list of available log streams.
The start of the time interval from which to get log events.
Constraints:
The end of the time interval from which to get log events.
Constraints:
Parameter to specify if the log should start from head or tail. If true is specified, the log event starts from the head of the log. If false is specified, the log event starts from the tail of the log.
Note
For PostgreSQL, the default value of false is the only option available.
The token to advance to the next or previous page of results from your request.
To get a page token, perform an initial GetRelationalDatabaseLogEvents request. If your results are paginated, the response will return a next forward token and/or next backward token that you can specify as the page token in a subsequent request.
dict
Response Syntax
{
'resourceLogEvents': [
{
'createdAt': datetime(2015, 1, 1),
'message': 'string'
},
],
'nextBackwardToken': 'string',
'nextForwardToken': 'string'
}
Response Structure
(dict) --
resourceLogEvents (list) --
An object describing the result of your get relational database log events request.
(dict) --
Describes a database log event.
createdAt (datetime) --
The timestamp when the database log event was created.
message (string) --
The message of the database log event.
nextBackwardToken (string) --
A token used for advancing to the previous page of results from your get relational database log events request.
nextForwardToken (string) --
A token used for advancing to the next page of results from your get relational database log events request.
Exceptions
Returns a list of available log streams for a specific database in Amazon Lightsail.
See also: AWS API Documentation
Request Syntax
response = client.get_relational_database_log_streams(
relationalDatabaseName='string'
)
[REQUIRED]
The name of your database for which to get log streams.
{
'logStreams': [
'string',
]
}
Response Structure
An object describing the result of your get relational database log streams request.
Exceptions
Returns the current, previous, or pending versions of the master user password for a Lightsail database.
The GetRelationalDatabaseMasterUserPassword operation supports tag-based access control via resource tags applied to the resource identified by relationalDatabaseName.
See also: AWS API Documentation
Request Syntax
response = client.get_relational_database_master_user_password(
relationalDatabaseName='string',
passwordVersion='CURRENT'|'PREVIOUS'|'PENDING'
)
[REQUIRED]
The name of your database for which to get the master user password.
The password version to return.
Specifying CURRENT or PREVIOUS returns the current or previous passwords respectively. Specifying PENDING returns the newest version of the password that will rotate to CURRENT . After the PENDING password rotates to CURRENT , the PENDING password is no longer available.
Default: CURRENT
dict
Response Syntax
{
'masterUserPassword': 'string',
'createdAt': datetime(2015, 1, 1)
}
Response Structure
(dict) --
masterUserPassword (string) --
The master user password for the password version specified.
createdAt (datetime) --
The timestamp when the specified version of the master user password was created.
Exceptions
Returns the data points of the specified metric for a database in Amazon Lightsail.
Metrics report the utilization of your resources, and the error counts generated by them. Monitor and collect metric data regularly to maintain the reliability, availability, and performance of your resources.
See also: AWS API Documentation
Request Syntax
response = client.get_relational_database_metric_data(
relationalDatabaseName='string',
metricName='CPUUtilization'|'DatabaseConnections'|'DiskQueueDepth'|'FreeStorageSpace'|'NetworkReceiveThroughput'|'NetworkTransmitThroughput',
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 your database from which to get metric data.
[REQUIRED]
The metric for which you want to return information.
Valid relational database metric names are listed below, along with the most useful statistics to include in your request, and the published unit value. All relational database metric data is available in 1-minute (60 seconds) granularity.
[REQUIRED]
The granularity, in seconds, of the returned data points.
All relational database metric data is available in 1-minute (60 seconds) granularity.
[REQUIRED]
The start of the time interval from which to get metric data.
Constraints:
[REQUIRED]
The end of the time interval from which to get metric data.
Constraints:
[REQUIRED]
The unit for the metric data request. Valid units depend on the metric data being requested. For the valid units with each available metric, see the metricName parameter.
[REQUIRED]
The statistic for the metric.
The following statistics are available:
dict
Response Syntax
{
'metricName': 'CPUUtilization'|'DatabaseConnections'|'DiskQueueDepth'|'FreeStorageSpace'|'NetworkReceiveThroughput'|'NetworkTransmitThroughput',
'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 name of the metric returned.
metricData (list) --
An array of objects that describe the metric data returned.
(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.
Exceptions
Returns all of the runtime parameters offered by the underlying database software, or engine, for a specific database in Amazon Lightsail.
In addition to the parameter names and values, this operation returns other information about each parameter. This information includes whether changes require a reboot, whether the parameter is modifiable, the allowed values, and the data types.
See also: AWS API Documentation
Request Syntax
response = client.get_relational_database_parameters(
relationalDatabaseName='string',
pageToken='string'
)
[REQUIRED]
The name of your database for which to get parameters.
The token to advance to the next page of results from your request.
To get a page token, perform an initial GetRelationalDatabaseParameters request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.
dict
Response Syntax
{
'parameters': [
{
'allowedValues': 'string',
'applyMethod': 'string',
'applyType': 'string',
'dataType': 'string',
'description': 'string',
'isModifiable': True|False,
'parameterName': 'string',
'parameterValue': 'string'
},
],
'nextPageToken': 'string'
}
Response Structure
(dict) --
parameters (list) --
An object describing the result of your get relational database parameters request.
(dict) --
Describes the parameters of a database.
allowedValues (string) --
Specifies the valid range of values for the parameter.
applyMethod (string) --
Indicates when parameter updates are applied.
Can be immediate or pending-reboot .
applyType (string) --
Specifies the engine-specific parameter type.
dataType (string) --
Specifies the valid data type for the parameter.
description (string) --
Provides a description of the parameter.
isModifiable (boolean) --
A Boolean value indicating whether the parameter can be modified.
parameterName (string) --
Specifies the name of the parameter.
parameterValue (string) --
Specifies the value of the parameter.
nextPageToken (string) --
The token to advance to the next page of results from your request.
A next page token is not returned if there are no more results to display.
To get the next page of results, perform another GetRelationalDatabaseParameters request and specify the next page token using the pageToken parameter.
Exceptions
Returns information about a specific database snapshot in Amazon Lightsail.
See also: AWS API Documentation
Request Syntax
response = client.get_relational_database_snapshot(
relationalDatabaseSnapshotName='string'
)
[REQUIRED]
The name of the database snapshot for which to get information.
{
'relationalDatabaseSnapshot': {
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'engine': 'string',
'engineVersion': 'string',
'sizeInGb': 123,
'state': 'string',
'fromRelationalDatabaseName': 'string',
'fromRelationalDatabaseArn': 'string',
'fromRelationalDatabaseBundleId': 'string',
'fromRelationalDatabaseBlueprintId': 'string'
}
}
Response Structure
An object describing the specified database snapshot.
The name of the database snapshot.
The Amazon Resource Name (ARN) of the database snapshot.
The support code for the database snapshot. Include this code in your email to support when you have questions about a database snapshot in Lightsail. This code enables our support team to look up your Lightsail information more easily.
The timestamp when the database snapshot was created.
The Region name and Availability Zone where the database snapshot is located.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The Lightsail resource type.
The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The software of the database snapshot (for example, MySQL )
The database engine version for the database snapshot (for example, 5.7.23 ).
The size of the disk in GB (for example, 32 ) for the database snapshot.
The state of the database snapshot.
The name of the source database from which the database snapshot was created.
The Amazon Resource Name (ARN) of the database from which the database snapshot was created.
The bundle ID of the database from which the database snapshot was created.
The blueprint ID of the database from which the database snapshot was created. A blueprint describes the major engine version of a database.
Exceptions
Returns information about all of your database snapshots in Amazon Lightsail.
See also: AWS API Documentation
Request Syntax
response = client.get_relational_database_snapshots(
pageToken='string'
)
The token to advance to the next page of results from your request.
To get a page token, perform an initial GetRelationalDatabaseSnapshots request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.
{
'relationalDatabaseSnapshots': [
{
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'engine': 'string',
'engineVersion': 'string',
'sizeInGb': 123,
'state': 'string',
'fromRelationalDatabaseName': 'string',
'fromRelationalDatabaseArn': 'string',
'fromRelationalDatabaseBundleId': 'string',
'fromRelationalDatabaseBlueprintId': 'string'
},
],
'nextPageToken': 'string'
}
Response Structure
An object describing the result of your get relational database snapshots request.
Describes a database snapshot.
The name of the database snapshot.
The Amazon Resource Name (ARN) of the database snapshot.
The support code for the database snapshot. Include this code in your email to support when you have questions about a database snapshot in Lightsail. This code enables our support team to look up your Lightsail information more easily.
The timestamp when the database snapshot was created.
The Region name and Availability Zone where the database snapshot is located.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The Lightsail resource type.
The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The software of the database snapshot (for example, MySQL )
The database engine version for the database snapshot (for example, 5.7.23 ).
The size of the disk in GB (for example, 32 ) for the database snapshot.
The state of the database snapshot.
The name of the source database from which the database snapshot was created.
The Amazon Resource Name (ARN) of the database from which the database snapshot was created.
The bundle ID of the database from which the database snapshot was created.
The blueprint ID of the database from which the database snapshot was created. A blueprint describes the major engine version of a database.
The token to advance to the next page of results from your request.
A next page token is not returned if there are no more results to display.
To get the next page of results, perform another GetRelationalDatabaseSnapshots request and specify the next page token using the pageToken parameter.
Exceptions
Returns information about all of your databases in Amazon Lightsail.
See also: AWS API Documentation
Request Syntax
response = client.get_relational_databases(
pageToken='string'
)
The token to advance to the next page of results from your request.
To get a page token, perform an initial GetRelationalDatabases request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.
{
'relationalDatabases': [
{
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'relationalDatabaseBlueprintId': 'string',
'relationalDatabaseBundleId': 'string',
'masterDatabaseName': 'string',
'hardware': {
'cpuCount': 123,
'diskSizeInGb': 123,
'ramSizeInGb': ...
},
'state': 'string',
'secondaryAvailabilityZone': 'string',
'backupRetentionEnabled': True|False,
'pendingModifiedValues': {
'masterUserPassword': 'string',
'engineVersion': 'string',
'backupRetentionEnabled': True|False
},
'engine': 'string',
'engineVersion': 'string',
'latestRestorableTime': datetime(2015, 1, 1),
'masterUsername': 'string',
'parameterApplyStatus': 'string',
'preferredBackupWindow': 'string',
'preferredMaintenanceWindow': 'string',
'publiclyAccessible': True|False,
'masterEndpoint': {
'port': 123,
'address': 'string'
},
'pendingMaintenanceActions': [
{
'action': 'string',
'description': 'string',
'currentApplyDate': datetime(2015, 1, 1)
},
],
'caCertificateIdentifier': 'string'
},
],
'nextPageToken': 'string'
}
Response Structure
An object describing the result of your get relational databases request.
Describes a database.
The unique name of the database resource in Lightsail.
The Amazon Resource Name (ARN) of the database.
The support code for the database. Include this code in your email to support when you have questions about a database in Lightsail. This code enables our support team to look up your Lightsail information more easily.
The timestamp when the database was created. Formatted in Unix time.
The Region name and Availability Zone where the database is located.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The Lightsail resource type for the database (for example, RelationalDatabase ).
The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The blueprint ID for the database. A blueprint describes the major engine version of a database.
The bundle ID for the database. A bundle describes the performance specifications for your database.
The name of the master database created when the Lightsail database resource is created.
Describes the hardware of the database.
The number of vCPUs for the database.
The size of the disk for the database.
The amount of RAM in GB for the database.
Describes the current state of the database.
Describes the secondary Availability Zone of a high availability database.
The secondary database is used for failover support of a high availability database.
A Boolean value indicating whether automated backup retention is enabled for the database.
Describes pending database value modifications.
The password for the master user of the database.
The database engine version.
A Boolean value indicating whether automated backup retention is enabled.
The database software (for example, MySQL ).
The database engine version (for example, 5.7.23 ).
The latest point in time to which the database can be restored. Formatted in Unix time.
The master user name of the database.
The status of parameter updates for the database.
The daily time range during which automated backups are created for the database (for example, 16:00-16:30 ).
The weekly time range during which system maintenance can occur on the database.
In the format ddd:hh24:mi-ddd:hh24:mi . For example, Tue:17:00-Tue:17:30 .
A Boolean value indicating whether the database is publicly accessible.
The master endpoint for the database.
Specifies the port that the database is listening on.
Specifies the DNS address of the database.
Describes the pending maintenance actions for the database.
Describes a pending database maintenance action.
The type of pending database maintenance action.
Additional detail about the pending database maintenance action.
The effective date of the pending database maintenance action.
The certificate associated with the database.
The token to advance to the next page of results from your request.
A next page token is not returned if there are no more results to display.
To get the next page of results, perform another GetRelationalDatabases request and specify the next page token using the pageToken parameter.
Exceptions
Returns information about an Amazon Lightsail 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-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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.
Exceptions
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'
)
The token to advance to the next page of results from your request.
To get a page token, perform an initial GetStaticIps request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.
{
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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 a 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.
The token to advance to the next page of results from your request.
A next page token is not returned if there are no more results to display.
To get the next page of results, perform another GetStaticIps request and specify the next page token using the pageToken parameter.
Exceptions
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': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
(dict) --
operation (dict) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
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 .
Exceptions
Opens ports for a specific Amazon Lightsail instance, and specifies the IP addresses allowed to connect to the instance through the ports, and the protocol.
The OpenInstancePublicPorts action supports tag-based access control via resource tags applied to the resource identified by instanceName . For more information, see the Amazon Lightsail Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.open_instance_public_ports(
portInfo={
'fromPort': 123,
'toPort': 123,
'protocol': 'tcp'|'all'|'udp'|'icmp',
'cidrs': [
'string',
],
'ipv6Cidrs': [
'string',
],
'cidrListAliases': [
'string',
]
},
instanceName='string'
)
[REQUIRED]
An object to describe the ports to open for the specified instance.
The first port in a range of open ports on an instance.
Allowed ports:
The last port in a range of open ports on an instance.
Allowed ports:
The IP protocol name.
The name can be one of the following:
The IPv4 address, or range of IPv4 addresses (in CIDR notation) that are allowed to connect to an instance through the ports, and the protocol.
Note
The ipv6Cidrs parameter lists the IPv6 addresses that are allowed to connect to an instance.
Examples:
For more information about CIDR block notation, see Classless Inter-Domain Routing on Wikipedia .
The IPv6 address, or range of IPv6 addresses (in CIDR notation) that are allowed to connect to an instance through the ports, and the protocol. Only devices with an IPv6 address can connect to an instance through IPv6; otherwise, IPv4 should be used.
Note
The cidrs parameter lists the IPv4 addresses that are allowed to connect to an instance.
For more information about CIDR block notation, see Classless Inter-Domain Routing on Wikipedia .
An alias that defines access for a preconfigured range of IP addresses.
The only alias currently supported is lightsail-connect , which allows IP addresses of the browser-based RDP/SSH client in the Lightsail console to connect to your instance.
[REQUIRED]
The name of the instance for which to open ports.
dict
Response Syntax
{
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
(dict) --
operation (dict) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Peers 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': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request.
The ID of the operation.
The resource name.
The resource type.
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
The AWS 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.
Exceptions
Creates or updates an alarm, and associates it with the specified metric.
An alarm is used to monitor a single metric for one of your resources. When a metric condition is met, the alarm can notify you by email, SMS text message, and a banner displayed on the Amazon Lightsail console. For more information, see Alarms in Amazon Lightsail .
When this action creates an alarm, the alarm state is immediately set to INSUFFICIENT_DATA . The alarm is then evaluated and its state is set appropriately. Any actions associated with the new state are then executed.
When you update an existing alarm, its state is left unchanged, but the update completely overwrites the previous configuration of the alarm. The alarm is then evaluated with the updated configuration.
See also: AWS API Documentation
Request Syntax
response = client.put_alarm(
alarmName='string',
metricName='CPUUtilization'|'NetworkIn'|'NetworkOut'|'StatusCheckFailed'|'StatusCheckFailed_Instance'|'StatusCheckFailed_System'|'ClientTLSNegotiationErrorCount'|'HealthyHostCount'|'UnhealthyHostCount'|'HTTPCode_LB_4XX_Count'|'HTTPCode_LB_5XX_Count'|'HTTPCode_Instance_2XX_Count'|'HTTPCode_Instance_3XX_Count'|'HTTPCode_Instance_4XX_Count'|'HTTPCode_Instance_5XX_Count'|'InstanceResponseTime'|'RejectedConnectionCount'|'RequestCount'|'DatabaseConnections'|'DiskQueueDepth'|'FreeStorageSpace'|'NetworkReceiveThroughput'|'NetworkTransmitThroughput'|'BurstCapacityTime'|'BurstCapacityPercentage',
monitoredResourceName='string',
comparisonOperator='GreaterThanOrEqualToThreshold'|'GreaterThanThreshold'|'LessThanThreshold'|'LessThanOrEqualToThreshold',
threshold=123.0,
evaluationPeriods=123,
datapointsToAlarm=123,
treatMissingData='breaching'|'notBreaching'|'ignore'|'missing',
contactProtocols=[
'Email'|'SMS',
],
notificationTriggers=[
'OK'|'ALARM'|'INSUFFICIENT_DATA',
],
notificationEnabled=True|False
)
[REQUIRED]
The name for the alarm. Specify the name of an existing alarm to update, and overwrite the previous configuration of the alarm.
[REQUIRED]
The name of the metric to associate with the alarm.
You can configure up to two alarms per metric.
The following metrics are available for each resource type:
For more information about these metrics, see Metrics available in Lightsail .
[REQUIRED]
The name of the Lightsail resource that will be monitored.
Instances, load balancers, and relational databases are the only Lightsail resources that can currently be monitored by alarms.
[REQUIRED]
The arithmetic operation to use when comparing the specified statistic to the threshold. The specified statistic value is used as the first operand.
[REQUIRED]
The value against which the specified statistic is compared.
[REQUIRED]
The number of most recent periods over which data is compared to the specified threshold. If you are setting an "M out of N" alarm, this value (evaluationPeriods ) is the N.
If you are setting an alarm that requires that a number of consecutive data points be breaching to trigger the alarm, this value specifies the rolling period of time in which data points are evaluated.
Each evaluation period is five minutes long. For example, specify an evaluation period of 24 to evaluate a metric over a rolling period of two hours.
You can specify a minimum valuation period of 1 (5 minutes), and a maximum evaluation period of 288 (24 hours).
Sets how this alarm will handle missing data points.
An alarm can treat missing data in the following ways:
If treatMissingData is not specified, the default behavior of missing is used.
The contact protocols to use for the alarm, such as Email , SMS (text messaging), or both.
A notification is sent via the specified contact protocol if notifications are enabled for the alarm, and when the alarm is triggered.
A notification is not sent if a contact protocol is not specified, if the specified contact protocol is not configured in the AWS Region, or if notifications are not enabled for the alarm using the notificationEnabled paramater.
Use the CreateContactMethod action to configure a contact protocol in an AWS Region.
The alarm states that trigger a notification.
An alarm has the following possible states:
When you specify a notification trigger, the ALARM state must be specified. The INSUFFICIENT_DATA and OK states can be specified in addition to the ALARM state.
The notification trigger defaults to ALARM if you don't specify this parameter.
Indicates whether the alarm is enabled.
Notifications are enabled by default if you don't specify this parameter.
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Opens ports for a specific Amazon Lightsail instance, and specifies the IP addresses allowed to connect to the instance through the ports, and the protocol. This action also closes all currently open ports that are not included in the request. Include all of the ports and the protocols you want to open in your PutInstancePublicPorts request. Or use the OpenInstancePublicPorts action to open ports without closing currently open ports.
The PutInstancePublicPorts action supports tag-based access control via resource tags applied to the resource identified by instanceName . For more information, see the Amazon Lightsail Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.put_instance_public_ports(
portInfos=[
{
'fromPort': 123,
'toPort': 123,
'protocol': 'tcp'|'all'|'udp'|'icmp',
'cidrs': [
'string',
],
'ipv6Cidrs': [
'string',
],
'cidrListAliases': [
'string',
]
},
],
instanceName='string'
)
[REQUIRED]
An array of objects to describe the ports to open for the specified instance.
Describes ports to open on an instance, the IP addresses allowed to connect to the instance through the ports, and the protocol.
The first port in a range of open ports on an instance.
Allowed ports:
The last port in a range of open ports on an instance.
Allowed ports:
The IP protocol name.
The name can be one of the following:
The IPv4 address, or range of IPv4 addresses (in CIDR notation) that are allowed to connect to an instance through the ports, and the protocol.
Note
The ipv6Cidrs parameter lists the IPv6 addresses that are allowed to connect to an instance.
Examples:
For more information about CIDR block notation, see Classless Inter-Domain Routing on Wikipedia .
The IPv6 address, or range of IPv6 addresses (in CIDR notation) that are allowed to connect to an instance through the ports, and the protocol. Only devices with an IPv6 address can connect to an instance through IPv6; otherwise, IPv4 should be used.
Note
The cidrs parameter lists the IPv4 addresses that are allowed to connect to an instance.
For more information about CIDR block notation, see Classless Inter-Domain Routing on Wikipedia .
An alias that defines access for a preconfigured range of IP addresses.
The only alias currently supported is lightsail-connect , which allows IP addresses of the browser-based RDP/SSH client in the Lightsail console to connect to your instance.
[REQUIRED]
The name of the instance for which to open ports.
dict
Response Syntax
{
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
(dict) --
operation (dict) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Restarts a specific instance.
The reboot instance operation supports tag-based access control via resource tags applied to the resource identified by instance name . For more information, see the Amazon Lightsail Developer Guide .
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': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Restarts a specific database in Amazon Lightsail.
The reboot relational database operation supports tag-based access control via resource tags applied to the resource identified by relationalDatabaseName. For more information, see the Amazon Lightsail Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.reboot_relational_database(
relationalDatabaseName='string'
)
[REQUIRED]
The name of your database to reboot.
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Registers a container image to your Amazon Lightsail container service.
Note
This action is not required if you install and use the Lightsail Control (lightsailctl) plugin to push container images to your Lightsail container service. For more information, see Pushing and managing container images on your Amazon Lightsail container services in the Amazon Lightsail Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.register_container_image(
serviceName='string',
label='string',
digest='string'
)
[REQUIRED]
The name of the container service for which to register a container image.
[REQUIRED]
The label for the container image when it's registered to the container service.
Use a descriptive label that you can use to track the different versions of your registered container images.
Use the GetContainerImages action to return the container images registered to a Lightsail container service. The label is the <imagelabel> portion of the following image name example:
If the name of your container service is mycontainerservice , and the label that you specify is mystaticwebsite , then the name of the registered container image will be :mycontainerservice.mystaticwebsite.1 .
The number at the end of these image name examples represents the version of the registered container image. If you push and register another container image to the same Lightsail container service, with the same label, then the version number for the new registered container image will be 2 . If you push and register another container image, the version number will be 3 , and so on.
[REQUIRED]
The digest of the container image to be registered.
dict
Response Syntax
{
'containerImage': {
'image': 'string',
'digest': 'string',
'createdAt': datetime(2015, 1, 1)
}
}
Response Structure
(dict) --
containerImage (dict) --
Describes a container image that is registered to an Amazon Lightsail container service.
image (string) --
The name of the container image.
digest (string) --
The digest of the container image.
createdAt (datetime) --
The timestamp when the container image was created.
Exceptions
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': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Deletes currently cached content from your Amazon Lightsail content delivery network (CDN) distribution.
After resetting the cache, the next time a content request is made, your distribution pulls, serves, and caches it from the origin.
See also: AWS API Documentation
Request Syntax
response = client.reset_distribution_cache(
distributionName='string'
)
The name of the distribution for which to reset cache.
Use the GetDistributions action to get a list of distribution names that you can specify.
{
'status': 'string',
'createTime': datetime(2015, 1, 1),
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
The status of the reset cache request.
The timestamp of the reset cache request (e.g., 1479734909.17 ) in Unix time format.
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request.
The ID of the operation.
The resource name.
The resource type.
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
The AWS 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.
Exceptions
Sends a verification request to an email contact method to ensure it's owned by the requester. SMS contact methods don't need to be verified.
A contact method is used to send you notifications about your Amazon Lightsail resources. You can add one email address and one mobile phone number contact method in each AWS Region. However, SMS text messaging is not supported in some AWS Regions, and SMS text messages cannot be sent to some countries/regions. For more information, see Notifications in Amazon Lightsail .
A verification request is sent to the contact method when you initially create it. Use this action to send another verification request if a previous verification request was deleted, or has expired.
Warning
Notifications are not sent to an email contact method until after it is verified, and confirmed as valid.
See also: AWS API Documentation
Request Syntax
response = client.send_contact_method_verification(
protocol='Email'
)
[REQUIRED]
The protocol to verify, such as Email or SMS (text messaging).
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Sets the IP address type for an Amazon Lightsail resource.
Use this action to enable dual-stack for a resource, which enables IPv4 and IPv6 for the specified resource. Alternately, you can use this action to disable dual-stack, and enable IPv4 only.
See also: AWS API Documentation
Request Syntax
response = client.set_ip_address_type(
resourceType='ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
resourceName='string',
ipAddressType='dualstack'|'ipv4'
)
[REQUIRED]
The resource type.
The possible values are Distribution , Instance , and LoadBalancer .
Note
Distribution-related APIs are available only in the N. Virginia (us-east-1 ) AWS Region. Set your AWS Region configuration to us-east-1 to create, view, or edit distributions.
[REQUIRED]
The name of the resource for which to set the IP address type.
[REQUIRED]
The IP address type to set for the specified resource.
The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6.
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Sets the Amazon Lightsail resources that can access the specified Lightsail bucket.
Lightsail buckets currently support setting access for Lightsail instances in the same AWS Region.
See also: AWS API Documentation
Request Syntax
response = client.set_resource_access_for_bucket(
resourceName='string',
bucketName='string',
access='allow'|'deny'
)
[REQUIRED]
The name of the Lightsail instance for which to set bucket access. The instance must be in a running or stopped state.
[REQUIRED]
The name of the bucket for which to set access to another Lightsail resource.
[REQUIRED]
The access setting.
The following access settings are available:
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Starts a specific Amazon Lightsail instance from a stopped state. To restart an instance, use the reboot instance operation.
Note
When you start a stopped instance, Lightsail assigns a new public IP address to the instance. To use the same IP address after stopping and starting an instance, create a static IP address and attach it to the instance. For more information, see the Amazon Lightsail Developer Guide .
The start instance operation supports tag-based access control via resource tags applied to the resource identified by instance name . For more information, see the Amazon Lightsail Developer Guide .
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': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Starts a specific database from a stopped state in Amazon Lightsail. To restart a database, use the reboot relational database operation.
The start relational database operation supports tag-based access control via resource tags applied to the resource identified by relationalDatabaseName. For more information, see the Amazon Lightsail Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.start_relational_database(
relationalDatabaseName='string'
)
[REQUIRED]
The name of your database to start.
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Stops a specific Amazon Lightsail instance that is currently running.
Note
When you start a stopped instance, Lightsail assigns a new public IP address to the instance. To use the same IP address after stopping and starting an instance, create a static IP address and attach it to the instance. For more information, see the Amazon Lightsail Developer Guide .
The stop instance operation supports tag-based access control via resource tags applied to the resource identified by instance name . For more information, see the Amazon Lightsail Developer Guide .
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': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Stops a specific database that is currently running in Amazon Lightsail.
The stop relational database operation supports tag-based access control via resource tags applied to the resource identified by relationalDatabaseName. For more information, see the Amazon Lightsail Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.stop_relational_database(
relationalDatabaseName='string',
relationalDatabaseSnapshotName='string'
)
[REQUIRED]
The name of your database to stop.
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Adds one or more tags to the specified Amazon Lightsail resource. Each resource can have a maximum of 50 tags. Each tag consists of a key and an optional value. Tag keys must be unique per resource. For more information about tags, see the Amazon Lightsail Developer Guide .
The tag resource operation supports tag-based access control via request tags and resource tags applied to the resource identified by resource name . For more information, see the Amazon Lightsail Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.tag_resource(
resourceName='string',
resourceArn='string',
tags=[
{
'key': 'string',
'value': 'string'
},
]
)
[REQUIRED]
The name of the resource to which you are adding tags.
[REQUIRED]
The tag key and optional value.
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Tests an alarm by displaying a banner on the Amazon Lightsail console. If a notification trigger is configured for the specified alarm, the test also sends a notification to the notification protocol (Email and/or SMS ) configured for the alarm.
An alarm is used to monitor a single metric for one of your resources. When a metric condition is met, the alarm can notify you by email, SMS text message, and a banner displayed on the Amazon Lightsail console. For more information, see Alarms in Amazon Lightsail .
See also: AWS API Documentation
Request Syntax
response = client.test_alarm(
alarmName='string',
state='OK'|'ALARM'|'INSUFFICIENT_DATA'
)
[REQUIRED]
The name of the alarm to test.
[REQUIRED]
The alarm state to test.
An alarm has the following possible states that can be tested:
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Unpeers 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': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request.
The ID of the operation.
The resource name.
The resource type.
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
The AWS 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.
Exceptions
Deletes the specified set of tag keys and their values from the specified Amazon Lightsail resource.
The untag resource operation supports tag-based access control via request tags and resource tags applied to the resource identified by resource name . For more information, see the Amazon Lightsail Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.untag_resource(
resourceName='string',
resourceArn='string',
tagKeys=[
'string',
]
)
[REQUIRED]
The name of the resource from which you are removing a tag.
[REQUIRED]
The tag keys to delete from the specified resource.
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Updates an existing Amazon Lightsail bucket.
Use this action to update the configuration of an existing bucket, such as versioning, public accessibility, and the AWS accounts that can access the bucket.
See also: AWS API Documentation
Request Syntax
response = client.update_bucket(
bucketName='string',
accessRules={
'getObject': 'public'|'private',
'allowPublicOverrides': True|False
},
versioning='string',
readonlyAccessAccounts=[
'string',
],
accessLogConfig={
'enabled': True|False,
'destination': 'string',
'prefix': 'string'
}
)
[REQUIRED]
The name of the bucket to update.
An object that sets the public accessibility of objects in the specified bucket.
Specifies the anonymous access to all objects in a bucket.
The following options can be specified:
A Boolean value that indicates whether the access control list (ACL) permissions that are applied to individual objects override the getObject option that is currently specified.
When this is true, you can use the PutObjectAcl Amazon S3 API action to set individual objects to public (read-only) using the public-read ACL, or to private using the private ACL.
Specifies whether to enable or suspend versioning of objects in the bucket.
The following options can be specified:
An array of strings to specify the AWS account IDs that can access the bucket.
You can give a maximum of 10 AWS accounts access to a bucket.
An object that describes the access log configuration for the bucket.
A Boolean value that indicates whether bucket access logging is enabled for the bucket.
The name of the bucket where the access is saved. The destination can be a Lightsail bucket in the same account, and in the same AWS Region as the source bucket.
Note
This parameter is required when enabling the access log for a bucket, and should be omitted when disabling the access log.
The optional object prefix for the bucket access log.
The prefix is an optional addition to the object key that organizes your access log files in the destination bucket. For example, if you specify a logs/ prefix, then each log object will begin with the logs/ prefix in its key (for example, logs/2021-11-01-21-32-16-E568B2907131C0C0 ).
Note
This parameter can be optionally specified when enabling the access log for a bucket, and should be omitted when disabling the access log.
dict
Response Syntax
{
'bucket': {
'resourceType': 'string',
'accessRules': {
'getObject': 'public'|'private',
'allowPublicOverrides': True|False
},
'arn': 'string',
'bundleId': 'string',
'createdAt': datetime(2015, 1, 1),
'url': 'string',
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'name': 'string',
'supportCode': 'string',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'objectVersioning': 'string',
'ableToUpdateBundle': True|False,
'readonlyAccessAccounts': [
'string',
],
'resourcesReceivingAccess': [
{
'name': 'string',
'resourceType': 'string'
},
],
'state': {
'code': 'string',
'message': 'string'
},
'accessLogConfig': {
'enabled': True|False,
'destination': 'string',
'prefix': 'string'
}
},
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
bucket (dict) --
An object that describes the bucket that is updated.
resourceType (string) --
The Lightsail resource type of the bucket (for example, Bucket ).
accessRules (dict) --
An object that describes the access rules of the bucket.
getObject (string) --
Specifies the anonymous access to all objects in a bucket.
The following options can be specified:
allowPublicOverrides (boolean) --
A Boolean value that indicates whether the access control list (ACL) permissions that are applied to individual objects override the getObject option that is currently specified.
When this is true, you can use the PutObjectAcl Amazon S3 API action to set individual objects to public (read-only) using the public-read ACL, or to private using the private ACL.
arn (string) --
The Amazon Resource Name (ARN) of the bucket.
bundleId (string) --
The ID of the bundle currently applied to the bucket.
A bucket bundle specifies the monthly cost, storage space, and data transfer quota for a bucket.
Use the UpdateBucketBundle action to change the bundle of a bucket.
createdAt (datetime) --
The timestamp when the distribution was created.
url (string) --
The URL of the bucket.
location (dict) --
Describes the resource location.
availabilityZone (string) --
The Availability Zone. Follows the format us-east-2a (case-sensitive).
regionName (string) --
The AWS Region name.
name (string) --
The name of the bucket.
supportCode (string) --
The support code for a bucket. Include this code in your email to support when you have questions about a Lightsail bucket. This code enables our support team to look up your Lightsail information more easily.
tags (list) --
The tag keys and optional values for the bucket. For more information, see Tags in Amazon Lightsail in the Amazon Lightsail Developer Guide .
(dict) --
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
key (string) --
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
value (string) --
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
objectVersioning (string) --
Indicates whether object versioning is enabled for the bucket.
The following options can be configured:
ableToUpdateBundle (boolean) --
Indicates whether the bundle that is currently applied to a bucket can be changed to another bundle.
You can update a bucket's bundle only one time within a monthly AWS billing cycle.
Use the UpdateBucketBundle action to change a bucket's bundle.
readonlyAccessAccounts (list) --
An array of strings that specify the AWS account IDs that have read-only access to the bucket.
resourcesReceivingAccess (list) --
An array of objects that describe Lightsail instances that have access to the bucket.
Use the SetResourceAccessForBucket action to update the instances that have access to a bucket.
(dict) --
Describes an Amazon Lightsail instance that has access to a Lightsail bucket.
name (string) --
The name of the Lightsail instance.
resourceType (string) --
The Lightsail resource type (for example, Instance ).
state (dict) --
An object that describes the state of the bucket.
code (string) --
The state code of the bucket.
The following codes are possible:
message (string) --
A message that describes the state of the bucket.
accessLogConfig (dict) --
An object that describes the access log configuration for the bucket.
enabled (boolean) --
A Boolean value that indicates whether bucket access logging is enabled for the bucket.
destination (string) --
The name of the bucket where the access is saved. The destination can be a Lightsail bucket in the same account, and in the same AWS Region as the source bucket.
Note
This parameter is required when enabling the access log for a bucket, and should be omitted when disabling the access log.
prefix (string) --
The optional object prefix for the bucket access log.
The prefix is an optional addition to the object key that organizes your access log files in the destination bucket. For example, if you specify a logs/ prefix, then each log object will begin with the logs/ prefix in its key (for example, logs/2021-11-01-21-32-16-E568B2907131C0C0 ).
Note
This parameter can be optionally specified when enabling the access log for a bucket, and should be omitted when disabling the access log.
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Updates the bundle, or storage plan, of an existing Amazon Lightsail bucket.
A bucket bundle specifies the monthly cost, storage space, and data transfer quota for a bucket. You can update a bucket's bundle only one time within a monthly AWS billing cycle. To determine if you can update a bucket's bundle, use the GetBuckets action. The ableToUpdateBundle parameter in the response will indicate whether you can currently update a bucket's bundle.
Update a bucket's bundle if it's consistently going over its storage space or data transfer quota, or if a bucket's usage is consistently in the lower range of its storage space or data transfer quota. Due to the unpredictable usage fluctuations that a bucket might experience, we strongly recommend that you update a bucket's bundle only as a long-term strategy, instead of as a short-term, monthly cost-cutting measure. Choose a bucket bundle that will provide the bucket with ample storage space and data transfer for a long time to come.
See also: AWS API Documentation
Request Syntax
response = client.update_bucket_bundle(
bucketName='string',
bundleId='string'
)
[REQUIRED]
The name of the bucket for which to update the bundle.
[REQUIRED]
The ID of the new bundle to apply to the bucket.
Use the GetBucketBundles action to get a list of bundle IDs that you can specify.
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Updates the configuration of your Amazon Lightsail container service, such as its power, scale, and public domain names.
See also: AWS API Documentation
Request Syntax
response = client.update_container_service(
serviceName='string',
power='nano'|'micro'|'small'|'medium'|'large'|'xlarge',
scale=123,
isDisabled=True|False,
publicDomainNames={
'string': [
'string',
]
}
)
[REQUIRED]
The name of the container service to update.
The power for the container service.
The power specifies the amount of memory, vCPUs, and base monthly cost of each node of the container service. The power and scale of a container service makes up its configured capacity. To determine the monthly price of your container service, multiply the base price of the power with the scale (the number of nodes) of the service.
Use the GetContainerServicePowers action to view the specifications of each power option.
The scale for the container service.
The scale specifies the allocated compute nodes of the container service. The power and scale of a container service makes up its configured capacity. To determine the monthly price of your container service, multiply the base price of the power with the scale (the number of nodes) of the service.
The public domain names to use with the container service, such as example.com and www.example.com .
You can specify up to four public domain names for a container service. The domain names that you specify are used when you create a deployment with a container configured as the public endpoint of your container service.
If you don't specify public domain names, then you can use the default domain of the container service.
Warning
You must create and validate an SSL/TLS certificate before you can use public domain names with your container service. Use the CreateCertificate action to create a certificate for the public domain names you want to use with your container service.
You can specify public domain names using a string to array map as shown in the example later on this page.
dict
Response Syntax
{
'containerService': {
'containerServiceName': 'string',
'arn': '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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'power': 'nano'|'micro'|'small'|'medium'|'large'|'xlarge',
'powerId': 'string',
'state': 'PENDING'|'READY'|'RUNNING'|'UPDATING'|'DELETING'|'DISABLED'|'DEPLOYING',
'stateDetail': {
'code': 'CREATING_SYSTEM_RESOURCES'|'CREATING_NETWORK_INFRASTRUCTURE'|'PROVISIONING_CERTIFICATE'|'PROVISIONING_SERVICE'|'CREATING_DEPLOYMENT'|'EVALUATING_HEALTH_CHECK'|'ACTIVATING_DEPLOYMENT'|'CERTIFICATE_LIMIT_EXCEEDED'|'UNKNOWN_ERROR',
'message': 'string'
},
'scale': 123,
'currentDeployment': {
'version': 123,
'state': 'ACTIVATING'|'ACTIVE'|'INACTIVE'|'FAILED',
'containers': {
'string': {
'image': 'string',
'command': [
'string',
],
'environment': {
'string': 'string'
},
'ports': {
'string': 'HTTP'|'HTTPS'|'TCP'|'UDP'
}
}
},
'publicEndpoint': {
'containerName': 'string',
'containerPort': 123,
'healthCheck': {
'healthyThreshold': 123,
'unhealthyThreshold': 123,
'timeoutSeconds': 123,
'intervalSeconds': 123,
'path': 'string',
'successCodes': 'string'
}
},
'createdAt': datetime(2015, 1, 1)
},
'nextDeployment': {
'version': 123,
'state': 'ACTIVATING'|'ACTIVE'|'INACTIVE'|'FAILED',
'containers': {
'string': {
'image': 'string',
'command': [
'string',
],
'environment': {
'string': 'string'
},
'ports': {
'string': 'HTTP'|'HTTPS'|'TCP'|'UDP'
}
}
},
'publicEndpoint': {
'containerName': 'string',
'containerPort': 123,
'healthCheck': {
'healthyThreshold': 123,
'unhealthyThreshold': 123,
'timeoutSeconds': 123,
'intervalSeconds': 123,
'path': 'string',
'successCodes': 'string'
}
},
'createdAt': datetime(2015, 1, 1)
},
'isDisabled': True|False,
'principalArn': 'string',
'privateDomainName': 'string',
'publicDomainNames': {
'string': [
'string',
]
},
'url': 'string'
}
}
Response Structure
(dict) --
containerService (dict) --
An object that describes a container service.
containerServiceName (string) --
The name of the container service.
arn (string) --
The Amazon Resource Name (ARN) of the container service.
createdAt (datetime) --
The timestamp when the container service was created.
location (dict) --
An object that describes the location of the container service, such as the AWS Region and Availability Zone.
availabilityZone (string) --
The Availability Zone. Follows the format us-east-2a (case-sensitive).
regionName (string) --
The AWS Region name.
resourceType (string) --
The Lightsail resource type of the container service (i.e., ContainerService ).
tags (list) --
The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
(dict) --
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
key (string) --
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
value (string) --
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
power (string) --
The power specification of the container service.
The power specifies the amount of RAM, the number of vCPUs, and the base price of the container service.
powerId (string) --
The ID of the power of the container service.
state (string) --
The current state of the container service.
The following container service states are possible:
stateDetail (dict) --
An object that describes the current state of the container service.
Note
The state detail is populated only when a container service is in a PENDING , DEPLOYING , or UPDATING state.
code (string) --
The state code of the container service.
The following state codes are possible:
message (string) --
A message that provides more information for the state code.
Note
The state detail is populated only when a container service is in a PENDING , DEPLOYING , or UPDATING state.
scale (integer) --
The scale specification of the container service.
The scale specifies the allocated compute nodes of the container service.
currentDeployment (dict) --
An object that describes the current container deployment of the container service.
version (integer) --
The version number of the deployment.
state (string) --
The state of the deployment.
A deployment can be in one of the following states:
containers (dict) --
An object that describes the configuration for the containers of the deployment.
(string) --
(dict) --
Describes the settings of a container that will be launched, or that is launched, to an Amazon Lightsail container service.
image (string) --
The name of the image used for the container.
Container images sourced from your Lightsail container service, that are registered and stored on your service, start with a colon (: ). For example, if your container service name is container-service-1 , the container image label is mystaticsite , and you want to use the third (3 ) version of the registered container image, then you should specify :container-service-1.mystaticsite.3 . To use the latest version of a container image, specify latest instead of a version number (for example, :container-service-1.mystaticsite.latest ). Lightsail will automatically use the highest numbered version of the registered container image.
Container images sourced from a public registry like Docker Hub don't start with a colon. For example, nginx:latest or nginx .
command (list) --
The launch command for the container.
environment (dict) --
The environment variables of the container.
ports (dict) --
The open firewall ports of the container.
publicEndpoint (dict) --
An object that describes the endpoint of the deployment.
containerName (string) --
The name of the container entry of the deployment that the endpoint configuration applies to.
containerPort (integer) --
The port of the specified container to which traffic is forwarded to.
healthCheck (dict) --
An object that describes the health check configuration of the container.
healthyThreshold (integer) --
The number of consecutive health checks successes required before moving the container to the Healthy state. The default value is 2 .
unhealthyThreshold (integer) --
The number of consecutive health check failures required before moving the container to the Unhealthy state. The default value is 2 .
timeoutSeconds (integer) --
The amount of time, in seconds, during which no response means a failed health check. You can specify between 2 and 60 seconds. The default value is 2 .
intervalSeconds (integer) --
The approximate interval, in seconds, between health checks of an individual container. You can specify between 5 and 300 seconds. The default value is 5 .
path (string) --
The path on the container on which to perform the health check. The default value is / .
successCodes (string) --
The HTTP codes to use when checking for a successful response from a container. You can specify values between 200 and 499 . You can specify multiple values (for example, 200,202 ) or a range of values (for example, 200-299 ).
createdAt (datetime) --
The timestamp when the deployment was created.
nextDeployment (dict) --
An object that describes the next deployment of the container service.
This value is null when there is no deployment in a pending state.
version (integer) --
The version number of the deployment.
state (string) --
The state of the deployment.
A deployment can be in one of the following states:
containers (dict) --
An object that describes the configuration for the containers of the deployment.
(string) --
(dict) --
Describes the settings of a container that will be launched, or that is launched, to an Amazon Lightsail container service.
image (string) --
The name of the image used for the container.
Container images sourced from your Lightsail container service, that are registered and stored on your service, start with a colon (: ). For example, if your container service name is container-service-1 , the container image label is mystaticsite , and you want to use the third (3 ) version of the registered container image, then you should specify :container-service-1.mystaticsite.3 . To use the latest version of a container image, specify latest instead of a version number (for example, :container-service-1.mystaticsite.latest ). Lightsail will automatically use the highest numbered version of the registered container image.
Container images sourced from a public registry like Docker Hub don't start with a colon. For example, nginx:latest or nginx .
command (list) --
The launch command for the container.
environment (dict) --
The environment variables of the container.
ports (dict) --
The open firewall ports of the container.
publicEndpoint (dict) --
An object that describes the endpoint of the deployment.
containerName (string) --
The name of the container entry of the deployment that the endpoint configuration applies to.
containerPort (integer) --
The port of the specified container to which traffic is forwarded to.
healthCheck (dict) --
An object that describes the health check configuration of the container.
healthyThreshold (integer) --
The number of consecutive health checks successes required before moving the container to the Healthy state. The default value is 2 .
unhealthyThreshold (integer) --
The number of consecutive health check failures required before moving the container to the Unhealthy state. The default value is 2 .
timeoutSeconds (integer) --
The amount of time, in seconds, during which no response means a failed health check. You can specify between 2 and 60 seconds. The default value is 2 .
intervalSeconds (integer) --
The approximate interval, in seconds, between health checks of an individual container. You can specify between 5 and 300 seconds. The default value is 5 .
path (string) --
The path on the container on which to perform the health check. The default value is / .
successCodes (string) --
The HTTP codes to use when checking for a successful response from a container. You can specify values between 200 and 499 . You can specify multiple values (for example, 200,202 ) or a range of values (for example, 200-299 ).
createdAt (datetime) --
The timestamp when the deployment was created.
isDisabled (boolean) --
A Boolean value indicating whether the container service is disabled.
principalArn (string) --
The principal ARN of the container service.
The principal ARN can be used to create a trust relationship between your standard AWS account and your Lightsail container service. This allows you to give your service permission to access resources in your standard AWS account.
privateDomainName (string) --
The private domain name of the container service.
The private domain name is accessible only by other resources within the default virtual private cloud (VPC) of your Lightsail account.
publicDomainNames (dict) --
The public domain name of the container service, such as example.com and www.example.com .
You can specify up to four public domain names for a container service. The domain names that you specify are used when you create a deployment with a container configured as the public endpoint of your container service.
If you don't specify public domain names, then you can use the default domain of the container service.
Warning
You must create and validate an SSL/TLS certificate before you can use public domain names with your container service. Use the CreateCertificate action to create a certificate for the public domain names you want to use with your container service.
See CreateContainerService or UpdateContainerService for information about how to specify public domain names for your Lightsail container service.
url (string) --
The publicly accessible URL of the container service.
If no public endpoint is specified in the currentDeployment , this URL returns a 404 response.
Exceptions
Updates an existing Amazon Lightsail content delivery network (CDN) distribution.
Use this action to update the configuration of your existing distribution.
See also: AWS API Documentation
Request Syntax
response = client.update_distribution(
distributionName='string',
origin={
'name': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1',
'protocolPolicy': 'http-only'|'https-only'
},
defaultCacheBehavior={
'behavior': 'dont-cache'|'cache'
},
cacheBehaviorSettings={
'defaultTTL': 123,
'minimumTTL': 123,
'maximumTTL': 123,
'allowedHTTPMethods': 'string',
'cachedHTTPMethods': 'string',
'forwardedCookies': {
'option': 'none'|'allow-list'|'all',
'cookiesAllowList': [
'string',
]
},
'forwardedHeaders': {
'option': 'none'|'allow-list'|'all',
'headersAllowList': [
'Accept'|'Accept-Charset'|'Accept-Datetime'|'Accept-Encoding'|'Accept-Language'|'Authorization'|'CloudFront-Forwarded-Proto'|'CloudFront-Is-Desktop-Viewer'|'CloudFront-Is-Mobile-Viewer'|'CloudFront-Is-SmartTV-Viewer'|'CloudFront-Is-Tablet-Viewer'|'CloudFront-Viewer-Country'|'Host'|'Origin'|'Referer',
]
},
'forwardedQueryStrings': {
'option': True|False,
'queryStringsAllowList': [
'string',
]
}
},
cacheBehaviors=[
{
'path': 'string',
'behavior': 'dont-cache'|'cache'
},
],
isEnabled=True|False
)
[REQUIRED]
The name of the distribution to update.
Use the GetDistributions action to get a list of distribution names that you can specify.
An object that describes the origin resource for the distribution, such as a Lightsail instance or load balancer.
The distribution pulls, caches, and serves content from the origin.
The name of the origin resource.
The AWS Region name of the origin resource.
The protocol that your Amazon Lightsail distribution uses when establishing a connection with your origin to pull content.
An object that describes the default cache behavior for the distribution.
The cache behavior of the distribution.
The following cache behaviors can be specified:
An object that describes the cache behavior settings for the distribution.
Note
The cacheBehaviorSettings specified in your UpdateDistributionRequest will replace your distribution's existing settings.
The default amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the content has been updated.
Note
The value specified applies only when the origin does not add HTTP headers such as Cache-Control max-age , Cache-Control s-maxage , and Expires to objects.
The minimum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated.
A value of 0 must be specified for minimumTTL if the distribution is configured to forward all headers to the origin.
The maximum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated.
The value specified applies only when the origin adds HTTP headers such as Cache-Control max-age , Cache-Control s-maxage , and Expires to objects.
The HTTP methods that are processed and forwarded to the distribution's origin.
You can specify the following options:
If you specify the third option, you might need to restrict access to your distribution's origin so users can't perform operations that you don't want them to. For example, you might not want users to have permission to delete objects from your origin.
The HTTP method responses that are cached by your distribution.
You can specify the following options:
An object that describes the cookies that are forwarded to the origin. Your content is cached based on the cookies that are forwarded.
Specifies which cookies to forward to the distribution's origin for a cache behavior: all , none , or allow-list to forward only the cookies specified in the cookiesAllowList parameter.
The specific cookies to forward to your distribution's origin.
An object that describes the headers that are forwarded to the origin. Your content is cached based on the headers that are forwarded.
The headers that you want your distribution to forward to your origin and base caching on.
You can configure your distribution to do one of the following:
The specific headers to forward to your distribution's origin.
An object that describes the query strings that are forwarded to the origin. Your content is cached based on the query strings that are forwarded.
Indicates whether the distribution forwards and caches based on query strings.
The specific query strings that the distribution forwards to the origin.
Your distribution will cache content based on the specified query strings.
If the option parameter is true, then your distribution forwards all query strings, regardless of what you specify using the queryStringsAllowList parameter.
An array of objects that describe the per-path cache behavior for the distribution.
Describes the per-path cache behavior of an Amazon Lightsail content delivery network (CDN) distribution.
A per-path cache behavior is used to override, or add an exception to, the default cache behavior of a distribution. For example, if the cacheBehavior is set to cache , then a per-path cache behavior can be used to specify a directory, file, or file type that your distribution will cache. Alternately, if the distribution's cacheBehavior is dont-cache , then a per-path cache behavior can be used to specify a directory, file, or file type that your distribution will not cache.
if the cacheBehavior's behavior is set to 'cache', then
The path to a directory or file to cached, or not cache. Use an asterisk symbol to specify wildcard directories (path/to/assets/* ), and file types (*.html, *jpg, *js ). Directories and file paths are case-sensitive.
Examples:
The cache behavior for the specified path.
You can specify one of the following per-path cache behaviors:
dict
Response Syntax
{
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
(dict) --
operation (dict) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Updates the bundle of your Amazon Lightsail content delivery network (CDN) distribution.
A distribution bundle specifies the monthly network transfer quota and monthly cost of your dsitribution.
Update your distribution's bundle if your distribution is going over its monthly network transfer quota and is incurring an overage fee.
You can update your distribution's bundle only one time within your monthly AWS billing cycle. To determine if you can update your distribution's bundle, use the GetDistributions action. The ableToUpdateBundle parameter in the result will indicate whether you can currently update your distribution's bundle.
See also: AWS API Documentation
Request Syntax
response = client.update_distribution_bundle(
distributionName='string',
bundleId='string'
)
The name of the distribution for which to update the bundle.
Use the GetDistributions action to get a list of distribution names that you can specify.
The bundle ID of the new bundle to apply to your distribution.
Use the GetDistributionBundles action to get a list of distribution bundle IDs that you can specify.
dict
Response Syntax
{
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
(dict) --
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 AWS 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.
Exceptions
Updates a domain recordset after it is created.
The update domain entry operation supports tag-based access control via resource tags applied to the resource identified by domain name . For more information, see the Amazon Lightsail Developer Guide .
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 IP address (e.g., 192.0.2.0 ), or 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 . For Lightsail distributions, the value looks like exampled1182ne.cloudfront.net . For Lightsail container services, the value looks like container-service-1.example23scljs.us-west-2.cs.amazonlightsail.com . Be sure to also set isAlias to true when setting up an A record for a Lightsail load balancer, distribution, or container service.
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, such as address for IPv4 (A), address for IPv6 (AAAA), canonical name (CNAME), mail exchanger (MX), name server (NS), start of authority (SOA), service locator (SRV), or text (TXT).
The following domain entry types can be used:
(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': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Updates the specified attribute for a load balancer. You can only update one attribute at a time.
The update load balancer attribute operation supports tag-based access control via resource tags applied to the resource identified by load balancer name . For more information, see the Amazon Lightsail Developer Guide .
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': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Allows the update of one or more attributes of a database in Amazon Lightsail.
Updates are applied immediately, or in cases where the updates could result in an outage, are applied during the database's predefined maintenance window.
The update relational database operation supports tag-based access control via resource tags applied to the resource identified by relationalDatabaseName. For more information, see the Amazon Lightsail Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.update_relational_database(
relationalDatabaseName='string',
masterUserPassword='string',
rotateMasterUserPassword=True|False,
preferredBackupWindow='string',
preferredMaintenanceWindow='string',
enableBackupRetention=True|False,
disableBackupRetention=True|False,
publiclyAccessible=True|False,
applyImmediately=True|False,
caCertificateIdentifier='string'
)
[REQUIRED]
The name of your Lightsail database resource to update.
The password for the master user. The password can include any printable ASCII character except "/", """, or "@".
My**SQL**
Constraints: Must contain from 8 to 41 characters.
PostgreSQL
Constraints: Must contain from 8 to 128 characters.
When true , the master user password is changed to a new strong password generated by Lightsail.
Use the get relational database master user password operation to get the new password.
The daily time range during which automated backups are created for your database if automated backups are enabled.
Constraints:
The weekly time range during which system maintenance can occur on your database.
The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region, occurring on a random day of the week.
Constraints:
When true , enables automated backup retention for your database.
Updates are applied during the next maintenance window because this can result in an outage.
When true , disables automated backup retention for your database.
Disabling backup retention deletes all automated database backups. Before disabling this, you may want to create a snapshot of your database using the create relational database snapshot operation.
Updates are applied during the next maintenance window because this can result in an outage.
When true , applies changes immediately. When false , applies changes during the preferred maintenance window. Some changes may cause an outage.
Default: false
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
Allows the update of one or more parameters of a database in Amazon Lightsail.
Parameter updates don't cause outages; therefore, their application is not subject to the preferred maintenance window. However, there are two ways in which parameter updates are applied: dynamic or pending-reboot . Parameters marked with a dynamic apply type are applied immediately. Parameters marked with a pending-reboot apply type are applied only after the database is rebooted using the reboot relational database operation.
The update relational database parameters operation supports tag-based access control via resource tags applied to the resource identified by relationalDatabaseName. For more information, see the Amazon Lightsail Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.update_relational_database_parameters(
relationalDatabaseName='string',
parameters=[
{
'allowedValues': 'string',
'applyMethod': 'string',
'applyType': 'string',
'dataType': 'string',
'description': 'string',
'isModifiable': True|False,
'parameterName': 'string',
'parameterValue': 'string'
},
]
)
[REQUIRED]
The name of your database for which to update parameters.
[REQUIRED]
The database parameters to update.
Describes the parameters of a database.
Specifies the valid range of values for the parameter.
Indicates when parameter updates are applied.
Can be immediate or pending-reboot .
Specifies the engine-specific parameter type.
Specifies the valid data type for the parameter.
Provides a description of the parameter.
A Boolean value indicating whether the parameter can be modified.
Specifies the name of the parameter.
Specifies the value of the parameter.
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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.
Exceptions
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,
'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.
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,
'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.
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. Inactive blueprints are listed to support customers with existing instances but are not necessarily available for launch of new instances. Blueprints are marked inactive when they become outdated due to operating system updates or new application releases.
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,
'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.
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 ) of the bundle.
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_cloud_formation_stack_records')
Creates an iterator that will paginate through responses from Lightsail.Client.get_cloud_formation_stack_records().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 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.
A token to specify where to start paginating. This is the NextToken from a previous response.
{
'cloudFormationStackRecords': [
{
'name': 'string',
'arn': '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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'state': 'Started'|'Succeeded'|'Failed',
'sourceInfo': [
{
'resourceType': 'ExportSnapshotRecord',
'name': 'string',
'arn': 'string'
},
],
'destinationInfo': {
'id': 'string',
'service': 'string'
}
},
],
'NextToken': 'string'
}
Response Structure
A list of objects describing the CloudFormation stack records.
Describes a CloudFormation stack record created as a result of the create cloud formation stack action.
A CloudFormation stack record provides information about the AWS CloudFormation stack used to create a new Amazon Elastic Compute Cloud instance from an exported Lightsail instance snapshot.
The name of the CloudFormation stack record. It starts with CloudFormationStackRecord followed by a GUID.
The Amazon Resource Name (ARN) of the CloudFormation stack record.
The date when the CloudFormation stack record was created.
A list of objects describing the Availability Zone and AWS Region of the CloudFormation stack record.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The Lightsail resource type (e.g., CloudFormationStackRecord ).
The current state of the CloudFormation stack record.
A list of objects describing the source of the CloudFormation stack record.
Describes the source of a CloudFormation stack record (i.e., the export snapshot record).
The Lightsail resource type (e.g., ExportSnapshotRecord ).
The name of the record.
The Amazon Resource Name (ARN) of the export snapshot record.
A list of objects describing the destination service, which is AWS CloudFormation, and the Amazon Resource Name (ARN) of the AWS CloudFormation stack.
The ID of the resource created at the destination.
The destination service of the record.
A token to resume pagination.
paginator = client.get_paginator('get_disk_snapshots')
Creates an iterator that will paginate through responses from Lightsail.Client.get_disk_snapshots().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 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.
A token to specify where to start paginating. This is the NextToken from a previous response.
{
'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-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'sizeInGb': 123,
'state': 'pending'|'completed'|'error'|'unknown',
'progress': 'string',
'fromDiskName': 'string',
'fromDiskArn': 'string',
'fromInstanceName': 'string',
'fromInstanceArn': 'string',
'isFromAutoSnapshot': True|False
},
],
'NextToken': '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 tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The size of the disk in GB.
The status of the disk snapshot operation.
The progress of the snapshot.
The unique name of the source disk from which the disk snapshot was created.
The Amazon Resource Name (ARN) of the source disk from which the disk snapshot was created.
The unique name of the source instance from which the disk (system volume) snapshot was created.
The Amazon Resource Name (ARN) of the source instance from which the disk (system volume) snapshot was created.
A Boolean value indicating whether the snapshot was created from an automatic snapshot.
A token to resume pagination.
paginator = client.get_paginator('get_disks')
Creates an iterator that will paginate through responses from Lightsail.Client.get_disks().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 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.
A token to specify where to start paginating. This is the NextToken from a previous response.
{
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'addOns': [
{
'name': 'string',
'status': 'string',
'snapshotTimeOfDay': 'string',
'nextSnapshotTimeOfDay': 'string'
},
],
'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
},
],
'NextToken': 'string'
}
Response Structure
An array of objects containing information about all block storage disks.
Describes a 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 tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
An array of objects representing the add-ons enabled on the disk.
Describes an add-on that is enabled for an Amazon Lightsail resource.
The name of the add-on.
The status of the add-on.
The daily time when an automatic snapshot is created.
The time shown is in HH:00 format, and in Coordinated Universal Time (UTC).
The snapshot is automatically created between the time shown and up to 45 minutes after.
The next daily time an automatic snapshot will be created.
The time shown is in HH:00 format, and in Coordinated Universal Time (UTC).
The snapshot is automatically created between the time shown and up to 45 minutes after.
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 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,
'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.
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-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'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.
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.
The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
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 IP address (e.g., 192.0.2.0 ), or 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 . For Lightsail distributions, the value looks like exampled1182ne.cloudfront.net . For Lightsail container services, the value looks like container-service-1.example23scljs.us-west-2.cs.amazonlightsail.com . Be sure to also set isAlias to true when setting up an A record for a Lightsail load balancer, distribution, or container service.
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, such as address for IPv4 (A), address for IPv6 (AAAA), canonical name (CNAME), mail exchanger (MX), name server (NS), start of authority (SOA), service locator (SRV), or text (TXT).
The following domain entry types can be used:
(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_export_snapshot_records')
Creates an iterator that will paginate through responses from Lightsail.Client.get_export_snapshot_records().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 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.
A token to specify where to start paginating. This is the NextToken from a previous response.
{
'exportSnapshotRecords': [
{
'name': 'string',
'arn': '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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'state': 'Started'|'Succeeded'|'Failed',
'sourceInfo': {
'resourceType': 'InstanceSnapshot'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'name': 'string',
'arn': 'string',
'fromResourceName': 'string',
'fromResourceArn': 'string',
'instanceSnapshotInfo': {
'fromBundleId': 'string',
'fromBlueprintId': 'string',
'fromDiskInfo': [
{
'name': 'string',
'path': 'string',
'sizeInGb': 123,
'isSystemDisk': True|False
},
]
},
'diskSnapshotInfo': {
'sizeInGb': 123
}
},
'destinationInfo': {
'id': 'string',
'service': 'string'
}
},
],
'NextToken': 'string'
}
Response Structure
A list of objects describing the export snapshot records.
Describes an export snapshot record.
The export snapshot record name.
The Amazon Resource Name (ARN) of the export snapshot record.
The date when the export snapshot record was created.
The AWS Region and Availability Zone where the export snapshot record is located.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The Lightsail resource type (e.g., ExportSnapshotRecord ).
The state of the export snapshot record.
A list of objects describing the source of the export snapshot record.
The Lightsail resource type (e.g., InstanceSnapshot or DiskSnapshot ).
The date when the source instance or disk snapshot was created.
The name of the source instance or disk snapshot.
The Amazon Resource Name (ARN) of the source instance or disk snapshot.
The name of the snapshot's source instance or disk.
The Amazon Resource Name (ARN) of the snapshot's source instance or disk.
A list of objects describing an instance snapshot.
The bundle ID from which the source instance was created (e.g., micro_1_0 ).
The blueprint ID from which the source instance (e.g., os_debian_8_3 ).
A list of objects describing the disks that were attached to the source instance.
Describes a disk.
The disk name.
The disk path.
The size of the disk in GB (e.g., 32 ).
A Boolean value indicating whether this disk is a system disk (has an operating system loaded on it).
A list of objects describing a disk snapshot.
The size of the disk in GB (e.g., 32 ).
A list of objects describing the destination of the export snapshot record.
The ID of the resource created at the destination.
The destination service of the record.
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,
'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.
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-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'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-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'addOns': [
{
'name': 'string',
'status': 'string',
'snapshotTimeOfDay': 'string',
'nextSnapshotTimeOfDay': 'string'
},
],
'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',
'isFromAutoSnapshot': True|False,
'sizeInGb': 123
},
],
'NextToken': 'string'
}
Response Structure
An array of key-value pairs containing information about the results of your get instance snapshots request.
Describes an instance snapshot.
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 tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The state the snapshot is in.
The progress of the snapshot.
Note
This is populated only for disk snapshots, and is null for instance snapshots.
An array of disk objects containing information about all block storage disks.
Describes a 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 tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
An array of objects representing the add-ons enabled on the disk.
Describes an add-on that is enabled for an Amazon Lightsail resource.
The name of the add-on.
The status of the add-on.
The daily time when an automatic snapshot is created.
The time shown is in HH:00 format, and in Coordinated Universal Time (UTC).
The snapshot is automatically created between the time shown and up to 45 minutes after.
The next daily time an automatic snapshot will be created.
The time shown is in HH:00 format, and in Coordinated Universal Time (UTC).
The snapshot is automatically created between the time shown and up to 45 minutes after.
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 ).
A Boolean value indicating whether the snapshot was created from an automatic snapshot.
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,
'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.
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-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'blueprintId': 'string',
'blueprintName': 'string',
'bundleId': 'string',
'addOns': [
{
'name': 'string',
'status': 'string',
'snapshotTimeOfDay': 'string',
'nextSnapshotTimeOfDay': 'string'
},
],
'isStaticIp': True|False,
'privateIpAddress': 'string',
'publicIpAddress': 'string',
'ipv6Addresses': [
'string',
],
'ipAddressType': 'dualstack'|'ipv4',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'addOns': [
{
'name': 'string',
'status': 'string',
'snapshotTimeOfDay': 'string',
'nextSnapshotTimeOfDay': 'string'
},
],
'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'|'icmp',
'accessFrom': 'string',
'accessType': 'Public'|'Private',
'commonName': 'string',
'accessDirection': 'inbound'|'outbound',
'cidrs': [
'string',
],
'ipv6Cidrs': [
'string',
],
'cidrListAliases': [
'string',
]
},
]
},
'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 ) in Unix time format.
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 tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
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 ).
An array of objects representing the add-ons enabled on the instance.
Describes an add-on that is enabled for an Amazon Lightsail resource.
The name of the add-on.
The status of the add-on.
The daily time when an automatic snapshot is created.
The time shown is in HH:00 format, and in Coordinated Universal Time (UTC).
The snapshot is automatically created between the time shown and up to 45 minutes after.
The next daily time an automatic snapshot will be created.
The time shown is in HH:00 format, and in Coordinated Universal Time (UTC).
The snapshot is automatically created between the time shown and up to 45 minutes after.
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 addresses of the instance.
The IP address type of the instance.
The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6.
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 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 tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
An array of objects representing the add-ons enabled on the disk.
Describes an add-on that is enabled for an Amazon Lightsail resource.
The name of the add-on.
The status of the add-on.
The daily time when an automatic snapshot is created.
The time shown is in HH:00 format, and in Coordinated Universal Time (UTC).
The snapshot is automatically created between the time shown and up to 45 minutes after.
The next daily time an automatic snapshot will be created.
The time shown is in HH:00 format, and in Coordinated Universal Time (UTC).
The snapshot is automatically created between the time shown and up to 45 minutes after.
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 ports for an Amazon Lightsail instance.
The first port in a range of open ports on an instance.
Allowed ports:
The last port in a range of open ports on an instance.
Allowed ports:
The IP protocol name.
The name can be one of the following:
The location from which access is allowed. For example, Anywhere (0.0.0.0/0) , or Custom if a specific IP address or range of IP addresses is allowed.
The type of access (Public or Private ).
The common name of the port information.
The access direction (inbound or outbound ).
Note
Lightsail currently supports only inbound access direction.
The IPv4 address, or range of IPv4 addresses (in CIDR notation) that are allowed to connect to an instance through the ports, and the protocol.
Note
The ipv6Cidrs parameter lists the IPv6 addresses that are allowed to connect to an instance.
For more information about CIDR block notation, see Classless Inter-Domain Routing on Wikipedia .
The IPv6 address, or range of IPv6 addresses (in CIDR notation) that are allowed to connect to an instance through the ports, and the protocol. Only devices with an IPv6 address can connect to an instance through IPv6; otherwise, IPv4 should be used.
Note
The cidrs parameter lists the IPv4 addresses that are allowed to connect to an instance.
For more information about CIDR block notation, see Classless Inter-Domain Routing on Wikipedia .
An alias that defines access for a preconfigured range of IP addresses.
The only alias currently supported is lightsail-connect , which allows IP addresses of the browser-based RDP/SSH client in the Lightsail console to connect to your instance.
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,
'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.
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-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'fingerprint': 'string'
},
],
'NextToken': 'string'
}
Response Structure
An array of key-value pairs containing information about the key pairs.
Describes an 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 tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The RSA fingerprint of the key pair.
A token to resume pagination.
paginator = client.get_paginator('get_load_balancers')
Creates an iterator that will paginate through responses from Lightsail.Client.get_load_balancers().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 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.
A token to specify where to start paginating. This is the NextToken from a previous response.
{
'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-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'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'
},
'ipAddressType': 'dualstack'|'ipv4'
},
],
'NextToken': 'string'
}
Response Structure
An array of LoadBalancer objects describing your load balancers.
Describes a 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 tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
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.
The IP address type of the load balancer.
The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6.
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,
'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.
A token to specify where to start paginating. This is the NextToken from a previous response.
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': 'DeleteKnownHostKeys'|'DeleteInstance'|'CreateInstance'|'StopInstance'|'StartInstance'|'RebootInstance'|'OpenInstancePublicPorts'|'PutInstancePublicPorts'|'CloseInstancePublicPorts'|'AllocateStaticIp'|'ReleaseStaticIp'|'AttachStaticIp'|'DetachStaticIp'|'UpdateDomainEntry'|'DeleteDomainEntry'|'CreateDomain'|'DeleteDomain'|'CreateInstanceSnapshot'|'DeleteInstanceSnapshot'|'CreateInstancesFromSnapshot'|'CreateLoadBalancer'|'DeleteLoadBalancer'|'AttachInstancesToLoadBalancer'|'DetachInstancesFromLoadBalancer'|'UpdateLoadBalancerAttribute'|'CreateLoadBalancerTlsCertificate'|'DeleteLoadBalancerTlsCertificate'|'AttachLoadBalancerTlsCertificate'|'CreateDisk'|'DeleteDisk'|'AttachDisk'|'DetachDisk'|'CreateDiskSnapshot'|'DeleteDiskSnapshot'|'CreateDiskFromSnapshot'|'CreateRelationalDatabase'|'UpdateRelationalDatabase'|'DeleteRelationalDatabase'|'CreateRelationalDatabaseFromSnapshot'|'CreateRelationalDatabaseSnapshot'|'DeleteRelationalDatabaseSnapshot'|'UpdateRelationalDatabaseParameters'|'StartRelationalDatabase'|'RebootRelationalDatabase'|'StopRelationalDatabase'|'EnableAddOn'|'DisableAddOn'|'PutAlarm'|'GetAlarms'|'DeleteAlarm'|'TestAlarm'|'CreateContactMethod'|'GetContactMethods'|'SendContactMethodVerification'|'DeleteContactMethod'|'CreateDistribution'|'UpdateDistribution'|'DeleteDistribution'|'ResetDistributionCache'|'AttachCertificateToDistribution'|'DetachCertificateFromDistribution'|'UpdateDistributionBundle'|'SetIpAddressType'|'CreateCertificate'|'DeleteCertificate'|'CreateContainerService'|'UpdateContainerService'|'DeleteContainerService'|'CreateContainerServiceDeployment'|'CreateContainerServiceRegistryLogin'|'RegisterContainerImage'|'DeleteContainerImage'|'CreateBucket'|'DeleteBucket'|'CreateBucketAccessKey'|'DeleteBucketAccessKey'|'UpdateBucketBundle'|'UpdateBucket'|'SetResourceAccessForBucket',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
],
'NextToken': 'string'
}
Response Structure
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the 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 AWS 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_relational_database_blueprints')
Creates an iterator that will paginate through responses from Lightsail.Client.get_relational_database_blueprints().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 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.
A token to specify where to start paginating. This is the NextToken from a previous response.
{
'blueprints': [
{
'blueprintId': 'string',
'engine': 'mysql',
'engineVersion': 'string',
'engineDescription': 'string',
'engineVersionDescription': 'string',
'isEngineDefault': True|False
},
],
'NextToken': 'string'
}
Response Structure
An object describing the result of your get relational database blueprints request.
Describes a database image, or blueprint. A blueprint describes the major engine version of a database.
The ID for the database blueprint.
The database software of the database blueprint (for example, MySQL ).
The database engine version for the database blueprint (for example, 5.7.23 ).
The description of the database engine for the database blueprint.
The description of the database engine version for the database blueprint.
A Boolean value indicating whether the engine version is the default for the database blueprint.
A token to resume pagination.
paginator = client.get_paginator('get_relational_database_bundles')
Creates an iterator that will paginate through responses from Lightsail.Client.get_relational_database_bundles().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 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.
A token to specify where to start paginating. This is the NextToken from a previous response.
{
'bundles': [
{
'bundleId': 'string',
'name': 'string',
'price': ...,
'ramSizeInGb': ...,
'diskSizeInGb': 123,
'transferPerMonthInGb': 123,
'cpuCount': 123,
'isEncrypted': True|False,
'isActive': True|False
},
],
'NextToken': 'string'
}
Response Structure
An object describing the result of your get relational database bundles request.
Describes a database bundle. A bundle describes the performance specifications of the database.
The ID for the database bundle.
The name for the database bundle.
The cost of the database bundle in US currency.
The amount of RAM in GB (for example, 2.0 ) for the database bundle.
The size of the disk for the database bundle.
The data transfer rate per month in GB for the database bundle.
The number of virtual CPUs (vCPUs) for the database bundle.
A Boolean value indicating whether the database bundle is encrypted.
A Boolean value indicating whether the database bundle is active.
A token to resume pagination.
paginator = client.get_paginator('get_relational_database_events')
Creates an iterator that will paginate through responses from Lightsail.Client.get_relational_database_events().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
relationalDatabaseName='string',
durationInMinutes=123,
PaginationConfig={
'MaxItems': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
The name of the database from which to get events.
The number of minutes in the past from which to retrieve events. For example, to get all events from the past 2 hours, enter 120.
Default: 60
The minimum is 1 and the maximum is 14 days (20160 minutes).
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.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'relationalDatabaseEvents': [
{
'resource': 'string',
'createdAt': datetime(2015, 1, 1),
'message': 'string',
'eventCategories': [
'string',
]
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
relationalDatabaseEvents (list) --
An object describing the result of your get relational database events request.
(dict) --
Describes an event for a database.
resource (string) --
The database that the database event relates to.
createdAt (datetime) --
The timestamp when the database event was created.
message (string) --
The message of the database event.
eventCategories (list) --
The category that the database event belongs to.
NextToken (string) --
A token to resume pagination.
paginator = client.get_paginator('get_relational_database_parameters')
Creates an iterator that will paginate through responses from Lightsail.Client.get_relational_database_parameters().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
relationalDatabaseName='string',
PaginationConfig={
'MaxItems': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
The name of your database for which to get parameters.
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.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'parameters': [
{
'allowedValues': 'string',
'applyMethod': 'string',
'applyType': 'string',
'dataType': 'string',
'description': 'string',
'isModifiable': True|False,
'parameterName': 'string',
'parameterValue': 'string'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
parameters (list) --
An object describing the result of your get relational database parameters request.
(dict) --
Describes the parameters of a database.
allowedValues (string) --
Specifies the valid range of values for the parameter.
applyMethod (string) --
Indicates when parameter updates are applied.
Can be immediate or pending-reboot .
applyType (string) --
Specifies the engine-specific parameter type.
dataType (string) --
Specifies the valid data type for the parameter.
description (string) --
Provides a description of the parameter.
isModifiable (boolean) --
A Boolean value indicating whether the parameter can be modified.
parameterName (string) --
Specifies the name of the parameter.
parameterValue (string) --
Specifies the value of the parameter.
NextToken (string) --
A token to resume pagination.
paginator = client.get_paginator('get_relational_database_snapshots')
Creates an iterator that will paginate through responses from Lightsail.Client.get_relational_database_snapshots().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 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.
A token to specify where to start paginating. This is the NextToken from a previous response.
{
'relationalDatabaseSnapshots': [
{
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'engine': 'string',
'engineVersion': 'string',
'sizeInGb': 123,
'state': 'string',
'fromRelationalDatabaseName': 'string',
'fromRelationalDatabaseArn': 'string',
'fromRelationalDatabaseBundleId': 'string',
'fromRelationalDatabaseBlueprintId': 'string'
},
],
'NextToken': 'string'
}
Response Structure
An object describing the result of your get relational database snapshots request.
Describes a database snapshot.
The name of the database snapshot.
The Amazon Resource Name (ARN) of the database snapshot.
The support code for the database snapshot. Include this code in your email to support when you have questions about a database snapshot in Lightsail. This code enables our support team to look up your Lightsail information more easily.
The timestamp when the database snapshot was created.
The Region name and Availability Zone where the database snapshot is located.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The Lightsail resource type.
The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The software of the database snapshot (for example, MySQL )
The database engine version for the database snapshot (for example, 5.7.23 ).
The size of the disk in GB (for example, 32 ) for the database snapshot.
The state of the database snapshot.
The name of the source database from which the database snapshot was created.
The Amazon Resource Name (ARN) of the database from which the database snapshot was created.
The bundle ID of the database from which the database snapshot was created.
The blueprint ID of the database from which the database snapshot was created. A blueprint describes the major engine version of a database.
A token to resume pagination.
paginator = client.get_paginator('get_relational_databases')
Creates an iterator that will paginate through responses from Lightsail.Client.get_relational_databases().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 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.
A token to specify where to start paginating. This is the NextToken from a previous response.
{
'relationalDatabases': [
{
'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-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'relationalDatabaseBlueprintId': 'string',
'relationalDatabaseBundleId': 'string',
'masterDatabaseName': 'string',
'hardware': {
'cpuCount': 123,
'diskSizeInGb': 123,
'ramSizeInGb': ...
},
'state': 'string',
'secondaryAvailabilityZone': 'string',
'backupRetentionEnabled': True|False,
'pendingModifiedValues': {
'masterUserPassword': 'string',
'engineVersion': 'string',
'backupRetentionEnabled': True|False
},
'engine': 'string',
'engineVersion': 'string',
'latestRestorableTime': datetime(2015, 1, 1),
'masterUsername': 'string',
'parameterApplyStatus': 'string',
'preferredBackupWindow': 'string',
'preferredMaintenanceWindow': 'string',
'publiclyAccessible': True|False,
'masterEndpoint': {
'port': 123,
'address': 'string'
},
'pendingMaintenanceActions': [
{
'action': 'string',
'description': 'string',
'currentApplyDate': datetime(2015, 1, 1)
},
],
'caCertificateIdentifier': 'string'
},
],
'NextToken': 'string'
}
Response Structure
An object describing the result of your get relational databases request.
Describes a database.
The unique name of the database resource in Lightsail.
The Amazon Resource Name (ARN) of the database.
The support code for the database. Include this code in your email to support when you have questions about a database in Lightsail. This code enables our support team to look up your Lightsail information more easily.
The timestamp when the database was created. Formatted in Unix time.
The Region name and Availability Zone where the database is located.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The Lightsail resource type for the database (for example, RelationalDatabase ).
The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The blueprint ID for the database. A blueprint describes the major engine version of a database.
The bundle ID for the database. A bundle describes the performance specifications for your database.
The name of the master database created when the Lightsail database resource is created.
Describes the hardware of the database.
The number of vCPUs for the database.
The size of the disk for the database.
The amount of RAM in GB for the database.
Describes the current state of the database.
Describes the secondary Availability Zone of a high availability database.
The secondary database is used for failover support of a high availability database.
A Boolean value indicating whether automated backup retention is enabled for the database.
Describes pending database value modifications.
The password for the master user of the database.
The database engine version.
A Boolean value indicating whether automated backup retention is enabled.
The database software (for example, MySQL ).
The database engine version (for example, 5.7.23 ).
The latest point in time to which the database can be restored. Formatted in Unix time.
The master user name of the database.
The status of parameter updates for the database.
The daily time range during which automated backups are created for the database (for example, 16:00-16:30 ).
The weekly time range during which system maintenance can occur on the database.
In the format ddd:hh24:mi-ddd:hh24:mi . For example, Tue:17:00-Tue:17:30 .
A Boolean value indicating whether the database is publicly accessible.
The master endpoint for the database.
Specifies the port that the database is listening on.
Specifies the DNS address of the database.
Describes the pending maintenance actions for the database.
Describes a pending database maintenance action.
The type of pending database maintenance action.
Additional detail about the pending database maintenance action.
The effective date of the pending database maintenance action.
The certificate associated with the database.
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,
'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.
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-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'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 a 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.