1. Packages
  2. AWS
  3. API Docs
  4. lightsail
  5. Database
AWS v6.54.2 published on Wednesday, Oct 2, 2024 by Pulumi

aws.lightsail.Database

Explore with Pulumi AI

aws logo
AWS v6.54.2 published on Wednesday, Oct 2, 2024 by Pulumi

    Provides a Lightsail Database. Amazon Lightsail is a service to provide easy virtual private servers with custom software already setup. See 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” for more details

    Example Usage

    Basic mysql blueprint

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const test = new aws.lightsail.Database("test", {
        relationalDatabaseName: "test",
        availabilityZone: "us-east-1a",
        masterDatabaseName: "testdatabasename",
        masterPassword: "testdatabasepassword",
        masterUsername: "test",
        blueprintId: "mysql_8_0",
        bundleId: "micro_1_0",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    test = aws.lightsail.Database("test",
        relational_database_name="test",
        availability_zone="us-east-1a",
        master_database_name="testdatabasename",
        master_password="testdatabasepassword",
        master_username="test",
        blueprint_id="mysql_8_0",
        bundle_id="micro_1_0")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lightsail"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := lightsail.NewDatabase(ctx, "test", &lightsail.DatabaseArgs{
    			RelationalDatabaseName: pulumi.String("test"),
    			AvailabilityZone:       pulumi.String("us-east-1a"),
    			MasterDatabaseName:     pulumi.String("testdatabasename"),
    			MasterPassword:         pulumi.String("testdatabasepassword"),
    			MasterUsername:         pulumi.String("test"),
    			BlueprintId:            pulumi.String("mysql_8_0"),
    			BundleId:               pulumi.String("micro_1_0"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Aws.LightSail.Database("test", new()
        {
            RelationalDatabaseName = "test",
            AvailabilityZone = "us-east-1a",
            MasterDatabaseName = "testdatabasename",
            MasterPassword = "testdatabasepassword",
            MasterUsername = "test",
            BlueprintId = "mysql_8_0",
            BundleId = "micro_1_0",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.lightsail.Database;
    import com.pulumi.aws.lightsail.DatabaseArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var test = new Database("test", DatabaseArgs.builder()
                .relationalDatabaseName("test")
                .availabilityZone("us-east-1a")
                .masterDatabaseName("testdatabasename")
                .masterPassword("testdatabasepassword")
                .masterUsername("test")
                .blueprintId("mysql_8_0")
                .bundleId("micro_1_0")
                .build());
    
        }
    }
    
    resources:
      test:
        type: aws:lightsail:Database
        properties:
          relationalDatabaseName: test
          availabilityZone: us-east-1a
          masterDatabaseName: testdatabasename
          masterPassword: testdatabasepassword
          masterUsername: test
          blueprintId: mysql_8_0
          bundleId: micro_1_0
    

    Basic postrgres blueprint

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const test = new aws.lightsail.Database("test", {
        relationalDatabaseName: "test",
        availabilityZone: "us-east-1a",
        masterDatabaseName: "testdatabasename",
        masterPassword: "testdatabasepassword",
        masterUsername: "test",
        blueprintId: "postgres_12",
        bundleId: "micro_1_0",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    test = aws.lightsail.Database("test",
        relational_database_name="test",
        availability_zone="us-east-1a",
        master_database_name="testdatabasename",
        master_password="testdatabasepassword",
        master_username="test",
        blueprint_id="postgres_12",
        bundle_id="micro_1_0")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lightsail"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := lightsail.NewDatabase(ctx, "test", &lightsail.DatabaseArgs{
    			RelationalDatabaseName: pulumi.String("test"),
    			AvailabilityZone:       pulumi.String("us-east-1a"),
    			MasterDatabaseName:     pulumi.String("testdatabasename"),
    			MasterPassword:         pulumi.String("testdatabasepassword"),
    			MasterUsername:         pulumi.String("test"),
    			BlueprintId:            pulumi.String("postgres_12"),
    			BundleId:               pulumi.String("micro_1_0"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Aws.LightSail.Database("test", new()
        {
            RelationalDatabaseName = "test",
            AvailabilityZone = "us-east-1a",
            MasterDatabaseName = "testdatabasename",
            MasterPassword = "testdatabasepassword",
            MasterUsername = "test",
            BlueprintId = "postgres_12",
            BundleId = "micro_1_0",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.lightsail.Database;
    import com.pulumi.aws.lightsail.DatabaseArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var test = new Database("test", DatabaseArgs.builder()
                .relationalDatabaseName("test")
                .availabilityZone("us-east-1a")
                .masterDatabaseName("testdatabasename")
                .masterPassword("testdatabasepassword")
                .masterUsername("test")
                .blueprintId("postgres_12")
                .bundleId("micro_1_0")
                .build());
    
        }
    }
    
    resources:
      test:
        type: aws:lightsail:Database
        properties:
          relationalDatabaseName: test
          availabilityZone: us-east-1a
          masterDatabaseName: testdatabasename
          masterPassword: testdatabasepassword
          masterUsername: test
          blueprintId: postgres_12
          bundleId: micro_1_0
    

    Custom backup and maintenance windows

    Below is an example that sets a custom backup and maintenance window. Times are specified in UTC. This example will allow daily backups to take place between 16:00 and 16:30 each day. This example also requires any maintiance tasks (anything that would cause an outage, including changing some attributes) to take place on Tuesdays between 17:00 and 17:30. An action taken against this database that would cause an outage will wait until this time window to make the requested changes.

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const test = new aws.lightsail.Database("test", {
        relationalDatabaseName: "test",
        availabilityZone: "us-east-1a",
        masterDatabaseName: "testdatabasename",
        masterPassword: "testdatabasepassword",
        masterUsername: "test",
        blueprintId: "postgres_12",
        bundleId: "micro_1_0",
        preferredBackupWindow: "16:00-16:30",
        preferredMaintenanceWindow: "Tue:17:00-Tue:17:30",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    test = aws.lightsail.Database("test",
        relational_database_name="test",
        availability_zone="us-east-1a",
        master_database_name="testdatabasename",
        master_password="testdatabasepassword",
        master_username="test",
        blueprint_id="postgres_12",
        bundle_id="micro_1_0",
        preferred_backup_window="16:00-16:30",
        preferred_maintenance_window="Tue:17:00-Tue:17:30")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lightsail"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := lightsail.NewDatabase(ctx, "test", &lightsail.DatabaseArgs{
    			RelationalDatabaseName:     pulumi.String("test"),
    			AvailabilityZone:           pulumi.String("us-east-1a"),
    			MasterDatabaseName:         pulumi.String("testdatabasename"),
    			MasterPassword:             pulumi.String("testdatabasepassword"),
    			MasterUsername:             pulumi.String("test"),
    			BlueprintId:                pulumi.String("postgres_12"),
    			BundleId:                   pulumi.String("micro_1_0"),
    			PreferredBackupWindow:      pulumi.String("16:00-16:30"),
    			PreferredMaintenanceWindow: pulumi.String("Tue:17:00-Tue:17:30"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Aws.LightSail.Database("test", new()
        {
            RelationalDatabaseName = "test",
            AvailabilityZone = "us-east-1a",
            MasterDatabaseName = "testdatabasename",
            MasterPassword = "testdatabasepassword",
            MasterUsername = "test",
            BlueprintId = "postgres_12",
            BundleId = "micro_1_0",
            PreferredBackupWindow = "16:00-16:30",
            PreferredMaintenanceWindow = "Tue:17:00-Tue:17:30",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.lightsail.Database;
    import com.pulumi.aws.lightsail.DatabaseArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var test = new Database("test", DatabaseArgs.builder()
                .relationalDatabaseName("test")
                .availabilityZone("us-east-1a")
                .masterDatabaseName("testdatabasename")
                .masterPassword("testdatabasepassword")
                .masterUsername("test")
                .blueprintId("postgres_12")
                .bundleId("micro_1_0")
                .preferredBackupWindow("16:00-16:30")
                .preferredMaintenanceWindow("Tue:17:00-Tue:17:30")
                .build());
    
        }
    }
    
    resources:
      test:
        type: aws:lightsail:Database
        properties:
          relationalDatabaseName: test
          availabilityZone: us-east-1a
          masterDatabaseName: testdatabasename
          masterPassword: testdatabasepassword
          masterUsername: test
          blueprintId: postgres_12
          bundleId: micro_1_0
          preferredBackupWindow: 16:00-16:30
          preferredMaintenanceWindow: Tue:17:00-Tue:17:30
    

    Final Snapshots

    To enable creating a final snapshot of your database on deletion, use the final_snapshot_name argument to provide a name to be used for the snapshot.

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const test = new aws.lightsail.Database("test", {
        relationalDatabaseName: "test",
        availabilityZone: "us-east-1a",
        masterDatabaseName: "testdatabasename",
        masterPassword: "testdatabasepassword",
        masterUsername: "test",
        blueprintId: "postgres_12",
        bundleId: "micro_1_0",
        preferredBackupWindow: "16:00-16:30",
        preferredMaintenanceWindow: "Tue:17:00-Tue:17:30",
        finalSnapshotName: "MyFinalSnapshot",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    test = aws.lightsail.Database("test",
        relational_database_name="test",
        availability_zone="us-east-1a",
        master_database_name="testdatabasename",
        master_password="testdatabasepassword",
        master_username="test",
        blueprint_id="postgres_12",
        bundle_id="micro_1_0",
        preferred_backup_window="16:00-16:30",
        preferred_maintenance_window="Tue:17:00-Tue:17:30",
        final_snapshot_name="MyFinalSnapshot")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lightsail"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := lightsail.NewDatabase(ctx, "test", &lightsail.DatabaseArgs{
    			RelationalDatabaseName:     pulumi.String("test"),
    			AvailabilityZone:           pulumi.String("us-east-1a"),
    			MasterDatabaseName:         pulumi.String("testdatabasename"),
    			MasterPassword:             pulumi.String("testdatabasepassword"),
    			MasterUsername:             pulumi.String("test"),
    			BlueprintId:                pulumi.String("postgres_12"),
    			BundleId:                   pulumi.String("micro_1_0"),
    			PreferredBackupWindow:      pulumi.String("16:00-16:30"),
    			PreferredMaintenanceWindow: pulumi.String("Tue:17:00-Tue:17:30"),
    			FinalSnapshotName:          pulumi.String("MyFinalSnapshot"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Aws.LightSail.Database("test", new()
        {
            RelationalDatabaseName = "test",
            AvailabilityZone = "us-east-1a",
            MasterDatabaseName = "testdatabasename",
            MasterPassword = "testdatabasepassword",
            MasterUsername = "test",
            BlueprintId = "postgres_12",
            BundleId = "micro_1_0",
            PreferredBackupWindow = "16:00-16:30",
            PreferredMaintenanceWindow = "Tue:17:00-Tue:17:30",
            FinalSnapshotName = "MyFinalSnapshot",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.lightsail.Database;
    import com.pulumi.aws.lightsail.DatabaseArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var test = new Database("test", DatabaseArgs.builder()
                .relationalDatabaseName("test")
                .availabilityZone("us-east-1a")
                .masterDatabaseName("testdatabasename")
                .masterPassword("testdatabasepassword")
                .masterUsername("test")
                .blueprintId("postgres_12")
                .bundleId("micro_1_0")
                .preferredBackupWindow("16:00-16:30")
                .preferredMaintenanceWindow("Tue:17:00-Tue:17:30")
                .finalSnapshotName("MyFinalSnapshot")
                .build());
    
        }
    }
    
    resources:
      test:
        type: aws:lightsail:Database
        properties:
          relationalDatabaseName: test
          availabilityZone: us-east-1a
          masterDatabaseName: testdatabasename
          masterPassword: testdatabasepassword
          masterUsername: test
          blueprintId: postgres_12
          bundleId: micro_1_0
          preferredBackupWindow: 16:00-16:30
          preferredMaintenanceWindow: Tue:17:00-Tue:17:30
          finalSnapshotName: MyFinalSnapshot
    

    Apply Immediately

    To enable applying changes immediately instead of waiting for a maintiance window, use the apply_immediately argument.

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const test = new aws.lightsail.Database("test", {
        relationalDatabaseName: "test",
        availabilityZone: "us-east-1a",
        masterDatabaseName: "testdatabasename",
        masterPassword: "testdatabasepassword",
        masterUsername: "test",
        blueprintId: "postgres_12",
        bundleId: "micro_1_0",
        applyImmediately: true,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    test = aws.lightsail.Database("test",
        relational_database_name="test",
        availability_zone="us-east-1a",
        master_database_name="testdatabasename",
        master_password="testdatabasepassword",
        master_username="test",
        blueprint_id="postgres_12",
        bundle_id="micro_1_0",
        apply_immediately=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lightsail"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := lightsail.NewDatabase(ctx, "test", &lightsail.DatabaseArgs{
    			RelationalDatabaseName: pulumi.String("test"),
    			AvailabilityZone:       pulumi.String("us-east-1a"),
    			MasterDatabaseName:     pulumi.String("testdatabasename"),
    			MasterPassword:         pulumi.String("testdatabasepassword"),
    			MasterUsername:         pulumi.String("test"),
    			BlueprintId:            pulumi.String("postgres_12"),
    			BundleId:               pulumi.String("micro_1_0"),
    			ApplyImmediately:       pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Aws.LightSail.Database("test", new()
        {
            RelationalDatabaseName = "test",
            AvailabilityZone = "us-east-1a",
            MasterDatabaseName = "testdatabasename",
            MasterPassword = "testdatabasepassword",
            MasterUsername = "test",
            BlueprintId = "postgres_12",
            BundleId = "micro_1_0",
            ApplyImmediately = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.lightsail.Database;
    import com.pulumi.aws.lightsail.DatabaseArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var test = new Database("test", DatabaseArgs.builder()
                .relationalDatabaseName("test")
                .availabilityZone("us-east-1a")
                .masterDatabaseName("testdatabasename")
                .masterPassword("testdatabasepassword")
                .masterUsername("test")
                .blueprintId("postgres_12")
                .bundleId("micro_1_0")
                .applyImmediately(true)
                .build());
    
        }
    }
    
    resources:
      test:
        type: aws:lightsail:Database
        properties:
          relationalDatabaseName: test
          availabilityZone: us-east-1a
          masterDatabaseName: testdatabasename
          masterPassword: testdatabasepassword
          masterUsername: test
          blueprintId: postgres_12
          bundleId: micro_1_0
          applyImmediately: true
    

    Blueprint Ids

    A list of all available Lightsail Blueprints for Relational Databases the aws lightsail get-relational-database-blueprints aws cli command.

    Examples

    • mysql_8_0
    • postgres_12

    Prefix

    A Blueprint ID starts with a prefix of the engine type.

    Suffix

    A Blueprint ID has a sufix of the engine version.

    Bundles

    A list of all available Lightsail Bundles for Relational Databases the aws lightsail get-relational-database-bundles aws cli command.

    Examples

    • small_1_0
    • small_ha_1_0
    • large_1_0
    • large_ha_1_0

    Prefix

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

    • micro_
    • small_
    • medium_
    • large_

    Infixes (Optional for HA Database)

    A Bundle Id can have the following infix added in order to use the HA option of the selected bundle.

    • ha_

    Suffix

    A Bundle ID ends with one of the following suffix: 1_0

    Create Database Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Database(name: string, args: DatabaseArgs, opts?: CustomResourceOptions);
    @overload
    def Database(resource_name: str,
                 args: DatabaseArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Database(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 master_database_name: Optional[str] = None,
                 master_username: Optional[str] = None,
                 relational_database_name: Optional[str] = None,
                 blueprint_id: Optional[str] = None,
                 bundle_id: Optional[str] = None,
                 master_password: Optional[str] = None,
                 availability_zone: Optional[str] = None,
                 final_snapshot_name: Optional[str] = None,
                 apply_immediately: Optional[bool] = None,
                 preferred_backup_window: Optional[str] = None,
                 preferred_maintenance_window: Optional[str] = None,
                 publicly_accessible: Optional[bool] = None,
                 backup_retention_enabled: Optional[bool] = None,
                 skip_final_snapshot: Optional[bool] = None,
                 tags: Optional[Mapping[str, str]] = None)
    func NewDatabase(ctx *Context, name string, args DatabaseArgs, opts ...ResourceOption) (*Database, error)
    public Database(string name, DatabaseArgs args, CustomResourceOptions? opts = null)
    public Database(String name, DatabaseArgs args)
    public Database(String name, DatabaseArgs args, CustomResourceOptions options)
    
    type: aws:lightsail:Database
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args DatabaseArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args DatabaseArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args DatabaseArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DatabaseArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DatabaseArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var awsDatabaseResource = new Aws.LightSail.Database("awsDatabaseResource", new()
    {
        MasterDatabaseName = "string",
        MasterUsername = "string",
        RelationalDatabaseName = "string",
        BlueprintId = "string",
        BundleId = "string",
        MasterPassword = "string",
        AvailabilityZone = "string",
        FinalSnapshotName = "string",
        ApplyImmediately = false,
        PreferredBackupWindow = "string",
        PreferredMaintenanceWindow = "string",
        PubliclyAccessible = false,
        BackupRetentionEnabled = false,
        SkipFinalSnapshot = false,
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := lightsail.NewDatabase(ctx, "awsDatabaseResource", &lightsail.DatabaseArgs{
    	MasterDatabaseName:         pulumi.String("string"),
    	MasterUsername:             pulumi.String("string"),
    	RelationalDatabaseName:     pulumi.String("string"),
    	BlueprintId:                pulumi.String("string"),
    	BundleId:                   pulumi.String("string"),
    	MasterPassword:             pulumi.String("string"),
    	AvailabilityZone:           pulumi.String("string"),
    	FinalSnapshotName:          pulumi.String("string"),
    	ApplyImmediately:           pulumi.Bool(false),
    	PreferredBackupWindow:      pulumi.String("string"),
    	PreferredMaintenanceWindow: pulumi.String("string"),
    	PubliclyAccessible:         pulumi.Bool(false),
    	BackupRetentionEnabled:     pulumi.Bool(false),
    	SkipFinalSnapshot:          pulumi.Bool(false),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var awsDatabaseResource = new Database("awsDatabaseResource", DatabaseArgs.builder()
        .masterDatabaseName("string")
        .masterUsername("string")
        .relationalDatabaseName("string")
        .blueprintId("string")
        .bundleId("string")
        .masterPassword("string")
        .availabilityZone("string")
        .finalSnapshotName("string")
        .applyImmediately(false)
        .preferredBackupWindow("string")
        .preferredMaintenanceWindow("string")
        .publiclyAccessible(false)
        .backupRetentionEnabled(false)
        .skipFinalSnapshot(false)
        .tags(Map.of("string", "string"))
        .build());
    
    aws_database_resource = aws.lightsail.Database("awsDatabaseResource",
        master_database_name="string",
        master_username="string",
        relational_database_name="string",
        blueprint_id="string",
        bundle_id="string",
        master_password="string",
        availability_zone="string",
        final_snapshot_name="string",
        apply_immediately=False,
        preferred_backup_window="string",
        preferred_maintenance_window="string",
        publicly_accessible=False,
        backup_retention_enabled=False,
        skip_final_snapshot=False,
        tags={
            "string": "string",
        })
    
    const awsDatabaseResource = new aws.lightsail.Database("awsDatabaseResource", {
        masterDatabaseName: "string",
        masterUsername: "string",
        relationalDatabaseName: "string",
        blueprintId: "string",
        bundleId: "string",
        masterPassword: "string",
        availabilityZone: "string",
        finalSnapshotName: "string",
        applyImmediately: false,
        preferredBackupWindow: "string",
        preferredMaintenanceWindow: "string",
        publiclyAccessible: false,
        backupRetentionEnabled: false,
        skipFinalSnapshot: false,
        tags: {
            string: "string",
        },
    });
    
    type: aws:lightsail:Database
    properties:
        applyImmediately: false
        availabilityZone: string
        backupRetentionEnabled: false
        blueprintId: string
        bundleId: string
        finalSnapshotName: string
        masterDatabaseName: string
        masterPassword: string
        masterUsername: string
        preferredBackupWindow: string
        preferredMaintenanceWindow: string
        publiclyAccessible: false
        relationalDatabaseName: string
        skipFinalSnapshot: false
        tags:
            string: string
    

    Database Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Database resource accepts the following input properties:

    BlueprintId string
    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 AWS CLI command: aws lightsail get-relational-database-blueprints
    BundleId string
    The bundle ID for your new database. A bundle describes the performance specifications for your database (see list below). You can get a list of database bundle IDs by using the AWS CLI command: aws lightsail get-relational-database-bundles.
    MasterDatabaseName string
    The name of the master database created when the Lightsail database resource is created.
    MasterPassword string
    The password for the master user of your new database. The password can include any printable ASCII character except "/", """, or "@".
    MasterUsername string
    The master user name for your new database.
    RelationalDatabaseName string
    The name to use for your new Lightsail database resource. Names be unique within each AWS Region in your Lightsail account.
    ApplyImmediately bool
    When true , applies changes immediately. When false , applies changes during the preferred maintenance window. Some changes may cause an outage.
    AvailabilityZone string
    The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
    BackupRetentionEnabled bool
    When true, enables automated backup retention for your database. When false, 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.
    FinalSnapshotName string
    The name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
    PreferredBackupWindow string
    The daily time range during which automated backups are created for your new database if automated backups are enabled. Must be in the hh24:mi-hh24:mi format. Example: 16:00-16:30. Specified in Coordinated Universal Time (UTC).
    PreferredMaintenanceWindow string
    The weekly time range during which system maintenance can occur on your new database. Must be in the ddd:hh24:mi-ddd:hh24:mi format. Specified in Coordinated Universal Time (UTC). Example: Tue:17:00-Tue:17:30
    PubliclyAccessible bool
    Specifies the accessibility options for your new database. A value of true specifies a database that is available to resources outside of your Lightsail account. A value of false specifies a database that is available only to your Lightsail resources in the same region as your database.
    SkipFinalSnapshot bool
    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.
    Tags Dictionary<string, string>
    A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value.
    BlueprintId string
    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 AWS CLI command: aws lightsail get-relational-database-blueprints
    BundleId string
    The bundle ID for your new database. A bundle describes the performance specifications for your database (see list below). You can get a list of database bundle IDs by using the AWS CLI command: aws lightsail get-relational-database-bundles.
    MasterDatabaseName string
    The name of the master database created when the Lightsail database resource is created.
    MasterPassword string
    The password for the master user of your new database. The password can include any printable ASCII character except "/", """, or "@".
    MasterUsername string
    The master user name for your new database.
    RelationalDatabaseName string
    The name to use for your new Lightsail database resource. Names be unique within each AWS Region in your Lightsail account.
    ApplyImmediately bool
    When true , applies changes immediately. When false , applies changes during the preferred maintenance window. Some changes may cause an outage.
    AvailabilityZone string
    The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
    BackupRetentionEnabled bool
    When true, enables automated backup retention for your database. When false, 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.
    FinalSnapshotName string
    The name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
    PreferredBackupWindow string
    The daily time range during which automated backups are created for your new database if automated backups are enabled. Must be in the hh24:mi-hh24:mi format. Example: 16:00-16:30. Specified in Coordinated Universal Time (UTC).
    PreferredMaintenanceWindow string
    The weekly time range during which system maintenance can occur on your new database. Must be in the ddd:hh24:mi-ddd:hh24:mi format. Specified in Coordinated Universal Time (UTC). Example: Tue:17:00-Tue:17:30
    PubliclyAccessible bool
    Specifies the accessibility options for your new database. A value of true specifies a database that is available to resources outside of your Lightsail account. A value of false specifies a database that is available only to your Lightsail resources in the same region as your database.
    SkipFinalSnapshot bool
    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.
    Tags map[string]string
    A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value.
    blueprintId String
    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 AWS CLI command: aws lightsail get-relational-database-blueprints
    bundleId String
    The bundle ID for your new database. A bundle describes the performance specifications for your database (see list below). You can get a list of database bundle IDs by using the AWS CLI command: aws lightsail get-relational-database-bundles.
    masterDatabaseName String
    The name of the master database created when the Lightsail database resource is created.
    masterPassword String
    The password for the master user of your new database. The password can include any printable ASCII character except "/", """, or "@".
    masterUsername String
    The master user name for your new database.
    relationalDatabaseName String
    The name to use for your new Lightsail database resource. Names be unique within each AWS Region in your Lightsail account.
    applyImmediately Boolean
    When true , applies changes immediately. When false , applies changes during the preferred maintenance window. Some changes may cause an outage.
    availabilityZone String
    The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
    backupRetentionEnabled Boolean
    When true, enables automated backup retention for your database. When false, 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.
    finalSnapshotName String
    The name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
    preferredBackupWindow String
    The daily time range during which automated backups are created for your new database if automated backups are enabled. Must be in the hh24:mi-hh24:mi format. Example: 16:00-16:30. Specified in Coordinated Universal Time (UTC).
    preferredMaintenanceWindow String
    The weekly time range during which system maintenance can occur on your new database. Must be in the ddd:hh24:mi-ddd:hh24:mi format. Specified in Coordinated Universal Time (UTC). Example: Tue:17:00-Tue:17:30
    publiclyAccessible Boolean
    Specifies the accessibility options for your new database. A value of true specifies a database that is available to resources outside of your Lightsail account. A value of false specifies a database that is available only to your Lightsail resources in the same region as your database.
    skipFinalSnapshot Boolean
    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.
    tags Map<String,String>
    A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value.
    blueprintId string
    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 AWS CLI command: aws lightsail get-relational-database-blueprints
    bundleId string
    The bundle ID for your new database. A bundle describes the performance specifications for your database (see list below). You can get a list of database bundle IDs by using the AWS CLI command: aws lightsail get-relational-database-bundles.
    masterDatabaseName string
    The name of the master database created when the Lightsail database resource is created.
    masterPassword string
    The password for the master user of your new database. The password can include any printable ASCII character except "/", """, or "@".
    masterUsername string
    The master user name for your new database.
    relationalDatabaseName string
    The name to use for your new Lightsail database resource. Names be unique within each AWS Region in your Lightsail account.
    applyImmediately boolean
    When true , applies changes immediately. When false , applies changes during the preferred maintenance window. Some changes may cause an outage.
    availabilityZone string
    The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
    backupRetentionEnabled boolean
    When true, enables automated backup retention for your database. When false, 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.
    finalSnapshotName string
    The name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
    preferredBackupWindow string
    The daily time range during which automated backups are created for your new database if automated backups are enabled. Must be in the hh24:mi-hh24:mi format. Example: 16:00-16:30. Specified in Coordinated Universal Time (UTC).
    preferredMaintenanceWindow string
    The weekly time range during which system maintenance can occur on your new database. Must be in the ddd:hh24:mi-ddd:hh24:mi format. Specified in Coordinated Universal Time (UTC). Example: Tue:17:00-Tue:17:30
    publiclyAccessible boolean
    Specifies the accessibility options for your new database. A value of true specifies a database that is available to resources outside of your Lightsail account. A value of false specifies a database that is available only to your Lightsail resources in the same region as your database.
    skipFinalSnapshot boolean
    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.
    tags {[key: string]: string}
    A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value.
    blueprint_id str
    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 AWS CLI command: aws lightsail get-relational-database-blueprints
    bundle_id str
    The bundle ID for your new database. A bundle describes the performance specifications for your database (see list below). You can get a list of database bundle IDs by using the AWS CLI command: aws lightsail get-relational-database-bundles.
    master_database_name str
    The name of the master database created when the Lightsail database resource is created.
    master_password str
    The password for the master user of your new database. The password can include any printable ASCII character except "/", """, or "@".
    master_username str
    The master user name for your new database.
    relational_database_name str
    The name to use for your new Lightsail database resource. Names be unique within each AWS Region in your Lightsail account.
    apply_immediately bool
    When true , applies changes immediately. When false , applies changes during the preferred maintenance window. Some changes may cause an outage.
    availability_zone str
    The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
    backup_retention_enabled bool
    When true, enables automated backup retention for your database. When false, 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.
    final_snapshot_name str
    The name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
    preferred_backup_window str
    The daily time range during which automated backups are created for your new database if automated backups are enabled. Must be in the hh24:mi-hh24:mi format. Example: 16:00-16:30. Specified in Coordinated Universal Time (UTC).
    preferred_maintenance_window str
    The weekly time range during which system maintenance can occur on your new database. Must be in the ddd:hh24:mi-ddd:hh24:mi format. Specified in Coordinated Universal Time (UTC). Example: Tue:17:00-Tue:17:30
    publicly_accessible bool
    Specifies the accessibility options for your new database. A value of true specifies a database that is available to resources outside of your Lightsail account. A value of false specifies a database that is available only to your Lightsail resources in the same region as your database.
    skip_final_snapshot bool
    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.
    tags 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.
    blueprintId String
    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 AWS CLI command: aws lightsail get-relational-database-blueprints
    bundleId String
    The bundle ID for your new database. A bundle describes the performance specifications for your database (see list below). You can get a list of database bundle IDs by using the AWS CLI command: aws lightsail get-relational-database-bundles.
    masterDatabaseName String
    The name of the master database created when the Lightsail database resource is created.
    masterPassword String
    The password for the master user of your new database. The password can include any printable ASCII character except "/", """, or "@".
    masterUsername String
    The master user name for your new database.
    relationalDatabaseName String
    The name to use for your new Lightsail database resource. Names be unique within each AWS Region in your Lightsail account.
    applyImmediately Boolean
    When true , applies changes immediately. When false , applies changes during the preferred maintenance window. Some changes may cause an outage.
    availabilityZone String
    The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
    backupRetentionEnabled Boolean
    When true, enables automated backup retention for your database. When false, 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.
    finalSnapshotName String
    The name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
    preferredBackupWindow String
    The daily time range during which automated backups are created for your new database if automated backups are enabled. Must be in the hh24:mi-hh24:mi format. Example: 16:00-16:30. Specified in Coordinated Universal Time (UTC).
    preferredMaintenanceWindow String
    The weekly time range during which system maintenance can occur on your new database. Must be in the ddd:hh24:mi-ddd:hh24:mi format. Specified in Coordinated Universal Time (UTC). Example: Tue:17:00-Tue:17:30
    publiclyAccessible Boolean
    Specifies the accessibility options for your new database. A value of true specifies a database that is available to resources outside of your Lightsail account. A value of false specifies a database that is available only to your Lightsail resources in the same region as your database.
    skipFinalSnapshot Boolean
    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.
    tags Map<String>
    A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Database resource produces the following output properties:

    Arn string
    The ARN of the Lightsail instance (matches id).
    CaCertificateIdentifier string
    The certificate associated with the database.
    CpuCount int
    The number of vCPUs for the database.
    CreatedAt string
    The timestamp when the instance was created.
    DiskSize double
    The size of the disk for the database.
    Engine string
    The database software (for example, MySQL).
    EngineVersion string
    The database engine version (for example, 5.7.23).
    Id string
    The provider-assigned unique ID for this managed resource.
    MasterEndpointAddress string
    The master endpoint fqdn for the database.
    MasterEndpointPort int
    The master endpoint network port for the database.
    RamSize double
    The amount of RAM in GB for the database.
    SecondaryAvailabilityZone string
    Describes the secondary Availability Zone of a high availability database. The secondary database is used for failover support of a high availability database.
    SupportCode string
    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.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    The ARN of the Lightsail instance (matches id).
    CaCertificateIdentifier string
    The certificate associated with the database.
    CpuCount int
    The number of vCPUs for the database.
    CreatedAt string
    The timestamp when the instance was created.
    DiskSize float64
    The size of the disk for the database.
    Engine string
    The database software (for example, MySQL).
    EngineVersion string
    The database engine version (for example, 5.7.23).
    Id string
    The provider-assigned unique ID for this managed resource.
    MasterEndpointAddress string
    The master endpoint fqdn for the database.
    MasterEndpointPort int
    The master endpoint network port for the database.
    RamSize float64
    The amount of RAM in GB for the database.
    SecondaryAvailabilityZone string
    Describes the secondary Availability Zone of a high availability database. The secondary database is used for failover support of a high availability database.
    SupportCode string
    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.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The ARN of the Lightsail instance (matches id).
    caCertificateIdentifier String
    The certificate associated with the database.
    cpuCount Integer
    The number of vCPUs for the database.
    createdAt String
    The timestamp when the instance was created.
    diskSize Double
    The size of the disk for the database.
    engine String
    The database software (for example, MySQL).
    engineVersion String
    The database engine version (for example, 5.7.23).
    id String
    The provider-assigned unique ID for this managed resource.
    masterEndpointAddress String
    The master endpoint fqdn for the database.
    masterEndpointPort Integer
    The master endpoint network port for the database.
    ramSize Double
    The amount of RAM in GB for the database.
    secondaryAvailabilityZone String
    Describes the secondary Availability Zone of a high availability database. The secondary database is used for failover support of a high availability database.
    supportCode String
    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.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    The ARN of the Lightsail instance (matches id).
    caCertificateIdentifier string
    The certificate associated with the database.
    cpuCount number
    The number of vCPUs for the database.
    createdAt string
    The timestamp when the instance was created.
    diskSize number
    The size of the disk for the database.
    engine string
    The database software (for example, MySQL).
    engineVersion string
    The database engine version (for example, 5.7.23).
    id string
    The provider-assigned unique ID for this managed resource.
    masterEndpointAddress string
    The master endpoint fqdn for the database.
    masterEndpointPort number
    The master endpoint network port for the database.
    ramSize number
    The amount of RAM in GB for the database.
    secondaryAvailabilityZone string
    Describes the secondary Availability Zone of a high availability database. The secondary database is used for failover support of a high availability database.
    supportCode string
    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.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn str
    The ARN of the Lightsail instance (matches id).
    ca_certificate_identifier str
    The certificate associated with the database.
    cpu_count int
    The number of vCPUs for the database.
    created_at str
    The timestamp when the instance was created.
    disk_size float
    The size of the disk for the database.
    engine str
    The database software (for example, MySQL).
    engine_version str
    The database engine version (for example, 5.7.23).
    id str
    The provider-assigned unique ID for this managed resource.
    master_endpoint_address str
    The master endpoint fqdn for the database.
    master_endpoint_port int
    The master endpoint network port for the database.
    ram_size float
    The amount of RAM in GB for the database.
    secondary_availability_zone str
    Describes the secondary Availability Zone of a high availability database. The secondary database is used for failover support of a high availability database.
    support_code str
    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.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The ARN of the Lightsail instance (matches id).
    caCertificateIdentifier String
    The certificate associated with the database.
    cpuCount Number
    The number of vCPUs for the database.
    createdAt String
    The timestamp when the instance was created.
    diskSize Number
    The size of the disk for the database.
    engine String
    The database software (for example, MySQL).
    engineVersion String
    The database engine version (for example, 5.7.23).
    id String
    The provider-assigned unique ID for this managed resource.
    masterEndpointAddress String
    The master endpoint fqdn for the database.
    masterEndpointPort Number
    The master endpoint network port for the database.
    ramSize Number
    The amount of RAM in GB for the database.
    secondaryAvailabilityZone String
    Describes the secondary Availability Zone of a high availability database. The secondary database is used for failover support of a high availability database.
    supportCode String
    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.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Look up Existing Database Resource

    Get an existing Database resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: DatabaseState, opts?: CustomResourceOptions): Database
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            apply_immediately: Optional[bool] = None,
            arn: Optional[str] = None,
            availability_zone: Optional[str] = None,
            backup_retention_enabled: Optional[bool] = None,
            blueprint_id: Optional[str] = None,
            bundle_id: Optional[str] = None,
            ca_certificate_identifier: Optional[str] = None,
            cpu_count: Optional[int] = None,
            created_at: Optional[str] = None,
            disk_size: Optional[float] = None,
            engine: Optional[str] = None,
            engine_version: Optional[str] = None,
            final_snapshot_name: Optional[str] = None,
            master_database_name: Optional[str] = None,
            master_endpoint_address: Optional[str] = None,
            master_endpoint_port: Optional[int] = None,
            master_password: Optional[str] = None,
            master_username: Optional[str] = None,
            preferred_backup_window: Optional[str] = None,
            preferred_maintenance_window: Optional[str] = None,
            publicly_accessible: Optional[bool] = None,
            ram_size: Optional[float] = None,
            relational_database_name: Optional[str] = None,
            secondary_availability_zone: Optional[str] = None,
            skip_final_snapshot: Optional[bool] = None,
            support_code: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None) -> Database
    func GetDatabase(ctx *Context, name string, id IDInput, state *DatabaseState, opts ...ResourceOption) (*Database, error)
    public static Database Get(string name, Input<string> id, DatabaseState? state, CustomResourceOptions? opts = null)
    public static Database get(String name, Output<String> id, DatabaseState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ApplyImmediately bool
    When true , applies changes immediately. When false , applies changes during the preferred maintenance window. Some changes may cause an outage.
    Arn string
    The ARN of the Lightsail instance (matches id).
    AvailabilityZone string
    The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
    BackupRetentionEnabled bool
    When true, enables automated backup retention for your database. When false, 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.
    BlueprintId string
    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 AWS CLI command: aws lightsail get-relational-database-blueprints
    BundleId string
    The bundle ID for your new database. A bundle describes the performance specifications for your database (see list below). You can get a list of database bundle IDs by using the AWS CLI command: aws lightsail get-relational-database-bundles.
    CaCertificateIdentifier string
    The certificate associated with the database.
    CpuCount int
    The number of vCPUs for the database.
    CreatedAt string
    The timestamp when the instance was created.
    DiskSize double
    The size of the disk for the database.
    Engine string
    The database software (for example, MySQL).
    EngineVersion string
    The database engine version (for example, 5.7.23).
    FinalSnapshotName string
    The name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
    MasterDatabaseName string
    The name of the master database created when the Lightsail database resource is created.
    MasterEndpointAddress string
    The master endpoint fqdn for the database.
    MasterEndpointPort int
    The master endpoint network port for the database.
    MasterPassword string
    The password for the master user of your new database. The password can include any printable ASCII character except "/", """, or "@".
    MasterUsername string
    The master user name for your new database.
    PreferredBackupWindow string
    The daily time range during which automated backups are created for your new database if automated backups are enabled. Must be in the hh24:mi-hh24:mi format. Example: 16:00-16:30. Specified in Coordinated Universal Time (UTC).
    PreferredMaintenanceWindow string
    The weekly time range during which system maintenance can occur on your new database. Must be in the ddd:hh24:mi-ddd:hh24:mi format. Specified in Coordinated Universal Time (UTC). Example: Tue:17:00-Tue:17:30
    PubliclyAccessible bool
    Specifies the accessibility options for your new database. A value of true specifies a database that is available to resources outside of your Lightsail account. A value of false specifies a database that is available only to your Lightsail resources in the same region as your database.
    RamSize double
    The amount of RAM in GB for the database.
    RelationalDatabaseName string
    The name to use for your new Lightsail database resource. Names be unique within each AWS Region in your Lightsail account.
    SecondaryAvailabilityZone string
    Describes the secondary Availability Zone of a high availability database. The secondary database is used for failover support of a high availability database.
    SkipFinalSnapshot bool
    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.
    SupportCode string
    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.
    Tags Dictionary<string, string>
    A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    ApplyImmediately bool
    When true , applies changes immediately. When false , applies changes during the preferred maintenance window. Some changes may cause an outage.
    Arn string
    The ARN of the Lightsail instance (matches id).
    AvailabilityZone string
    The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
    BackupRetentionEnabled bool
    When true, enables automated backup retention for your database. When false, 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.
    BlueprintId string
    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 AWS CLI command: aws lightsail get-relational-database-blueprints
    BundleId string
    The bundle ID for your new database. A bundle describes the performance specifications for your database (see list below). You can get a list of database bundle IDs by using the AWS CLI command: aws lightsail get-relational-database-bundles.
    CaCertificateIdentifier string
    The certificate associated with the database.
    CpuCount int
    The number of vCPUs for the database.
    CreatedAt string
    The timestamp when the instance was created.
    DiskSize float64
    The size of the disk for the database.
    Engine string
    The database software (for example, MySQL).
    EngineVersion string
    The database engine version (for example, 5.7.23).
    FinalSnapshotName string
    The name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
    MasterDatabaseName string
    The name of the master database created when the Lightsail database resource is created.
    MasterEndpointAddress string
    The master endpoint fqdn for the database.
    MasterEndpointPort int
    The master endpoint network port for the database.
    MasterPassword string
    The password for the master user of your new database. The password can include any printable ASCII character except "/", """, or "@".
    MasterUsername string
    The master user name for your new database.
    PreferredBackupWindow string
    The daily time range during which automated backups are created for your new database if automated backups are enabled. Must be in the hh24:mi-hh24:mi format. Example: 16:00-16:30. Specified in Coordinated Universal Time (UTC).
    PreferredMaintenanceWindow string
    The weekly time range during which system maintenance can occur on your new database. Must be in the ddd:hh24:mi-ddd:hh24:mi format. Specified in Coordinated Universal Time (UTC). Example: Tue:17:00-Tue:17:30
    PubliclyAccessible bool
    Specifies the accessibility options for your new database. A value of true specifies a database that is available to resources outside of your Lightsail account. A value of false specifies a database that is available only to your Lightsail resources in the same region as your database.
    RamSize float64
    The amount of RAM in GB for the database.
    RelationalDatabaseName string
    The name to use for your new Lightsail database resource. Names be unique within each AWS Region in your Lightsail account.
    SecondaryAvailabilityZone string
    Describes the secondary Availability Zone of a high availability database. The secondary database is used for failover support of a high availability database.
    SkipFinalSnapshot bool
    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.
    SupportCode string
    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.
    Tags map[string]string
    A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    applyImmediately Boolean
    When true , applies changes immediately. When false , applies changes during the preferred maintenance window. Some changes may cause an outage.
    arn String
    The ARN of the Lightsail instance (matches id).
    availabilityZone String
    The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
    backupRetentionEnabled Boolean
    When true, enables automated backup retention for your database. When false, 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.
    blueprintId String
    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 AWS CLI command: aws lightsail get-relational-database-blueprints
    bundleId String
    The bundle ID for your new database. A bundle describes the performance specifications for your database (see list below). You can get a list of database bundle IDs by using the AWS CLI command: aws lightsail get-relational-database-bundles.
    caCertificateIdentifier String
    The certificate associated with the database.
    cpuCount Integer
    The number of vCPUs for the database.
    createdAt String
    The timestamp when the instance was created.
    diskSize Double
    The size of the disk for the database.
    engine String
    The database software (for example, MySQL).
    engineVersion String
    The database engine version (for example, 5.7.23).
    finalSnapshotName String
    The name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
    masterDatabaseName String
    The name of the master database created when the Lightsail database resource is created.
    masterEndpointAddress String
    The master endpoint fqdn for the database.
    masterEndpointPort Integer
    The master endpoint network port for the database.
    masterPassword String
    The password for the master user of your new database. The password can include any printable ASCII character except "/", """, or "@".
    masterUsername String
    The master user name for your new database.
    preferredBackupWindow String
    The daily time range during which automated backups are created for your new database if automated backups are enabled. Must be in the hh24:mi-hh24:mi format. Example: 16:00-16:30. Specified in Coordinated Universal Time (UTC).
    preferredMaintenanceWindow String
    The weekly time range during which system maintenance can occur on your new database. Must be in the ddd:hh24:mi-ddd:hh24:mi format. Specified in Coordinated Universal Time (UTC). Example: Tue:17:00-Tue:17:30
    publiclyAccessible Boolean
    Specifies the accessibility options for your new database. A value of true specifies a database that is available to resources outside of your Lightsail account. A value of false specifies a database that is available only to your Lightsail resources in the same region as your database.
    ramSize Double
    The amount of RAM in GB for the database.
    relationalDatabaseName String
    The name to use for your new Lightsail database resource. Names be unique within each AWS Region in your Lightsail account.
    secondaryAvailabilityZone String
    Describes the secondary Availability Zone of a high availability database. The secondary database is used for failover support of a high availability database.
    skipFinalSnapshot Boolean
    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.
    supportCode String
    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.
    tags Map<String,String>
    A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    applyImmediately boolean
    When true , applies changes immediately. When false , applies changes during the preferred maintenance window. Some changes may cause an outage.
    arn string
    The ARN of the Lightsail instance (matches id).
    availabilityZone string
    The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
    backupRetentionEnabled boolean
    When true, enables automated backup retention for your database. When false, 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.
    blueprintId string
    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 AWS CLI command: aws lightsail get-relational-database-blueprints
    bundleId string
    The bundle ID for your new database. A bundle describes the performance specifications for your database (see list below). You can get a list of database bundle IDs by using the AWS CLI command: aws lightsail get-relational-database-bundles.
    caCertificateIdentifier string
    The certificate associated with the database.
    cpuCount number
    The number of vCPUs for the database.
    createdAt string
    The timestamp when the instance was created.
    diskSize number
    The size of the disk for the database.
    engine string
    The database software (for example, MySQL).
    engineVersion string
    The database engine version (for example, 5.7.23).
    finalSnapshotName string
    The name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
    masterDatabaseName string
    The name of the master database created when the Lightsail database resource is created.
    masterEndpointAddress string
    The master endpoint fqdn for the database.
    masterEndpointPort number
    The master endpoint network port for the database.
    masterPassword string
    The password for the master user of your new database. The password can include any printable ASCII character except "/", """, or "@".
    masterUsername string
    The master user name for your new database.
    preferredBackupWindow string
    The daily time range during which automated backups are created for your new database if automated backups are enabled. Must be in the hh24:mi-hh24:mi format. Example: 16:00-16:30. Specified in Coordinated Universal Time (UTC).
    preferredMaintenanceWindow string
    The weekly time range during which system maintenance can occur on your new database. Must be in the ddd:hh24:mi-ddd:hh24:mi format. Specified in Coordinated Universal Time (UTC). Example: Tue:17:00-Tue:17:30
    publiclyAccessible boolean
    Specifies the accessibility options for your new database. A value of true specifies a database that is available to resources outside of your Lightsail account. A value of false specifies a database that is available only to your Lightsail resources in the same region as your database.
    ramSize number
    The amount of RAM in GB for the database.
    relationalDatabaseName string
    The name to use for your new Lightsail database resource. Names be unique within each AWS Region in your Lightsail account.
    secondaryAvailabilityZone string
    Describes the secondary Availability Zone of a high availability database. The secondary database is used for failover support of a high availability database.
    skipFinalSnapshot boolean
    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.
    supportCode string
    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.
    tags {[key: string]: string}
    A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    apply_immediately bool
    When true , applies changes immediately. When false , applies changes during the preferred maintenance window. Some changes may cause an outage.
    arn str
    The ARN of the Lightsail instance (matches id).
    availability_zone str
    The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
    backup_retention_enabled bool
    When true, enables automated backup retention for your database. When false, 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.
    blueprint_id str
    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 AWS CLI command: aws lightsail get-relational-database-blueprints
    bundle_id str
    The bundle ID for your new database. A bundle describes the performance specifications for your database (see list below). You can get a list of database bundle IDs by using the AWS CLI command: aws lightsail get-relational-database-bundles.
    ca_certificate_identifier str
    The certificate associated with the database.
    cpu_count int
    The number of vCPUs for the database.
    created_at str
    The timestamp when the instance was created.
    disk_size float
    The size of the disk for the database.
    engine str
    The database software (for example, MySQL).
    engine_version str
    The database engine version (for example, 5.7.23).
    final_snapshot_name str
    The name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
    master_database_name str
    The name of the master database created when the Lightsail database resource is created.
    master_endpoint_address str
    The master endpoint fqdn for the database.
    master_endpoint_port int
    The master endpoint network port for the database.
    master_password str
    The password for the master user of your new database. The password can include any printable ASCII character except "/", """, or "@".
    master_username str
    The master user name for your new database.
    preferred_backup_window str
    The daily time range during which automated backups are created for your new database if automated backups are enabled. Must be in the hh24:mi-hh24:mi format. Example: 16:00-16:30. Specified in Coordinated Universal Time (UTC).
    preferred_maintenance_window str
    The weekly time range during which system maintenance can occur on your new database. Must be in the ddd:hh24:mi-ddd:hh24:mi format. Specified in Coordinated Universal Time (UTC). Example: Tue:17:00-Tue:17:30
    publicly_accessible bool
    Specifies the accessibility options for your new database. A value of true specifies a database that is available to resources outside of your Lightsail account. A value of false specifies a database that is available only to your Lightsail resources in the same region as your database.
    ram_size float
    The amount of RAM in GB for the database.
    relational_database_name str
    The name to use for your new Lightsail database resource. Names be unique within each AWS Region in your Lightsail account.
    secondary_availability_zone str
    Describes the secondary Availability Zone of a high availability database. The secondary database is used for failover support of a high availability database.
    skip_final_snapshot bool
    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.
    support_code str
    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.
    tags 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.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    applyImmediately Boolean
    When true , applies changes immediately. When false , applies changes during the preferred maintenance window. Some changes may cause an outage.
    arn String
    The ARN of the Lightsail instance (matches id).
    availabilityZone String
    The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
    backupRetentionEnabled Boolean
    When true, enables automated backup retention for your database. When false, 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.
    blueprintId String
    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 AWS CLI command: aws lightsail get-relational-database-blueprints
    bundleId String
    The bundle ID for your new database. A bundle describes the performance specifications for your database (see list below). You can get a list of database bundle IDs by using the AWS CLI command: aws lightsail get-relational-database-bundles.
    caCertificateIdentifier String
    The certificate associated with the database.
    cpuCount Number
    The number of vCPUs for the database.
    createdAt String
    The timestamp when the instance was created.
    diskSize Number
    The size of the disk for the database.
    engine String
    The database software (for example, MySQL).
    engineVersion String
    The database engine version (for example, 5.7.23).
    finalSnapshotName String
    The name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
    masterDatabaseName String
    The name of the master database created when the Lightsail database resource is created.
    masterEndpointAddress String
    The master endpoint fqdn for the database.
    masterEndpointPort Number
    The master endpoint network port for the database.
    masterPassword String
    The password for the master user of your new database. The password can include any printable ASCII character except "/", """, or "@".
    masterUsername String
    The master user name for your new database.
    preferredBackupWindow String
    The daily time range during which automated backups are created for your new database if automated backups are enabled. Must be in the hh24:mi-hh24:mi format. Example: 16:00-16:30. Specified in Coordinated Universal Time (UTC).
    preferredMaintenanceWindow String
    The weekly time range during which system maintenance can occur on your new database. Must be in the ddd:hh24:mi-ddd:hh24:mi format. Specified in Coordinated Universal Time (UTC). Example: Tue:17:00-Tue:17:30
    publiclyAccessible Boolean
    Specifies the accessibility options for your new database. A value of true specifies a database that is available to resources outside of your Lightsail account. A value of false specifies a database that is available only to your Lightsail resources in the same region as your database.
    ramSize Number
    The amount of RAM in GB for the database.
    relationalDatabaseName String
    The name to use for your new Lightsail database resource. Names be unique within each AWS Region in your Lightsail account.
    secondaryAvailabilityZone String
    Describes the secondary Availability Zone of a high availability database. The secondary database is used for failover support of a high availability database.
    skipFinalSnapshot Boolean
    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.
    supportCode String
    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.
    tags Map<String>
    A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Import

    Using pulumi import, import Lightsail Databases using their name. For example:

    $ pulumi import aws:lightsail/database:Database foo 'bar'
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.54.2 published on Wednesday, Oct 2, 2024 by Pulumi