Skip to content

LightsailClient#

Index > Lightsail > LightsailClient

Auto-generated documentation for Lightsail type annotations stubs module mypy-boto3-lightsail.

LightsailClient#

Type annotations and code completion for boto3.client("lightsail"). boto3 documentation

# LightsailClient usage example

from boto3.session import Session
from mypy_boto3_lightsail.client import LightsailClient

def get_lightsail_client() -> LightsailClient:
    return Session().client("lightsail")

Exceptions#

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("lightsail").exceptions structure.

# Exceptions.exceptions usage example

client = boto3.client("lightsail")

try:
    do_something(client)
except (
    client.exceptions.AccessDeniedException,
    client.exceptions.AccountSetupInProgressException,
    client.exceptions.ClientError,
    client.exceptions.InvalidInputException,
    client.exceptions.NotFoundException,
    client.exceptions.OperationFailureException,
    client.exceptions.ServiceException,
    client.exceptions.UnauthenticatedException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_lightsail.client import Exceptions

def handle_error(exc: Exceptions.AccessDeniedException) -> None:
    ...

Methods#

allocate_static_ip#

Allocates a static IP address.

Type annotations and code completion for boto3.client("lightsail").allocate_static_ip method. boto3 documentation

# allocate_static_ip method definition

def allocate_static_ip(
    self,
    *,
    staticIpName: str,
) -> AllocateStaticIpResultTypeDef:  # (1)
    ...
  1. See AllocateStaticIpResultTypeDef
# allocate_static_ip method usage example with argument unpacking

kwargs: AllocateStaticIpRequestRequestTypeDef = {  # (1)
    "staticIpName": ...,
}

parent.allocate_static_ip(**kwargs)
  1. See AllocateStaticIpRequestRequestTypeDef

attach_certificate_to_distribution#

Attaches an SSL/TLS certificate to your Amazon Lightsail content delivery network (CDN) distribution.

Type annotations and code completion for boto3.client("lightsail").attach_certificate_to_distribution method. boto3 documentation

# attach_certificate_to_distribution method definition

def attach_certificate_to_distribution(
    self,
    *,
    distributionName: str,
    certificateName: str,
) -> AttachCertificateToDistributionResultTypeDef:  # (1)
    ...
  1. See AttachCertificateToDistributionResultTypeDef
# attach_certificate_to_distribution method usage example with argument unpacking

kwargs: AttachCertificateToDistributionRequestRequestTypeDef = {  # (1)
    "distributionName": ...,
    "certificateName": ...,
}

parent.attach_certificate_to_distribution(**kwargs)
  1. See AttachCertificateToDistributionRequestRequestTypeDef

attach_disk#

Attaches a block storage disk to a running or stopped Lightsail instance and exposes it to the instance with the specified disk name.

Type annotations and code completion for boto3.client("lightsail").attach_disk method. boto3 documentation

# attach_disk method definition

def attach_disk(
    self,
    *,
    diskName: str,
    instanceName: str,
    diskPath: str,
    autoMounting: bool = ...,
) -> AttachDiskResultTypeDef:  # (1)
    ...
  1. See AttachDiskResultTypeDef
# attach_disk method usage example with argument unpacking

kwargs: AttachDiskRequestRequestTypeDef = {  # (1)
    "diskName": ...,
    "instanceName": ...,
    "diskPath": ...,
}

parent.attach_disk(**kwargs)
  1. See AttachDiskRequestRequestTypeDef

attach_instances_to_load_balancer#

Attaches one or more Lightsail instances to a load balancer.

Type annotations and code completion for boto3.client("lightsail").attach_instances_to_load_balancer method. boto3 documentation

# attach_instances_to_load_balancer method definition

def attach_instances_to_load_balancer(
    self,
    *,
    loadBalancerName: str,
    instanceNames: Sequence[str],
) -> AttachInstancesToLoadBalancerResultTypeDef:  # (1)
    ...
  1. See AttachInstancesToLoadBalancerResultTypeDef
# attach_instances_to_load_balancer method usage example with argument unpacking

kwargs: AttachInstancesToLoadBalancerRequestRequestTypeDef = {  # (1)
    "loadBalancerName": ...,
    "instanceNames": ...,
}

parent.attach_instances_to_load_balancer(**kwargs)
  1. See AttachInstancesToLoadBalancerRequestRequestTypeDef

attach_load_balancer_tls_certificate#

Attaches a Transport Layer Security (TLS) certificate to your load balancer.

Type annotations and code completion for boto3.client("lightsail").attach_load_balancer_tls_certificate method. boto3 documentation

# attach_load_balancer_tls_certificate method definition

def attach_load_balancer_tls_certificate(
    self,
    *,
    loadBalancerName: str,
    certificateName: str,
) -> AttachLoadBalancerTlsCertificateResultTypeDef:  # (1)
    ...
  1. See AttachLoadBalancerTlsCertificateResultTypeDef
# attach_load_balancer_tls_certificate method usage example with argument unpacking

kwargs: AttachLoadBalancerTlsCertificateRequestRequestTypeDef = {  # (1)
    "loadBalancerName": ...,
    "certificateName": ...,
}

parent.attach_load_balancer_tls_certificate(**kwargs)
  1. See AttachLoadBalancerTlsCertificateRequestRequestTypeDef

attach_static_ip#

Attaches a static IP address to a specific Amazon Lightsail instance.

Type annotations and code completion for boto3.client("lightsail").attach_static_ip method. boto3 documentation

# attach_static_ip method definition

def attach_static_ip(
    self,
    *,
    staticIpName: str,
    instanceName: str,
) -> AttachStaticIpResultTypeDef:  # (1)
    ...
  1. See AttachStaticIpResultTypeDef
# attach_static_ip method usage example with argument unpacking

kwargs: AttachStaticIpRequestRequestTypeDef = {  # (1)
    "staticIpName": ...,
    "instanceName": ...,
}

parent.attach_static_ip(**kwargs)
  1. See AttachStaticIpRequestRequestTypeDef

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("lightsail").can_paginate method. boto3 documentation

# can_paginate method definition

def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close#

Closes underlying endpoint connections.

Type annotations and code completion for boto3.client("lightsail").close method. boto3 documentation

# close method definition

def close(
    self,
) -> None:
    ...

close_instance_public_ports#

Closes ports for a specific Amazon Lightsail instance.

Type annotations and code completion for boto3.client("lightsail").close_instance_public_ports method. boto3 documentation

# close_instance_public_ports method definition

def close_instance_public_ports(
    self,
    *,
    portInfo: PortInfoTypeDef,  # (1)
    instanceName: str,
) -> CloseInstancePublicPortsResultTypeDef:  # (2)
    ...
  1. See PortInfoTypeDef
  2. See CloseInstancePublicPortsResultTypeDef
# close_instance_public_ports method usage example with argument unpacking

kwargs: CloseInstancePublicPortsRequestRequestTypeDef = {  # (1)
    "portInfo": ...,
    "instanceName": ...,
}

parent.close_instance_public_ports(**kwargs)
  1. See CloseInstancePublicPortsRequestRequestTypeDef

copy_snapshot#

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.

Type annotations and code completion for boto3.client("lightsail").copy_snapshot method. boto3 documentation

# copy_snapshot method definition

def copy_snapshot(
    self,
    *,
    targetSnapshotName: str,
    sourceRegion: RegionNameType,  # (1)
    sourceSnapshotName: str = ...,
    sourceResourceName: str = ...,
    restoreDate: str = ...,
    useLatestRestorableAutoSnapshot: bool = ...,
) -> CopySnapshotResultTypeDef:  # (2)
    ...
  1. See RegionNameType
  2. See CopySnapshotResultTypeDef
# copy_snapshot method usage example with argument unpacking

kwargs: CopySnapshotRequestRequestTypeDef = {  # (1)
    "targetSnapshotName": ...,
    "sourceRegion": ...,
}

parent.copy_snapshot(**kwargs)
  1. See CopySnapshotRequestRequestTypeDef

create_bucket#

Creates an Amazon Lightsail bucket.

Type annotations and code completion for boto3.client("lightsail").create_bucket method. boto3 documentation

# create_bucket method definition

def create_bucket(
    self,
    *,
    bucketName: str,
    bundleId: str,
    tags: Sequence[TagTypeDef] = ...,  # (1)
    enableObjectVersioning: bool = ...,
) -> CreateBucketResultTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CreateBucketResultTypeDef
# create_bucket method usage example with argument unpacking

kwargs: CreateBucketRequestRequestTypeDef = {  # (1)
    "bucketName": ...,
    "bundleId": ...,
}

parent.create_bucket(**kwargs)
  1. See CreateBucketRequestRequestTypeDef

create_bucket_access_key#

Creates a new access key for the specified Amazon Lightsail bucket.

Type annotations and code completion for boto3.client("lightsail").create_bucket_access_key method. boto3 documentation

# create_bucket_access_key method definition

def create_bucket_access_key(
    self,
    *,
    bucketName: str,
) -> CreateBucketAccessKeyResultTypeDef:  # (1)
    ...
  1. See CreateBucketAccessKeyResultTypeDef
# create_bucket_access_key method usage example with argument unpacking

kwargs: CreateBucketAccessKeyRequestRequestTypeDef = {  # (1)
    "bucketName": ...,
}

parent.create_bucket_access_key(**kwargs)
  1. See CreateBucketAccessKeyRequestRequestTypeDef

create_certificate#

Creates an SSL/TLS certificate for an Amazon Lightsail content delivery network (CDN) distribution and a container service.

Type annotations and code completion for boto3.client("lightsail").create_certificate method. boto3 documentation

# create_certificate method definition

def create_certificate(
    self,
    *,
    certificateName: str,
    domainName: str,
    subjectAlternativeNames: Sequence[str] = ...,
    tags: Sequence[TagTypeDef] = ...,  # (1)
) -> CreateCertificateResultTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CreateCertificateResultTypeDef
# create_certificate method usage example with argument unpacking

kwargs: CreateCertificateRequestRequestTypeDef = {  # (1)
    "certificateName": ...,
    "domainName": ...,
}

parent.create_certificate(**kwargs)
  1. See CreateCertificateRequestRequestTypeDef

create_cloud_formation_stack#

Creates an AWS CloudFormation stack, which creates a new Amazon EC2 instance from an exported Amazon Lightsail snapshot.

Type annotations and code completion for boto3.client("lightsail").create_cloud_formation_stack method. boto3 documentation

# create_cloud_formation_stack method definition

def create_cloud_formation_stack(
    self,
    *,
    instances: Sequence[InstanceEntryTypeDef],  # (1)
) -> CreateCloudFormationStackResultTypeDef:  # (2)
    ...
  1. See InstanceEntryTypeDef
  2. See CreateCloudFormationStackResultTypeDef
# create_cloud_formation_stack method usage example with argument unpacking

kwargs: CreateCloudFormationStackRequestRequestTypeDef = {  # (1)
    "instances": ...,
}

parent.create_cloud_formation_stack(**kwargs)
  1. See CreateCloudFormationStackRequestRequestTypeDef

create_contact_method#

Creates an email or SMS text message contact method.

Type annotations and code completion for boto3.client("lightsail").create_contact_method method. boto3 documentation

# create_contact_method method definition

def create_contact_method(
    self,
    *,
    protocol: ContactProtocolType,  # (1)
    contactEndpoint: str,
) -> CreateContactMethodResultTypeDef:  # (2)
    ...
  1. See ContactProtocolType
  2. See CreateContactMethodResultTypeDef
# create_contact_method method usage example with argument unpacking

kwargs: CreateContactMethodRequestRequestTypeDef = {  # (1)
    "protocol": ...,
    "contactEndpoint": ...,
}

parent.create_contact_method(**kwargs)
  1. See CreateContactMethodRequestRequestTypeDef

create_container_service#

Creates an Amazon Lightsail container service.

Type annotations and code completion for boto3.client("lightsail").create_container_service method. boto3 documentation

# create_container_service method definition

def create_container_service(
    self,
    *,
    serviceName: str,
    power: ContainerServicePowerNameType,  # (1)
    scale: int,
    tags: Sequence[TagTypeDef] = ...,  # (2)
    publicDomainNames: Mapping[str, Sequence[str]] = ...,
    deployment: ContainerServiceDeploymentRequestTypeDef = ...,  # (3)
    privateRegistryAccess: PrivateRegistryAccessRequestTypeDef = ...,  # (4)
) -> CreateContainerServiceResultTypeDef:  # (5)
    ...
  1. See ContainerServicePowerNameType
  2. See TagTypeDef
  3. See ContainerServiceDeploymentRequestTypeDef
  4. See PrivateRegistryAccessRequestTypeDef
  5. See CreateContainerServiceResultTypeDef
# create_container_service method usage example with argument unpacking

kwargs: CreateContainerServiceRequestRequestTypeDef = {  # (1)
    "serviceName": ...,
    "power": ...,
    "scale": ...,
}

parent.create_container_service(**kwargs)
  1. See CreateContainerServiceRequestRequestTypeDef

create_container_service_deployment#

Creates a deployment for your Amazon Lightsail container service.

Type annotations and code completion for boto3.client("lightsail").create_container_service_deployment method. boto3 documentation

# create_container_service_deployment method definition

def create_container_service_deployment(
    self,
    *,
    serviceName: str,
    containers: Mapping[str, ContainerTypeDef] = ...,  # (1)
    publicEndpoint: EndpointRequestTypeDef = ...,  # (2)
) -> CreateContainerServiceDeploymentResultTypeDef:  # (3)
    ...
  1. See ContainerTypeDef
  2. See EndpointRequestTypeDef
  3. See CreateContainerServiceDeploymentResultTypeDef
# create_container_service_deployment method usage example with argument unpacking

kwargs: CreateContainerServiceDeploymentRequestRequestTypeDef = {  # (1)
    "serviceName": ...,
}

parent.create_container_service_deployment(**kwargs)
  1. See CreateContainerServiceDeploymentRequestRequestTypeDef

create_container_service_registry_login#

Creates a temporary set of log in credentials that you can use to log in to the Docker process on your local machine.

Type annotations and code completion for boto3.client("lightsail").create_container_service_registry_login method. boto3 documentation

# create_container_service_registry_login method definition

def create_container_service_registry_login(
    self,
) -> CreateContainerServiceRegistryLoginResultTypeDef:  # (1)
    ...
  1. See CreateContainerServiceRegistryLoginResultTypeDef

create_disk#

Creates a block storage disk that can be attached to an Amazon Lightsail instance in the same Availability Zone (e.g., us-east-2a).

Type annotations and code completion for boto3.client("lightsail").create_disk method. boto3 documentation

# create_disk method definition

def create_disk(
    self,
    *,
    diskName: str,
    availabilityZone: str,
    sizeInGb: int,
    tags: Sequence[TagTypeDef] = ...,  # (1)
    addOns: Sequence[AddOnRequestTypeDef] = ...,  # (2)
) -> CreateDiskResultTypeDef:  # (3)
    ...
  1. See TagTypeDef
  2. See AddOnRequestTypeDef
  3. See CreateDiskResultTypeDef
# create_disk method usage example with argument unpacking

kwargs: CreateDiskRequestRequestTypeDef = {  # (1)
    "diskName": ...,
    "availabilityZone": ...,
    "sizeInGb": ...,
}

parent.create_disk(**kwargs)
  1. See CreateDiskRequestRequestTypeDef

create_disk_from_snapshot#

Creates a block storage disk from a manual or automatic snapshot of a disk.

Type annotations and code completion for boto3.client("lightsail").create_disk_from_snapshot method. boto3 documentation

# create_disk_from_snapshot method definition

def create_disk_from_snapshot(
    self,
    *,
    diskName: str,
    availabilityZone: str,
    sizeInGb: int,
    diskSnapshotName: str = ...,
    tags: Sequence[TagTypeDef] = ...,  # (1)
    addOns: Sequence[AddOnRequestTypeDef] = ...,  # (2)
    sourceDiskName: str = ...,
    restoreDate: str = ...,
    useLatestRestorableAutoSnapshot: bool = ...,
) -> CreateDiskFromSnapshotResultTypeDef:  # (3)
    ...
  1. See TagTypeDef
  2. See AddOnRequestTypeDef
  3. See CreateDiskFromSnapshotResultTypeDef
# create_disk_from_snapshot method usage example with argument unpacking

kwargs: CreateDiskFromSnapshotRequestRequestTypeDef = {  # (1)
    "diskName": ...,
    "availabilityZone": ...,
    "sizeInGb": ...,
}

parent.create_disk_from_snapshot(**kwargs)
  1. See CreateDiskFromSnapshotRequestRequestTypeDef

create_disk_snapshot#

Creates a snapshot of a block storage disk.

Type annotations and code completion for boto3.client("lightsail").create_disk_snapshot method. boto3 documentation

# create_disk_snapshot method definition

def create_disk_snapshot(
    self,
    *,
    diskSnapshotName: str,
    diskName: str = ...,
    instanceName: str = ...,
    tags: Sequence[TagTypeDef] = ...,  # (1)
) -> CreateDiskSnapshotResultTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CreateDiskSnapshotResultTypeDef
# create_disk_snapshot method usage example with argument unpacking

kwargs: CreateDiskSnapshotRequestRequestTypeDef = {  # (1)
    "diskSnapshotName": ...,
}

parent.create_disk_snapshot(**kwargs)
  1. See CreateDiskSnapshotRequestRequestTypeDef

create_distribution#

Creates an Amazon Lightsail content delivery network (CDN) distribution.

Type annotations and code completion for boto3.client("lightsail").create_distribution method. boto3 documentation

# create_distribution method definition

def create_distribution(
    self,
    *,
    distributionName: str,
    origin: InputOriginTypeDef,  # (1)
    defaultCacheBehavior: CacheBehaviorTypeDef,  # (2)
    bundleId: str,
    cacheBehaviorSettings: CacheSettingsTypeDef = ...,  # (3)
    cacheBehaviors: Sequence[CacheBehaviorPerPathTypeDef] = ...,  # (4)
    ipAddressType: IpAddressTypeType = ...,  # (5)
    tags: Sequence[TagTypeDef] = ...,  # (6)
) -> CreateDistributionResultTypeDef:  # (7)
    ...
  1. See InputOriginTypeDef
  2. See CacheBehaviorTypeDef
  3. See CacheSettingsTypeDef
  4. See CacheBehaviorPerPathTypeDef
  5. See IpAddressTypeType
  6. See TagTypeDef
  7. See CreateDistributionResultTypeDef
# create_distribution method usage example with argument unpacking

kwargs: CreateDistributionRequestRequestTypeDef = {  # (1)
    "distributionName": ...,
    "origin": ...,
    "defaultCacheBehavior": ...,
    "bundleId": ...,
}

parent.create_distribution(**kwargs)
  1. See CreateDistributionRequestRequestTypeDef

create_domain#

Creates a domain resource for the specified domain (e.g., example.com).

Type annotations and code completion for boto3.client("lightsail").create_domain method. boto3 documentation

# create_domain method definition

def create_domain(
    self,
    *,
    domainName: str,
    tags: Sequence[TagTypeDef] = ...,  # (1)
) -> CreateDomainResultTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CreateDomainResultTypeDef
# create_domain method usage example with argument unpacking

kwargs: CreateDomainRequestRequestTypeDef = {  # (1)
    "domainName": ...,
}

parent.create_domain(**kwargs)
  1. See CreateDomainRequestRequestTypeDef

create_domain_entry#

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).

Type annotations and code completion for boto3.client("lightsail").create_domain_entry method. boto3 documentation

# create_domain_entry method definition

def create_domain_entry(
    self,
    *,
    domainName: str,
    domainEntry: DomainEntryTypeDef,  # (1)
) -> CreateDomainEntryResultTypeDef:  # (2)
    ...
  1. See DomainEntryTypeDef
  2. See CreateDomainEntryResultTypeDef
# create_domain_entry method usage example with argument unpacking

kwargs: CreateDomainEntryRequestRequestTypeDef = {  # (1)
    "domainName": ...,
    "domainEntry": ...,
}

parent.create_domain_entry(**kwargs)
  1. See CreateDomainEntryRequestRequestTypeDef

create_gui_session_access_details#

Creates two URLs that are used to access a virtual computer’s graphical user interface (GUI) session.

Type annotations and code completion for boto3.client("lightsail").create_gui_session_access_details method. boto3 documentation

# create_gui_session_access_details method definition

def create_gui_session_access_details(
    self,
    *,
    resourceName: str,
) -> CreateGUISessionAccessDetailsResultTypeDef:  # (1)
    ...
  1. See CreateGUISessionAccessDetailsResultTypeDef
# create_gui_session_access_details method usage example with argument unpacking

kwargs: CreateGUISessionAccessDetailsRequestRequestTypeDef = {  # (1)
    "resourceName": ...,
}

parent.create_gui_session_access_details(**kwargs)
  1. See CreateGUISessionAccessDetailsRequestRequestTypeDef

create_instance_snapshot#

Creates a snapshot of a specific virtual private server, or instance.

Type annotations and code completion for boto3.client("lightsail").create_instance_snapshot method. boto3 documentation

# create_instance_snapshot method definition

def create_instance_snapshot(
    self,
    *,
    instanceSnapshotName: str,
    instanceName: str,
    tags: Sequence[TagTypeDef] = ...,  # (1)
) -> CreateInstanceSnapshotResultTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CreateInstanceSnapshotResultTypeDef
# create_instance_snapshot method usage example with argument unpacking

kwargs: CreateInstanceSnapshotRequestRequestTypeDef = {  # (1)
    "instanceSnapshotName": ...,
    "instanceName": ...,
}

parent.create_instance_snapshot(**kwargs)
  1. See CreateInstanceSnapshotRequestRequestTypeDef

create_instances#

Creates one or more Amazon Lightsail instances.

Type annotations and code completion for boto3.client("lightsail").create_instances method. boto3 documentation

# create_instances method definition

def create_instances(
    self,
    *,
    instanceNames: Sequence[str],
    availabilityZone: str,
    blueprintId: str,
    bundleId: str,
    customImageName: str = ...,
    userData: str = ...,
    keyPairName: str = ...,
    tags: Sequence[TagTypeDef] = ...,  # (1)
    addOns: Sequence[AddOnRequestTypeDef] = ...,  # (2)
    ipAddressType: IpAddressTypeType = ...,  # (3)
) -> CreateInstancesResultTypeDef:  # (4)
    ...
  1. See TagTypeDef
  2. See AddOnRequestTypeDef
  3. See IpAddressTypeType
  4. See CreateInstancesResultTypeDef
# create_instances method usage example with argument unpacking

kwargs: CreateInstancesRequestRequestTypeDef = {  # (1)
    "instanceNames": ...,
    "availabilityZone": ...,
    "blueprintId": ...,
    "bundleId": ...,
}

parent.create_instances(**kwargs)
  1. See CreateInstancesRequestRequestTypeDef

create_instances_from_snapshot#

Creates one or more new instances from a manual or automatic snapshot of an instance.

Type annotations and code completion for boto3.client("lightsail").create_instances_from_snapshot method. boto3 documentation

# create_instances_from_snapshot method definition

def create_instances_from_snapshot(
    self,
    *,
    instanceNames: Sequence[str],
    availabilityZone: str,
    bundleId: str,
    attachedDiskMapping: Mapping[str, Sequence[DiskMapTypeDef]] = ...,  # (1)
    instanceSnapshotName: str = ...,
    userData: str = ...,
    keyPairName: str = ...,
    tags: Sequence[TagTypeDef] = ...,  # (2)
    addOns: Sequence[AddOnRequestTypeDef] = ...,  # (3)
    ipAddressType: IpAddressTypeType = ...,  # (4)
    sourceInstanceName: str = ...,
    restoreDate: str = ...,
    useLatestRestorableAutoSnapshot: bool = ...,
) -> CreateInstancesFromSnapshotResultTypeDef:  # (5)
    ...
  1. See DiskMapTypeDef
  2. See TagTypeDef
  3. See AddOnRequestTypeDef
  4. See IpAddressTypeType
  5. See CreateInstancesFromSnapshotResultTypeDef
# create_instances_from_snapshot method usage example with argument unpacking

kwargs: CreateInstancesFromSnapshotRequestRequestTypeDef = {  # (1)
    "instanceNames": ...,
    "availabilityZone": ...,
    "bundleId": ...,
}

parent.create_instances_from_snapshot(**kwargs)
  1. See CreateInstancesFromSnapshotRequestRequestTypeDef

create_key_pair#

Creates a custom SSH key pair that you can use with an Amazon Lightsail instance.

Type annotations and code completion for boto3.client("lightsail").create_key_pair method. boto3 documentation

# create_key_pair method definition

def create_key_pair(
    self,
    *,
    keyPairName: str,
    tags: Sequence[TagTypeDef] = ...,  # (1)
) -> CreateKeyPairResultTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CreateKeyPairResultTypeDef
# create_key_pair method usage example with argument unpacking

kwargs: CreateKeyPairRequestRequestTypeDef = {  # (1)
    "keyPairName": ...,
}

parent.create_key_pair(**kwargs)
  1. See CreateKeyPairRequestRequestTypeDef

create_load_balancer#

Creates a Lightsail load balancer.

Type annotations and code completion for boto3.client("lightsail").create_load_balancer method. boto3 documentation

# create_load_balancer method definition

def create_load_balancer(
    self,
    *,
    loadBalancerName: str,
    instancePort: int,
    healthCheckPath: str = ...,
    certificateName: str = ...,
    certificateDomainName: str = ...,
    certificateAlternativeNames: Sequence[str] = ...,
    tags: Sequence[TagTypeDef] = ...,  # (1)
    ipAddressType: IpAddressTypeType = ...,  # (2)
    tlsPolicyName: str = ...,
) -> CreateLoadBalancerResultTypeDef:  # (3)
    ...
  1. See TagTypeDef
  2. See IpAddressTypeType
  3. See CreateLoadBalancerResultTypeDef
# create_load_balancer method usage example with argument unpacking

kwargs: CreateLoadBalancerRequestRequestTypeDef = {  # (1)
    "loadBalancerName": ...,
    "instancePort": ...,
}

parent.create_load_balancer(**kwargs)
  1. See CreateLoadBalancerRequestRequestTypeDef

create_load_balancer_tls_certificate#

Creates an SSL/TLS certificate for an Amazon Lightsail load balancer.

Type annotations and code completion for boto3.client("lightsail").create_load_balancer_tls_certificate method. boto3 documentation

# create_load_balancer_tls_certificate method definition

def create_load_balancer_tls_certificate(
    self,
    *,
    loadBalancerName: str,
    certificateName: str,
    certificateDomainName: str,
    certificateAlternativeNames: Sequence[str] = ...,
    tags: Sequence[TagTypeDef] = ...,  # (1)
) -> CreateLoadBalancerTlsCertificateResultTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CreateLoadBalancerTlsCertificateResultTypeDef
# create_load_balancer_tls_certificate method usage example with argument unpacking

kwargs: CreateLoadBalancerTlsCertificateRequestRequestTypeDef = {  # (1)
    "loadBalancerName": ...,
    "certificateName": ...,
    "certificateDomainName": ...,
}

parent.create_load_balancer_tls_certificate(**kwargs)
  1. See CreateLoadBalancerTlsCertificateRequestRequestTypeDef

create_relational_database#

Creates a new database in Amazon Lightsail.

Type annotations and code completion for boto3.client("lightsail").create_relational_database method. boto3 documentation

# create_relational_database method definition

def create_relational_database(
    self,
    *,
    relationalDatabaseName: str,
    relationalDatabaseBlueprintId: str,
    relationalDatabaseBundleId: str,
    masterDatabaseName: str,
    masterUsername: str,
    availabilityZone: str = ...,
    masterUserPassword: str = ...,
    preferredBackupWindow: str = ...,
    preferredMaintenanceWindow: str = ...,
    publiclyAccessible: bool = ...,
    tags: Sequence[TagTypeDef] = ...,  # (1)
) -> CreateRelationalDatabaseResultTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CreateRelationalDatabaseResultTypeDef
# create_relational_database method usage example with argument unpacking

kwargs: CreateRelationalDatabaseRequestRequestTypeDef = {  # (1)
    "relationalDatabaseName": ...,
    "relationalDatabaseBlueprintId": ...,
    "relationalDatabaseBundleId": ...,
    "masterDatabaseName": ...,
    "masterUsername": ...,
}

parent.create_relational_database(**kwargs)
  1. See CreateRelationalDatabaseRequestRequestTypeDef

create_relational_database_from_snapshot#

Creates a new database from an existing database snapshot in Amazon Lightsail.

Type annotations and code completion for boto3.client("lightsail").create_relational_database_from_snapshot method. boto3 documentation

# create_relational_database_from_snapshot method definition

def create_relational_database_from_snapshot(
    self,
    *,
    relationalDatabaseName: str,
    availabilityZone: str = ...,
    publiclyAccessible: bool = ...,
    relationalDatabaseSnapshotName: str = ...,
    relationalDatabaseBundleId: str = ...,
    sourceRelationalDatabaseName: str = ...,
    restoreTime: Union[datetime, str] = ...,
    useLatestRestorableTime: bool = ...,
    tags: Sequence[TagTypeDef] = ...,  # (1)
) -> CreateRelationalDatabaseFromSnapshotResultTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CreateRelationalDatabaseFromSnapshotResultTypeDef
# create_relational_database_from_snapshot method usage example with argument unpacking

kwargs: CreateRelationalDatabaseFromSnapshotRequestRequestTypeDef = {  # (1)
    "relationalDatabaseName": ...,
}

parent.create_relational_database_from_snapshot(**kwargs)
  1. See CreateRelationalDatabaseFromSnapshotRequestRequestTypeDef

create_relational_database_snapshot#

Creates a snapshot of your database in Amazon Lightsail.

Type annotations and code completion for boto3.client("lightsail").create_relational_database_snapshot method. boto3 documentation

# create_relational_database_snapshot method definition

def create_relational_database_snapshot(
    self,
    *,
    relationalDatabaseName: str,
    relationalDatabaseSnapshotName: str,
    tags: Sequence[TagTypeDef] = ...,  # (1)
) -> CreateRelationalDatabaseSnapshotResultTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CreateRelationalDatabaseSnapshotResultTypeDef
# create_relational_database_snapshot method usage example with argument unpacking

kwargs: CreateRelationalDatabaseSnapshotRequestRequestTypeDef = {  # (1)
    "relationalDatabaseName": ...,
    "relationalDatabaseSnapshotName": ...,
}

parent.create_relational_database_snapshot(**kwargs)
  1. See CreateRelationalDatabaseSnapshotRequestRequestTypeDef

delete_alarm#

Deletes an alarm.

Type annotations and code completion for boto3.client("lightsail").delete_alarm method. boto3 documentation

# delete_alarm method definition

def delete_alarm(
    self,
    *,
    alarmName: str,
) -> DeleteAlarmResultTypeDef:  # (1)
    ...
  1. See DeleteAlarmResultTypeDef
# delete_alarm method usage example with argument unpacking

kwargs: DeleteAlarmRequestRequestTypeDef = {  # (1)
    "alarmName": ...,
}

parent.delete_alarm(**kwargs)
  1. See DeleteAlarmRequestRequestTypeDef

delete_auto_snapshot#

Deletes an automatic snapshot of an instance or disk.

Type annotations and code completion for boto3.client("lightsail").delete_auto_snapshot method. boto3 documentation

# delete_auto_snapshot method definition

def delete_auto_snapshot(
    self,
    *,
    resourceName: str,
    date: str,
) -> DeleteAutoSnapshotResultTypeDef:  # (1)
    ...
  1. See DeleteAutoSnapshotResultTypeDef
# delete_auto_snapshot method usage example with argument unpacking

kwargs: DeleteAutoSnapshotRequestRequestTypeDef = {  # (1)
    "resourceName": ...,
    "date": ...,
}

parent.delete_auto_snapshot(**kwargs)
  1. See DeleteAutoSnapshotRequestRequestTypeDef

delete_bucket#

Deletes a Amazon Lightsail bucket.

Type annotations and code completion for boto3.client("lightsail").delete_bucket method. boto3 documentation

# delete_bucket method definition

def delete_bucket(
    self,
    *,
    bucketName: str,
    forceDelete: bool = ...,
) -> DeleteBucketResultTypeDef:  # (1)
    ...
  1. See DeleteBucketResultTypeDef
# delete_bucket method usage example with argument unpacking

kwargs: DeleteBucketRequestRequestTypeDef = {  # (1)
    "bucketName": ...,
}

parent.delete_bucket(**kwargs)
  1. See DeleteBucketRequestRequestTypeDef

delete_bucket_access_key#

Deletes an access key for the specified Amazon Lightsail bucket.

Type annotations and code completion for boto3.client("lightsail").delete_bucket_access_key method. boto3 documentation

# delete_bucket_access_key method definition

def delete_bucket_access_key(
    self,
    *,
    bucketName: str,
    accessKeyId: str,
) -> DeleteBucketAccessKeyResultTypeDef:  # (1)
    ...
  1. See DeleteBucketAccessKeyResultTypeDef
# delete_bucket_access_key method usage example with argument unpacking

kwargs: DeleteBucketAccessKeyRequestRequestTypeDef = {  # (1)
    "bucketName": ...,
    "accessKeyId": ...,
}

parent.delete_bucket_access_key(**kwargs)
  1. See DeleteBucketAccessKeyRequestRequestTypeDef

delete_certificate#

Deletes an SSL/TLS certificate for your Amazon Lightsail content delivery network (CDN) distribution.

Type annotations and code completion for boto3.client("lightsail").delete_certificate method. boto3 documentation

# delete_certificate method definition

def delete_certificate(
    self,
    *,
    certificateName: str,
) -> DeleteCertificateResultTypeDef:  # (1)
    ...
  1. See DeleteCertificateResultTypeDef
# delete_certificate method usage example with argument unpacking

kwargs: DeleteCertificateRequestRequestTypeDef = {  # (1)
    "certificateName": ...,
}

parent.delete_certificate(**kwargs)
  1. See DeleteCertificateRequestRequestTypeDef

delete_contact_method#

Deletes a contact method.

Type annotations and code completion for boto3.client("lightsail").delete_contact_method method. boto3 documentation

# delete_contact_method method definition

def delete_contact_method(
    self,
    *,
    protocol: ContactProtocolType,  # (1)
) -> DeleteContactMethodResultTypeDef:  # (2)
    ...
  1. See ContactProtocolType
  2. See DeleteContactMethodResultTypeDef
# delete_contact_method method usage example with argument unpacking

kwargs: DeleteContactMethodRequestRequestTypeDef = {  # (1)
    "protocol": ...,
}

parent.delete_contact_method(**kwargs)
  1. See DeleteContactMethodRequestRequestTypeDef

delete_container_image#

Deletes a container image that is registered to your Amazon Lightsail container service.

Type annotations and code completion for boto3.client("lightsail").delete_container_image method. boto3 documentation

# delete_container_image method definition

def delete_container_image(
    self,
    *,
    serviceName: str,
    image: str,
) -> Dict[str, Any]:
    ...
# delete_container_image method usage example with argument unpacking

kwargs: DeleteContainerImageRequestRequestTypeDef = {  # (1)
    "serviceName": ...,
    "image": ...,
}

parent.delete_container_image(**kwargs)
  1. See DeleteContainerImageRequestRequestTypeDef

delete_container_service#

Deletes your Amazon Lightsail container service.

Type annotations and code completion for boto3.client("lightsail").delete_container_service method. boto3 documentation

# delete_container_service method definition

def delete_container_service(
    self,
    *,
    serviceName: str,
) -> Dict[str, Any]:
    ...
# delete_container_service method usage example with argument unpacking

kwargs: DeleteContainerServiceRequestRequestTypeDef = {  # (1)
    "serviceName": ...,
}

parent.delete_container_service(**kwargs)
  1. See DeleteContainerServiceRequestRequestTypeDef

delete_disk#

Deletes the specified block storage disk.

Type annotations and code completion for boto3.client("lightsail").delete_disk method. boto3 documentation

# delete_disk method definition

def delete_disk(
    self,
    *,
    diskName: str,
    forceDeleteAddOns: bool = ...,
) -> DeleteDiskResultTypeDef:  # (1)
    ...
  1. See DeleteDiskResultTypeDef
# delete_disk method usage example with argument unpacking

kwargs: DeleteDiskRequestRequestTypeDef = {  # (1)
    "diskName": ...,
}

parent.delete_disk(**kwargs)
  1. See DeleteDiskRequestRequestTypeDef

delete_disk_snapshot#

Deletes the specified disk snapshot.

Type annotations and code completion for boto3.client("lightsail").delete_disk_snapshot method. boto3 documentation

# delete_disk_snapshot method definition

def delete_disk_snapshot(
    self,
    *,
    diskSnapshotName: str,
) -> DeleteDiskSnapshotResultTypeDef:  # (1)
    ...
  1. See DeleteDiskSnapshotResultTypeDef
# delete_disk_snapshot method usage example with argument unpacking

kwargs: DeleteDiskSnapshotRequestRequestTypeDef = {  # (1)
    "diskSnapshotName": ...,
}

parent.delete_disk_snapshot(**kwargs)
  1. See DeleteDiskSnapshotRequestRequestTypeDef

delete_distribution#

Deletes your Amazon Lightsail content delivery network (CDN) distribution.

Type annotations and code completion for boto3.client("lightsail").delete_distribution method. boto3 documentation

# delete_distribution method definition

def delete_distribution(
    self,
    *,
    distributionName: str = ...,
) -> DeleteDistributionResultTypeDef:  # (1)
    ...
  1. See DeleteDistributionResultTypeDef
# delete_distribution method usage example with argument unpacking

kwargs: DeleteDistributionRequestRequestTypeDef = {  # (1)
    "distributionName": ...,
}

parent.delete_distribution(**kwargs)
  1. See DeleteDistributionRequestRequestTypeDef

delete_domain#

Deletes the specified domain recordset and all of its domain records.

Type annotations and code completion for boto3.client("lightsail").delete_domain method. boto3 documentation

# delete_domain method definition

def delete_domain(
    self,
    *,
    domainName: str,
) -> DeleteDomainResultTypeDef:  # (1)
    ...
  1. See DeleteDomainResultTypeDef
# delete_domain method usage example with argument unpacking

kwargs: DeleteDomainRequestRequestTypeDef = {  # (1)
    "domainName": ...,
}

parent.delete_domain(**kwargs)
  1. See DeleteDomainRequestRequestTypeDef

delete_domain_entry#

Deletes a specific domain entry.

Type annotations and code completion for boto3.client("lightsail").delete_domain_entry method. boto3 documentation

# delete_domain_entry method definition

def delete_domain_entry(
    self,
    *,
    domainName: str,
    domainEntry: DomainEntryTypeDef,  # (1)
) -> DeleteDomainEntryResultTypeDef:  # (2)
    ...
  1. See DomainEntryTypeDef
  2. See DeleteDomainEntryResultTypeDef
# delete_domain_entry method usage example with argument unpacking

kwargs: DeleteDomainEntryRequestRequestTypeDef = {  # (1)
    "domainName": ...,
    "domainEntry": ...,
}

parent.delete_domain_entry(**kwargs)
  1. See DeleteDomainEntryRequestRequestTypeDef

delete_instance#

Deletes an Amazon Lightsail instance.

Type annotations and code completion for boto3.client("lightsail").delete_instance method. boto3 documentation

# delete_instance method definition

def delete_instance(
    self,
    *,
    instanceName: str,
    forceDeleteAddOns: bool = ...,
) -> DeleteInstanceResultTypeDef:  # (1)
    ...
  1. See DeleteInstanceResultTypeDef
# delete_instance method usage example with argument unpacking

kwargs: DeleteInstanceRequestRequestTypeDef = {  # (1)
    "instanceName": ...,
}

parent.delete_instance(**kwargs)
  1. See DeleteInstanceRequestRequestTypeDef

delete_instance_snapshot#

Deletes a specific snapshot of a virtual private server (or instance).

Type annotations and code completion for boto3.client("lightsail").delete_instance_snapshot method. boto3 documentation

# delete_instance_snapshot method definition

def delete_instance_snapshot(
    self,
    *,
    instanceSnapshotName: str,
) -> DeleteInstanceSnapshotResultTypeDef:  # (1)
    ...
  1. See DeleteInstanceSnapshotResultTypeDef
# delete_instance_snapshot method usage example with argument unpacking

kwargs: DeleteInstanceSnapshotRequestRequestTypeDef = {  # (1)
    "instanceSnapshotName": ...,
}

parent.delete_instance_snapshot(**kwargs)
  1. See DeleteInstanceSnapshotRequestRequestTypeDef

delete_key_pair#

Deletes the specified key pair by removing the public key from Amazon Lightsail.

Type annotations and code completion for boto3.client("lightsail").delete_key_pair method. boto3 documentation

# delete_key_pair method definition

def delete_key_pair(
    self,
    *,
    keyPairName: str,
    expectedFingerprint: str = ...,
) -> DeleteKeyPairResultTypeDef:  # (1)
    ...
  1. See DeleteKeyPairResultTypeDef
# delete_key_pair method usage example with argument unpacking

kwargs: DeleteKeyPairRequestRequestTypeDef = {  # (1)
    "keyPairName": ...,
}

parent.delete_key_pair(**kwargs)
  1. See DeleteKeyPairRequestRequestTypeDef

delete_known_host_keys#

Deletes the known host key or certificate used by the Amazon Lightsail browser- based SSH or RDP clients to authenticate an instance.

Type annotations and code completion for boto3.client("lightsail").delete_known_host_keys method. boto3 documentation

# delete_known_host_keys method definition

def delete_known_host_keys(
    self,
    *,
    instanceName: str,
) -> DeleteKnownHostKeysResultTypeDef:  # (1)
    ...
  1. See DeleteKnownHostKeysResultTypeDef
# delete_known_host_keys method usage example with argument unpacking

kwargs: DeleteKnownHostKeysRequestRequestTypeDef = {  # (1)
    "instanceName": ...,
}

parent.delete_known_host_keys(**kwargs)
  1. See DeleteKnownHostKeysRequestRequestTypeDef

delete_load_balancer#

Deletes a Lightsail load balancer and all its associated SSL/TLS certificates.

Type annotations and code completion for boto3.client("lightsail").delete_load_balancer method. boto3 documentation

# delete_load_balancer method definition

def delete_load_balancer(
    self,
    *,
    loadBalancerName: str,
) -> DeleteLoadBalancerResultTypeDef:  # (1)
    ...
  1. See DeleteLoadBalancerResultTypeDef
# delete_load_balancer method usage example with argument unpacking

kwargs: DeleteLoadBalancerRequestRequestTypeDef = {  # (1)
    "loadBalancerName": ...,
}

parent.delete_load_balancer(**kwargs)
  1. See DeleteLoadBalancerRequestRequestTypeDef

delete_load_balancer_tls_certificate#

Deletes an SSL/TLS certificate associated with a Lightsail load balancer.

Type annotations and code completion for boto3.client("lightsail").delete_load_balancer_tls_certificate method. boto3 documentation

# delete_load_balancer_tls_certificate method definition

def delete_load_balancer_tls_certificate(
    self,
    *,
    loadBalancerName: str,
    certificateName: str,
    force: bool = ...,
) -> DeleteLoadBalancerTlsCertificateResultTypeDef:  # (1)
    ...
  1. See DeleteLoadBalancerTlsCertificateResultTypeDef
# delete_load_balancer_tls_certificate method usage example with argument unpacking

kwargs: DeleteLoadBalancerTlsCertificateRequestRequestTypeDef = {  # (1)
    "loadBalancerName": ...,
    "certificateName": ...,
}

parent.delete_load_balancer_tls_certificate(**kwargs)
  1. See DeleteLoadBalancerTlsCertificateRequestRequestTypeDef

delete_relational_database#

Deletes a database in Amazon Lightsail.

Type annotations and code completion for boto3.client("lightsail").delete_relational_database method. boto3 documentation

# delete_relational_database method definition

def delete_relational_database(
    self,
    *,
    relationalDatabaseName: str,
    skipFinalSnapshot: bool = ...,
    finalRelationalDatabaseSnapshotName: str = ...,
) -> DeleteRelationalDatabaseResultTypeDef:  # (1)
    ...
  1. See DeleteRelationalDatabaseResultTypeDef
# delete_relational_database method usage example with argument unpacking

kwargs: DeleteRelationalDatabaseRequestRequestTypeDef = {  # (1)
    "relationalDatabaseName": ...,
}

parent.delete_relational_database(**kwargs)
  1. See DeleteRelationalDatabaseRequestRequestTypeDef

delete_relational_database_snapshot#

Deletes a database snapshot in Amazon Lightsail.

Type annotations and code completion for boto3.client("lightsail").delete_relational_database_snapshot method. boto3 documentation

# delete_relational_database_snapshot method definition

def delete_relational_database_snapshot(
    self,
    *,
    relationalDatabaseSnapshotName: str,
) -> DeleteRelationalDatabaseSnapshotResultTypeDef:  # (1)
    ...
  1. See DeleteRelationalDatabaseSnapshotResultTypeDef
# delete_relational_database_snapshot method usage example with argument unpacking

kwargs: DeleteRelationalDatabaseSnapshotRequestRequestTypeDef = {  # (1)
    "relationalDatabaseSnapshotName": ...,
}

parent.delete_relational_database_snapshot(**kwargs)
  1. See DeleteRelationalDatabaseSnapshotRequestRequestTypeDef

detach_certificate_from_distribution#

Detaches an SSL/TLS certificate from your Amazon Lightsail content delivery network (CDN) distribution.

Type annotations and code completion for boto3.client("lightsail").detach_certificate_from_distribution method. boto3 documentation

# detach_certificate_from_distribution method definition

def detach_certificate_from_distribution(
    self,
    *,
    distributionName: str,
) -> DetachCertificateFromDistributionResultTypeDef:  # (1)
    ...
  1. See DetachCertificateFromDistributionResultTypeDef
# detach_certificate_from_distribution method usage example with argument unpacking

kwargs: DetachCertificateFromDistributionRequestRequestTypeDef = {  # (1)
    "distributionName": ...,
}

parent.detach_certificate_from_distribution(**kwargs)
  1. See DetachCertificateFromDistributionRequestRequestTypeDef

detach_disk#

Detaches a stopped block storage disk from a Lightsail instance.

Type annotations and code completion for boto3.client("lightsail").detach_disk method. boto3 documentation

# detach_disk method definition

def detach_disk(
    self,
    *,
    diskName: str,
) -> DetachDiskResultTypeDef:  # (1)
    ...
  1. See DetachDiskResultTypeDef
# detach_disk method usage example with argument unpacking

kwargs: DetachDiskRequestRequestTypeDef = {  # (1)
    "diskName": ...,
}

parent.detach_disk(**kwargs)
  1. See DetachDiskRequestRequestTypeDef

detach_instances_from_load_balancer#

Detaches the specified instances from a Lightsail load balancer.

Type annotations and code completion for boto3.client("lightsail").detach_instances_from_load_balancer method.