# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
from ._inputs import *

__all__ = ['InstanceArgs', 'Instance']

@pulumi.input_type
class InstanceArgs:
    def __init__(__self__, *,
                 availability_zone: pulumi.Input[str],
                 blueprint_id: pulumi.Input[str],
                 bundle_id: pulumi.Input[str],
                 add_on: Optional[pulumi.Input['InstanceAddOnArgs']] = None,
                 ip_address_type: Optional[pulumi.Input[str]] = None,
                 key_pair_name: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 user_data: Optional[pulumi.Input[str]] = None):
        """
        The set of arguments for constructing a Instance resource.
        :param pulumi.Input[str] availability_zone: The Availability Zone in which to create your
               instance (see list below)
        :param pulumi.Input[str] blueprint_id: The ID for a virtual private server image. A list of available blueprint IDs can be obtained using the AWS CLI command: `aws lightsail get-blueprints`
        :param pulumi.Input[str] bundle_id: The bundle of specification information (see list below)
        :param pulumi.Input['InstanceAddOnArgs'] add_on: The add on configuration for the instance. Detailed below.
        :param pulumi.Input[str] ip_address_type: The IP address type of the Lightsail Instance. Valid Values: `dualstack` | `ipv4`.
        :param pulumi.Input[str] key_pair_name: The name of your key pair. Created in the
               Lightsail console (cannot use `ec2.KeyPair` at this time)
        :param pulumi.Input[str] name: The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.
        :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
        :param pulumi.Input[str] user_data: launch script to configure server with additional user data
        """
        pulumi.set(__self__, "availability_zone", availability_zone)
        pulumi.set(__self__, "blueprint_id", blueprint_id)
        pulumi.set(__self__, "bundle_id", bundle_id)
        if add_on is not None:
            pulumi.set(__self__, "add_on", add_on)
        if ip_address_type is not None:
            pulumi.set(__self__, "ip_address_type", ip_address_type)
        if key_pair_name is not None:
            pulumi.set(__self__, "key_pair_name", key_pair_name)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if tags is not None:
            pulumi.set(__self__, "tags", tags)
        if user_data is not None:
            pulumi.set(__self__, "user_data", user_data)

    @property
    @pulumi.getter(name="availabilityZone")
    def availability_zone(self) -> pulumi.Input[str]:
        """
        The Availability Zone in which to create your
        instance (see list below)
        """
        return pulumi.get(self, "availability_zone")

    @availability_zone.setter
    def availability_zone(self, value: pulumi.Input[str]):
        pulumi.set(self, "availability_zone", value)

    @property
    @pulumi.getter(name="blueprintId")
    def blueprint_id(self) -> pulumi.Input[str]:
        """
        The ID for a virtual private server image. A list of available blueprint IDs can be obtained using the AWS CLI command: `aws lightsail get-blueprints`
        """
        return pulumi.get(self, "blueprint_id")

    @blueprint_id.setter
    def blueprint_id(self, value: pulumi.Input[str]):
        pulumi.set(self, "blueprint_id", value)

    @property
    @pulumi.getter(name="bundleId")
    def bundle_id(self) -> pulumi.Input[str]:
        """
        The bundle of specification information (see list below)
        """
        return pulumi.get(self, "bundle_id")

    @bundle_id.setter
    def bundle_id(self, value: pulumi.Input[str]):
        pulumi.set(self, "bundle_id", value)

    @property
    @pulumi.getter(name="addOn")
    def add_on(self) -> Optional[pulumi.Input['InstanceAddOnArgs']]:
        """
        The add on configuration for the instance. Detailed below.
        """
        return pulumi.get(self, "add_on")

    @add_on.setter
    def add_on(self, value: Optional[pulumi.Input['InstanceAddOnArgs']]):
        pulumi.set(self, "add_on", value)

    @property
    @pulumi.getter(name="ipAddressType")
    def ip_address_type(self) -> Optional[pulumi.Input[str]]:
        """
        The IP address type of the Lightsail Instance. Valid Values: `dualstack` | `ipv4`.
        """
        return pulumi.get(self, "ip_address_type")

    @ip_address_type.setter
    def ip_address_type(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "ip_address_type", value)

    @property
    @pulumi.getter(name="keyPairName")
    def key_pair_name(self) -> Optional[pulumi.Input[str]]:
        """
        The name of your key pair. Created in the
        Lightsail console (cannot use `ec2.KeyPair` at this time)
        """
        return pulumi.get(self, "key_pair_name")

    @key_pair_name.setter
    def key_pair_name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "key_pair_name", value)

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[str]]:
        """
        The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.
        """
        return pulumi.get(self, "name")

    @name.setter
    def name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "name", value)

    @property
    @pulumi.getter
    def tags(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
        """
        A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
        """
        return pulumi.get(self, "tags")

    @tags.setter
    def tags(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
        pulumi.set(self, "tags", value)

    @property
    @pulumi.getter(name="userData")
    def user_data(self) -> Optional[pulumi.Input[str]]:
        """
        launch script to configure server with additional user data
        """
        return pulumi.get(self, "user_data")

    @user_data.setter
    def user_data(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "user_data", value)


@pulumi.input_type
class _InstanceState:
    def __init__(__self__, *,
                 add_on: Optional[pulumi.Input['InstanceAddOnArgs']] = None,
                 arn: Optional[pulumi.Input[str]] = None,
                 availability_zone: Optional[pulumi.Input[str]] = None,
                 blueprint_id: Optional[pulumi.Input[str]] = None,
                 bundle_id: Optional[pulumi.Input[str]] = None,
                 cpu_count: Optional[pulumi.Input[int]] = None,
                 created_at: Optional[pulumi.Input[str]] = None,
                 ip_address_type: Optional[pulumi.Input[str]] = None,
                 ipv6_address: Optional[pulumi.Input[str]] = None,
                 ipv6_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 is_static_ip: Optional[pulumi.Input[bool]] = None,
                 key_pair_name: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 private_ip_address: Optional[pulumi.Input[str]] = None,
                 public_ip_address: Optional[pulumi.Input[str]] = None,
                 ram_size: Optional[pulumi.Input[float]] = None,
                 tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 tags_all: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 user_data: Optional[pulumi.Input[str]] = None,
                 username: Optional[pulumi.Input[str]] = None):
        """
        Input properties used for looking up and filtering Instance resources.
        :param pulumi.Input['InstanceAddOnArgs'] add_on: The add on configuration for the instance. Detailed below.
        :param pulumi.Input[str] arn: The ARN of the Lightsail instance (matches `id`).
        :param pulumi.Input[str] availability_zone: The Availability Zone in which to create your
               instance (see list below)
        :param pulumi.Input[str] blueprint_id: The ID for a virtual private server image. A list of available blueprint IDs can be obtained using the AWS CLI command: `aws lightsail get-blueprints`
        :param pulumi.Input[str] bundle_id: The bundle of specification information (see list below)
        :param pulumi.Input[int] cpu_count: The number of vCPUs the instance has.
        :param pulumi.Input[str] created_at: The timestamp when the instance was created.
        :param pulumi.Input[str] ip_address_type: The IP address type of the Lightsail Instance. Valid Values: `dualstack` | `ipv4`.
        :param pulumi.Input[str] ipv6_address: (**Deprecated**) The first IPv6 address of the Lightsail instance. Use `ipv6_addresses` attribute instead.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] ipv6_addresses: List of IPv6 addresses for the Lightsail instance.
        :param pulumi.Input[bool] is_static_ip: A Boolean value indicating whether this instance has a static IP assigned to it.
        :param pulumi.Input[str] key_pair_name: The name of your key pair. Created in the
               Lightsail console (cannot use `ec2.KeyPair` at this time)
        :param pulumi.Input[str] name: The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.
        :param pulumi.Input[str] private_ip_address: The private IP address of the instance.
        :param pulumi.Input[str] public_ip_address: The public IP address of the instance.
        :param pulumi.Input[float] ram_size: The amount of RAM in GB on the instance (e.g., 1.0).
        :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
        :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags_all: A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
        :param pulumi.Input[str] user_data: launch script to configure server with additional user data
        :param pulumi.Input[str] username: The user name for connecting to the instance (e.g., ec2-user).
        """
        if add_on is not None:
            pulumi.set(__self__, "add_on", add_on)
        if arn is not None:
            pulumi.set(__self__, "arn", arn)
        if availability_zone is not None:
            pulumi.set(__self__, "availability_zone", availability_zone)
        if blueprint_id is not None:
            pulumi.set(__self__, "blueprint_id", blueprint_id)
        if bundle_id is not None:
            pulumi.set(__self__, "bundle_id", bundle_id)
        if cpu_count is not None:
            pulumi.set(__self__, "cpu_count", cpu_count)
        if created_at is not None:
            pulumi.set(__self__, "created_at", created_at)
        if ip_address_type is not None:
            pulumi.set(__self__, "ip_address_type", ip_address_type)
        if ipv6_address is not None:
            warnings.warn("""use `ipv6_addresses` attribute instead""", DeprecationWarning)
            pulumi.log.warn("""ipv6_address is deprecated: use `ipv6_addresses` attribute instead""")
        if ipv6_address is not None:
            pulumi.set(__self__, "ipv6_address", ipv6_address)
        if ipv6_addresses is not None:
            pulumi.set(__self__, "ipv6_addresses", ipv6_addresses)
        if is_static_ip is not None:
            pulumi.set(__self__, "is_static_ip", is_static_ip)
        if key_pair_name is not None:
            pulumi.set(__self__, "key_pair_name", key_pair_name)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if private_ip_address is not None:
            pulumi.set(__self__, "private_ip_address", private_ip_address)
        if public_ip_address is not None:
            pulumi.set(__self__, "public_ip_address", public_ip_address)
        if ram_size is not None:
            pulumi.set(__self__, "ram_size", ram_size)
        if tags is not None:
            pulumi.set(__self__, "tags", tags)
        if tags_all is not None:
            pulumi.set(__self__, "tags_all", tags_all)
        if user_data is not None:
            pulumi.set(__self__, "user_data", user_data)
        if username is not None:
            pulumi.set(__self__, "username", username)

    @property
    @pulumi.getter(name="addOn")
    def add_on(self) -> Optional[pulumi.Input['InstanceAddOnArgs']]:
        """
        The add on configuration for the instance. Detailed below.
        """
        return pulumi.get(self, "add_on")

    @add_on.setter
    def add_on(self, value: Optional[pulumi.Input['InstanceAddOnArgs']]):
        pulumi.set(self, "add_on", value)

    @property
    @pulumi.getter
    def arn(self) -> Optional[pulumi.Input[str]]:
        """
        The ARN of the Lightsail instance (matches `id`).
        """
        return pulumi.get(self, "arn")

    @arn.setter
    def arn(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "arn", value)

    @property
    @pulumi.getter(name="availabilityZone")
    def availability_zone(self) -> Optional[pulumi.Input[str]]:
        """
        The Availability Zone in which to create your
        instance (see list below)
        """
        return pulumi.get(self, "availability_zone")

    @availability_zone.setter
    def availability_zone(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "availability_zone", value)

    @property
    @pulumi.getter(name="blueprintId")
    def blueprint_id(self) -> Optional[pulumi.Input[str]]:
        """
        The ID for a virtual private server image. A list of available blueprint IDs can be obtained using the AWS CLI command: `aws lightsail get-blueprints`
        """
        return pulumi.get(self, "blueprint_id")

    @blueprint_id.setter
    def blueprint_id(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "blueprint_id", value)

    @property
    @pulumi.getter(name="bundleId")
    def bundle_id(self) -> Optional[pulumi.Input[str]]:
        """
        The bundle of specification information (see list below)
        """
        return pulumi.get(self, "bundle_id")

    @bundle_id.setter
    def bundle_id(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "bundle_id", value)

    @property
    @pulumi.getter(name="cpuCount")
    def cpu_count(self) -> Optional[pulumi.Input[int]]:
        """
        The number of vCPUs the instance has.
        """
        return pulumi.get(self, "cpu_count")

    @cpu_count.setter
    def cpu_count(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "cpu_count", value)

    @property
    @pulumi.getter(name="createdAt")
    def created_at(self) -> Optional[pulumi.Input[str]]:
        """
        The timestamp when the instance was created.
        """
        return pulumi.get(self, "created_at")

    @created_at.setter
    def created_at(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "created_at", value)

    @property
    @pulumi.getter(name="ipAddressType")
    def ip_address_type(self) -> Optional[pulumi.Input[str]]:
        """
        The IP address type of the Lightsail Instance. Valid Values: `dualstack` | `ipv4`.
        """
        return pulumi.get(self, "ip_address_type")

    @ip_address_type.setter
    def ip_address_type(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "ip_address_type", value)

    @property
    @pulumi.getter(name="ipv6Address")
    def ipv6_address(self) -> Optional[pulumi.Input[str]]:
        """
        (**Deprecated**) The first IPv6 address of the Lightsail instance. Use `ipv6_addresses` attribute instead.
        """
        return pulumi.get(self, "ipv6_address")

    @ipv6_address.setter
    def ipv6_address(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "ipv6_address", value)

    @property
    @pulumi.getter(name="ipv6Addresses")
    def ipv6_addresses(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        List of IPv6 addresses for the Lightsail instance.
        """
        return pulumi.get(self, "ipv6_addresses")

    @ipv6_addresses.setter
    def ipv6_addresses(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "ipv6_addresses", value)

    @property
    @pulumi.getter(name="isStaticIp")
    def is_static_ip(self) -> Optional[pulumi.Input[bool]]:
        """
        A Boolean value indicating whether this instance has a static IP assigned to it.
        """
        return pulumi.get(self, "is_static_ip")

    @is_static_ip.setter
    def is_static_ip(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "is_static_ip", value)

    @property
    @pulumi.getter(name="keyPairName")
    def key_pair_name(self) -> Optional[pulumi.Input[str]]:
        """
        The name of your key pair. Created in the
        Lightsail console (cannot use `ec2.KeyPair` at this time)
        """
        return pulumi.get(self, "key_pair_name")

    @key_pair_name.setter
    def key_pair_name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "key_pair_name", value)

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[str]]:
        """
        The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.
        """
        return pulumi.get(self, "name")

    @name.setter
    def name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "name", value)

    @property
    @pulumi.getter(name="privateIpAddress")
    def private_ip_address(self) -> Optional[pulumi.Input[str]]:
        """
        The private IP address of the instance.
        """
        return pulumi.get(self, "private_ip_address")

    @private_ip_address.setter
    def private_ip_address(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "private_ip_address", value)

    @property
    @pulumi.getter(name="publicIpAddress")
    def public_ip_address(self) -> Optional[pulumi.Input[str]]:
        """
        The public IP address of the instance.
        """
        return pulumi.get(self, "public_ip_address")

    @public_ip_address.setter
    def public_ip_address(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "public_ip_address", value)

    @property
    @pulumi.getter(name="ramSize")
    def ram_size(self) -> Optional[pulumi.Input[float]]:
        """
        The amount of RAM in GB on the instance (e.g., 1.0).
        """
        return pulumi.get(self, "ram_size")

    @ram_size.setter
    def ram_size(self, value: Optional[pulumi.Input[float]]):
        pulumi.set(self, "ram_size", value)

    @property
    @pulumi.getter
    def tags(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
        """
        A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
        """
        return pulumi.get(self, "tags")

    @tags.setter
    def tags(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
        pulumi.set(self, "tags", value)

    @property
    @pulumi.getter(name="tagsAll")
    def tags_all(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
        """
        A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
        """
        return pulumi.get(self, "tags_all")

    @tags_all.setter
    def tags_all(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
        pulumi.set(self, "tags_all", value)

    @property
    @pulumi.getter(name="userData")
    def user_data(self) -> Optional[pulumi.Input[str]]:
        """
        launch script to configure server with additional user data
        """
        return pulumi.get(self, "user_data")

    @user_data.setter
    def user_data(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "user_data", value)

    @property
    @pulumi.getter
    def username(self) -> Optional[pulumi.Input[str]]:
        """
        The user name for connecting to the instance (e.g., ec2-user).
        """
        return pulumi.get(self, "username")

    @username.setter
    def username(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "username", value)


class Instance(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 add_on: Optional[pulumi.Input[pulumi.InputType['InstanceAddOnArgs']]] = None,
                 availability_zone: Optional[pulumi.Input[str]] = None,
                 blueprint_id: Optional[pulumi.Input[str]] = None,
                 bundle_id: Optional[pulumi.Input[str]] = None,
                 ip_address_type: Optional[pulumi.Input[str]] = None,
                 key_pair_name: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 user_data: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        """
        Provides a Lightsail Instance. Amazon Lightsail is a service to provide easy virtual private servers
        with custom software already setup. See [What is Amazon Lightsail?](https://lightsail.aws.amazon.com/ls/docs/getting-started/article/what-is-amazon-lightsail)
        for more information.

        > **Note:** Lightsail is currently only supported in a limited number of AWS Regions, please see ["Regions and Availability Zones in Amazon Lightsail"](https://lightsail.aws.amazon.com/ls/docs/overview/article/understanding-regions-and-availability-zones-in-amazon-lightsail) for more details

        ## Example Usage
        ### Basic Usage

        ```python
        import pulumi
        import pulumi_aws as aws

        # Create a new GitLab Lightsail Instance
        gitlab_test = aws.lightsail.Instance("gitlabTest",
            availability_zone="us-east-1b",
            blueprint_id="amazon_linux",
            bundle_id="nano_1_0",
            key_pair_name="some_key_name",
            tags={
                "foo": "bar",
            })
        ```
        ### Enable Auto Snapshots

        ```python
        import pulumi
        import pulumi_aws as aws

        test = aws.lightsail.Instance("test",
            add_on=aws.lightsail.InstanceAddOnArgs(
                snapshot_time="06:00",
                status="Enabled",
                type="AutoSnapshot",
            ),
            availability_zone="us-east-1b",
            blueprint_id="amazon_linux",
            bundle_id="nano_1_0",
            tags={
                "foo": "bar",
            })
        ```
        ## Availability Zones

        Lightsail currently supports the following Availability Zones (e.g., `us-east-1a`):

        - `ap-northeast-1{a,c,d}`
        - `ap-northeast-2{a,c}`
        - `ap-south-1{a,b}`
        - `ap-southeast-1{a,b,c}`
        - `ap-southeast-2{a,b,c}`
        - `ca-central-1{a,b}`
        - `eu-central-1{a,b,c}`
        - `eu-west-1{a,b,c}`
        - `eu-west-2{a,b,c}`
        - `eu-west-3{a,b,c}`
        - `us-east-1{a,b,c,d,e,f}`
        - `us-east-2{a,b,c}`
        - `us-west-2{a,b,c}`

        ## Bundles

        Lightsail currently supports the following Bundle IDs (e.g., an instance in `ap-northeast-1` would use `small_2_0`):

        ### Prefix

        A Bundle ID starts with one of the below size prefixes:

        - `nano_`
        - `micro_`
        - `small_`
        - `medium_`
        - `large_`
        - `xlarge_`
        - `2xlarge_`

        ### Suffix

        A Bundle ID ends with one of the following suffixes depending on Availability Zone:

        - ap-northeast-1: `2_0`
        - ap-northeast-2: `2_0`
        - ap-south-1: `2_1`
        - ap-southeast-1: `2_0`
        - ap-southeast-2: `2_2`
        - ca-central-1: `2_0`
        - eu-central-1: `2_0`
        - eu-west-1: `2_0`
        - eu-west-2: `2_0`
        - eu-west-3: `2_0`
        - us-east-1: `2_0`
        - us-east-2: `2_0`
        - us-west-2: `2_0`

        ## Import

        Lightsail Instances can be imported using their name, e.g.,

        ```sh
         $ pulumi import aws:lightsail/instance:Instance gitlab_test 'custom_gitlab'
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[pulumi.InputType['InstanceAddOnArgs']] add_on: The add on configuration for the instance. Detailed below.
        :param pulumi.Input[str] availability_zone: The Availability Zone in which to create your
               instance (see list below)
        :param pulumi.Input[str] blueprint_id: The ID for a virtual private server image. A list of available blueprint IDs can be obtained using the AWS CLI command: `aws lightsail get-blueprints`
        :param pulumi.Input[str] bundle_id: The bundle of specification information (see list below)
        :param pulumi.Input[str] ip_address_type: The IP address type of the Lightsail Instance. Valid Values: `dualstack` | `ipv4`.
        :param pulumi.Input[str] key_pair_name: The name of your key pair. Created in the
               Lightsail console (cannot use `ec2.KeyPair` at this time)
        :param pulumi.Input[str] name: The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.
        :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
        :param pulumi.Input[str] user_data: launch script to configure server with additional user data
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: InstanceArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Provides a Lightsail Instance. Amazon Lightsail is a service to provide easy virtual private servers
        with custom software already setup. See [What is Amazon Lightsail?](https://lightsail.aws.amazon.com/ls/docs/getting-started/article/what-is-amazon-lightsail)
        for more information.

        > **Note:** Lightsail is currently only supported in a limited number of AWS Regions, please see ["Regions and Availability Zones in Amazon Lightsail"](https://lightsail.aws.amazon.com/ls/docs/overview/article/understanding-regions-and-availability-zones-in-amazon-lightsail) for more details

        ## Example Usage
        ### Basic Usage

        ```python
        import pulumi
        import pulumi_aws as aws

        # Create a new GitLab Lightsail Instance
        gitlab_test = aws.lightsail.Instance("gitlabTest",
            availability_zone="us-east-1b",
            blueprint_id="amazon_linux",
            bundle_id="nano_1_0",
            key_pair_name="some_key_name",
            tags={
                "foo": "bar",
            })
        ```
        ### Enable Auto Snapshots

        ```python
        import pulumi
        import pulumi_aws as aws

        test = aws.lightsail.Instance("test",
            add_on=aws.lightsail.InstanceAddOnArgs(
                snapshot_time="06:00",
                status="Enabled",
                type="AutoSnapshot",
            ),
            availability_zone="us-east-1b",
            blueprint_id="amazon_linux",
            bundle_id="nano_1_0",
            tags={
                "foo": "bar",
            })
        ```
        ## Availability Zones

        Lightsail currently supports the following Availability Zones (e.g., `us-east-1a`):

        - `ap-northeast-1{a,c,d}`
        - `ap-northeast-2{a,c}`
        - `ap-south-1{a,b}`
        - `ap-southeast-1{a,b,c}`
        - `ap-southeast-2{a,b,c}`
        - `ca-central-1{a,b}`
        - `eu-central-1{a,b,c}`
        - `eu-west-1{a,b,c}`
        - `eu-west-2{a,b,c}`
        - `eu-west-3{a,b,c}`
        - `us-east-1{a,b,c,d,e,f}`
        - `us-east-2{a,b,c}`
        - `us-west-2{a,b,c}`

        ## Bundles

        Lightsail currently supports the following Bundle IDs (e.g., an instance in `ap-northeast-1` would use `small_2_0`):

        ### Prefix

        A Bundle ID starts with one of the below size prefixes:

        - `nano_`
        - `micro_`
        - `small_`
        - `medium_`
        - `large_`
        - `xlarge_`
        - `2xlarge_`

        ### Suffix

        A Bundle ID ends with one of the following suffixes depending on Availability Zone:

        - ap-northeast-1: `2_0`
        - ap-northeast-2: `2_0`
        - ap-south-1: `2_1`
        - ap-southeast-1: `2_0`
        - ap-southeast-2: `2_2`
        - ca-central-1: `2_0`
        - eu-central-1: `2_0`
        - eu-west-1: `2_0`
        - eu-west-2: `2_0`
        - eu-west-3: `2_0`
        - us-east-1: `2_0`
        - us-east-2: `2_0`
        - us-west-2: `2_0`

        ## Import

        Lightsail Instances can be imported using their name, e.g.,

        ```sh
         $ pulumi import aws:lightsail/instance:Instance gitlab_test 'custom_gitlab'
        ```

        :param str resource_name: The name of the resource.
        :param InstanceArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(InstanceArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 add_on: Optional[pulumi.Input[pulumi.InputType['InstanceAddOnArgs']]] = None,
                 availability_zone: Optional[pulumi.Input[str]] = None,
                 blueprint_id: Optional[pulumi.Input[str]] = None,
                 bundle_id: Optional[pulumi.Input[str]] = None,
                 ip_address_type: Optional[pulumi.Input[str]] = None,
                 key_pair_name: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 user_data: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = InstanceArgs.__new__(InstanceArgs)

            __props__.__dict__["add_on"] = add_on
            if availability_zone is None and not opts.urn:
                raise TypeError("Missing required property 'availability_zone'")
            __props__.__dict__["availability_zone"] = availability_zone
            if blueprint_id is None and not opts.urn:
                raise TypeError("Missing required property 'blueprint_id'")
            __props__.__dict__["blueprint_id"] = blueprint_id
            if bundle_id is None and not opts.urn:
                raise TypeError("Missing required property 'bundle_id'")
            __props__.__dict__["bundle_id"] = bundle_id
            __props__.__dict__["ip_address_type"] = ip_address_type
            __props__.__dict__["key_pair_name"] = key_pair_name
            __props__.__dict__["name"] = name
            __props__.__dict__["tags"] = tags
            __props__.__dict__["user_data"] = user_data
            __props__.__dict__["arn"] = None
            __props__.__dict__["cpu_count"] = None
            __props__.__dict__["created_at"] = None
            __props__.__dict__["ipv6_address"] = None
            __props__.__dict__["ipv6_addresses"] = None
            __props__.__dict__["is_static_ip"] = None
            __props__.__dict__["private_ip_address"] = None
            __props__.__dict__["public_ip_address"] = None
            __props__.__dict__["ram_size"] = None
            __props__.__dict__["tags_all"] = None
            __props__.__dict__["username"] = None
        super(Instance, __self__).__init__(
            'aws:lightsail/instance:Instance',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            add_on: Optional[pulumi.Input[pulumi.InputType['InstanceAddOnArgs']]] = None,
            arn: Optional[pulumi.Input[str]] = None,
            availability_zone: Optional[pulumi.Input[str]] = None,
            blueprint_id: Optional[pulumi.Input[str]] = None,
            bundle_id: Optional[pulumi.Input[str]] = None,
            cpu_count: Optional[pulumi.Input[int]] = None,
            created_at: Optional[pulumi.Input[str]] = None,
            ip_address_type: Optional[pulumi.Input[str]] = None,
            ipv6_address: Optional[pulumi.Input[str]] = None,
            ipv6_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            is_static_ip: Optional[pulumi.Input[bool]] = None,
            key_pair_name: Optional[pulumi.Input[str]] = None,
            name: Optional[pulumi.Input[str]] = None,
            private_ip_address: Optional[pulumi.Input[str]] = None,
            public_ip_address: Optional[pulumi.Input[str]] = None,
            ram_size: Optional[pulumi.Input[float]] = None,
            tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
            tags_all: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
            user_data: Optional[pulumi.Input[str]] = None,
            username: Optional[pulumi.Input[str]] = None) -> 'Instance':
        """
        Get an existing Instance resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[pulumi.InputType['InstanceAddOnArgs']] add_on: The add on configuration for the instance. Detailed below.
        :param pulumi.Input[str] arn: The ARN of the Lightsail instance (matches `id`).
        :param pulumi.Input[str] availability_zone: The Availability Zone in which to create your
               instance (see list below)
        :param pulumi.Input[str] blueprint_id: The ID for a virtual private server image. A list of available blueprint IDs can be obtained using the AWS CLI command: `aws lightsail get-blueprints`
        :param pulumi.Input[str] bundle_id: The bundle of specification information (see list below)
        :param pulumi.Input[int] cpu_count: The number of vCPUs the instance has.
        :param pulumi.Input[str] created_at: The timestamp when the instance was created.
        :param pulumi.Input[str] ip_address_type: The IP address type of the Lightsail Instance. Valid Values: `dualstack` | `ipv4`.
        :param pulumi.Input[str] ipv6_address: (**Deprecated**) The first IPv6 address of the Lightsail instance. Use `ipv6_addresses` attribute instead.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] ipv6_addresses: List of IPv6 addresses for the Lightsail instance.
        :param pulumi.Input[bool] is_static_ip: A Boolean value indicating whether this instance has a static IP assigned to it.
        :param pulumi.Input[str] key_pair_name: The name of your key pair. Created in the
               Lightsail console (cannot use `ec2.KeyPair` at this time)
        :param pulumi.Input[str] name: The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.
        :param pulumi.Input[str] private_ip_address: The private IP address of the instance.
        :param pulumi.Input[str] public_ip_address: The public IP address of the instance.
        :param pulumi.Input[float] ram_size: The amount of RAM in GB on the instance (e.g., 1.0).
        :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
        :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags_all: A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
        :param pulumi.Input[str] user_data: launch script to configure server with additional user data
        :param pulumi.Input[str] username: The user name for connecting to the instance (e.g., ec2-user).
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _InstanceState.__new__(_InstanceState)

        __props__.__dict__["add_on"] = add_on
        __props__.__dict__["arn"] = arn
        __props__.__dict__["availability_zone"] = availability_zone
        __props__.__dict__["blueprint_id"] = blueprint_id
        __props__.__dict__["bundle_id"] = bundle_id
        __props__.__dict__["cpu_count"] = cpu_count
        __props__.__dict__["created_at"] = created_at
        __props__.__dict__["ip_address_type"] = ip_address_type
        __props__.__dict__["ipv6_address"] = ipv6_address
        __props__.__dict__["ipv6_addresses"] = ipv6_addresses
        __props__.__dict__["is_static_ip"] = is_static_ip
        __props__.__dict__["key_pair_name"] = key_pair_name
        __props__.__dict__["name"] = name
        __props__.__dict__["private_ip_address"] = private_ip_address
        __props__.__dict__["public_ip_address"] = public_ip_address
        __props__.__dict__["ram_size"] = ram_size
        __props__.__dict__["tags"] = tags
        __props__.__dict__["tags_all"] = tags_all
        __props__.__dict__["user_data"] = user_data
        __props__.__dict__["username"] = username
        return Instance(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="addOn")
    def add_on(self) -> pulumi.Output[Optional['outputs.InstanceAddOn']]:
        """
        The add on configuration for the instance. Detailed below.
        """
        return pulumi.get(self, "add_on")

    @property
    @pulumi.getter
    def arn(self) -> pulumi.Output[str]:
        """
        The ARN of the Lightsail instance (matches `id`).
        """
        return pulumi.get(self, "arn")

    @property
    @pulumi.getter(name="availabilityZone")
    def availability_zone(self) -> pulumi.Output[str]:
        """
        The Availability Zone in which to create your
        instance (see list below)
        """
        return pulumi.get(self, "availability_zone")

    @property
    @pulumi.getter(name="blueprintId")
    def blueprint_id(self) -> pulumi.Output[str]:
        """
        The ID for a virtual private server image. A list of available blueprint IDs can be obtained using the AWS CLI command: `aws lightsail get-blueprints`
        """
        return pulumi.get(self, "blueprint_id")

    @property
    @pulumi.getter(name="bundleId")
    def bundle_id(self) -> pulumi.Output[str]:
        """
        The bundle of specification information (see list below)
        """
        return pulumi.get(self, "bundle_id")

    @property
    @pulumi.getter(name="cpuCount")
    def cpu_count(self) -> pulumi.Output[int]:
        """
        The number of vCPUs the instance has.
        """
        return pulumi.get(self, "cpu_count")

    @property
    @pulumi.getter(name="createdAt")
    def created_at(self) -> pulumi.Output[str]:
        """
        The timestamp when the instance was created.
        """
        return pulumi.get(self, "created_at")

    @property
    @pulumi.getter(name="ipAddressType")
    def ip_address_type(self) -> pulumi.Output[Optional[str]]:
        """
        The IP address type of the Lightsail Instance. Valid Values: `dualstack` | `ipv4`.
        """
        return pulumi.get(self, "ip_address_type")

    @property
    @pulumi.getter(name="ipv6Address")
    def ipv6_address(self) -> pulumi.Output[str]:
        """
        (**Deprecated**) The first IPv6 address of the Lightsail instance. Use `ipv6_addresses` attribute instead.
        """
        return pulumi.get(self, "ipv6_address")

    @property
    @pulumi.getter(name="ipv6Addresses")
    def ipv6_addresses(self) -> pulumi.Output[Sequence[str]]:
        """
        List of IPv6 addresses for the Lightsail instance.
        """
        return pulumi.get(self, "ipv6_addresses")

    @property
    @pulumi.getter(name="isStaticIp")
    def is_static_ip(self) -> pulumi.Output[bool]:
        """
        A Boolean value indicating whether this instance has a static IP assigned to it.
        """
        return pulumi.get(self, "is_static_ip")

    @property
    @pulumi.getter(name="keyPairName")
    def key_pair_name(self) -> pulumi.Output[Optional[str]]:
        """
        The name of your key pair. Created in the
        Lightsail console (cannot use `ec2.KeyPair` at this time)
        """
        return pulumi.get(self, "key_pair_name")

    @property
    @pulumi.getter
    def name(self) -> pulumi.Output[str]:
        """
        The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="privateIpAddress")
    def private_ip_address(self) -> pulumi.Output[str]:
        """
        The private IP address of the instance.
        """
        return pulumi.get(self, "private_ip_address")

    @property
    @pulumi.getter(name="publicIpAddress")
    def public_ip_address(self) -> pulumi.Output[str]:
        """
        The public IP address of the instance.
        """
        return pulumi.get(self, "public_ip_address")

    @property
    @pulumi.getter(name="ramSize")
    def ram_size(self) -> pulumi.Output[float]:
        """
        The amount of RAM in GB on the instance (e.g., 1.0).
        """
        return pulumi.get(self, "ram_size")

    @property
    @pulumi.getter
    def tags(self) -> pulumi.Output[Optional[Mapping[str, str]]]:
        """
        A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
        """
        return pulumi.get(self, "tags")

    @property
    @pulumi.getter(name="tagsAll")
    def tags_all(self) -> pulumi.Output[Mapping[str, str]]:
        """
        A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
        """
        return pulumi.get(self, "tags_all")

    @property
    @pulumi.getter(name="userData")
    def user_data(self) -> pulumi.Output[Optional[str]]:
        """
        launch script to configure server with additional user data
        """
        return pulumi.get(self, "user_data")

    @property
    @pulumi.getter
    def username(self) -> pulumi.Output[str]:
        """
        The user name for connecting to the instance (e.g., ec2-user).
        """
        return pulumi.get(self, "username")

