aws.lightsail.Database
Explore with Pulumi AI
Manages a Lightsail database. Use this resource to create and manage fully managed database instances with automated backups, monitoring, and maintenance in Lightsail.
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 example = new aws.lightsail.Database("example", {
relationalDatabaseName: "example-database",
availabilityZone: "us-east-1a",
masterDatabaseName: "exampledb",
masterPassword: "examplepassword123",
masterUsername: "exampleuser",
blueprintId: "mysql_8_0",
bundleId: "micro_1_0",
});
import pulumi
import pulumi_aws as aws
example = aws.lightsail.Database("example",
relational_database_name="example-database",
availability_zone="us-east-1a",
master_database_name="exampledb",
master_password="examplepassword123",
master_username="exampleuser",
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, "example", &lightsail.DatabaseArgs{
RelationalDatabaseName: pulumi.String("example-database"),
AvailabilityZone: pulumi.String("us-east-1a"),
MasterDatabaseName: pulumi.String("exampledb"),
MasterPassword: pulumi.String("examplepassword123"),
MasterUsername: pulumi.String("exampleuser"),
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 example = new Aws.LightSail.Database("example", new()
{
RelationalDatabaseName = "example-database",
AvailabilityZone = "us-east-1a",
MasterDatabaseName = "exampledb",
MasterPassword = "examplepassword123",
MasterUsername = "exampleuser",
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 example = new Database("example", DatabaseArgs.builder()
.relationalDatabaseName("example-database")
.availabilityZone("us-east-1a")
.masterDatabaseName("exampledb")
.masterPassword("examplepassword123")
.masterUsername("exampleuser")
.blueprintId("mysql_8_0")
.bundleId("micro_1_0")
.build());
}
}
resources:
example:
type: aws:lightsail:Database
properties:
relationalDatabaseName: example-database
availabilityZone: us-east-1a
masterDatabaseName: exampledb
masterPassword: examplepassword123
masterUsername: exampleuser
blueprintId: mysql_8_0
bundleId: micro_1_0
Basic PostgreSQL Blueprint
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.lightsail.Database("example", {
relationalDatabaseName: "example-database",
availabilityZone: "us-east-1a",
masterDatabaseName: "exampledb",
masterPassword: "examplepassword123",
masterUsername: "exampleuser",
blueprintId: "postgres_12",
bundleId: "micro_1_0",
});
import pulumi
import pulumi_aws as aws
example = aws.lightsail.Database("example",
relational_database_name="example-database",
availability_zone="us-east-1a",
master_database_name="exampledb",
master_password="examplepassword123",
master_username="exampleuser",
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, "example", &lightsail.DatabaseArgs{
RelationalDatabaseName: pulumi.String("example-database"),
AvailabilityZone: pulumi.String("us-east-1a"),
MasterDatabaseName: pulumi.String("exampledb"),
MasterPassword: pulumi.String("examplepassword123"),
MasterUsername: pulumi.String("exampleuser"),
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 example = new Aws.LightSail.Database("example", new()
{
RelationalDatabaseName = "example-database",
AvailabilityZone = "us-east-1a",
MasterDatabaseName = "exampledb",
MasterPassword = "examplepassword123",
MasterUsername = "exampleuser",
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 example = new Database("example", DatabaseArgs.builder()
.relationalDatabaseName("example-database")
.availabilityZone("us-east-1a")
.masterDatabaseName("exampledb")
.masterPassword("examplepassword123")
.masterUsername("exampleuser")
.blueprintId("postgres_12")
.bundleId("micro_1_0")
.build());
}
}
resources:
example:
type: aws:lightsail:Database
properties:
relationalDatabaseName: example-database
availabilityZone: us-east-1a
masterDatabaseName: exampledb
masterPassword: examplepassword123
masterUsername: exampleuser
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 maintenance 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 example = new aws.lightsail.Database("example", {
relationalDatabaseName: "example-database",
availabilityZone: "us-east-1a",
masterDatabaseName: "exampledb",
masterPassword: "examplepassword123",
masterUsername: "exampleuser",
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
example = aws.lightsail.Database("example",
relational_database_name="example-database",
availability_zone="us-east-1a",
master_database_name="exampledb",
master_password="examplepassword123",
master_username="exampleuser",
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, "example", &lightsail.DatabaseArgs{
RelationalDatabaseName: pulumi.String("example-database"),
AvailabilityZone: pulumi.String("us-east-1a"),
MasterDatabaseName: pulumi.String("exampledb"),
MasterPassword: pulumi.String("examplepassword123"),
MasterUsername: pulumi.String("exampleuser"),
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 example = new Aws.LightSail.Database("example", new()
{
RelationalDatabaseName = "example-database",
AvailabilityZone = "us-east-1a",
MasterDatabaseName = "exampledb",
MasterPassword = "examplepassword123",
MasterUsername = "exampleuser",
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 example = new Database("example", DatabaseArgs.builder()
.relationalDatabaseName("example-database")
.availabilityZone("us-east-1a")
.masterDatabaseName("exampledb")
.masterPassword("examplepassword123")
.masterUsername("exampleuser")
.blueprintId("postgres_12")
.bundleId("micro_1_0")
.preferredBackupWindow("16:00-16:30")
.preferredMaintenanceWindow("Tue:17:00-Tue:17:30")
.build());
}
}
resources:
example:
type: aws:lightsail:Database
properties:
relationalDatabaseName: example-database
availabilityZone: us-east-1a
masterDatabaseName: exampledb
masterPassword: examplepassword123
masterUsername: exampleuser
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 example = new aws.lightsail.Database("example", {
relationalDatabaseName: "example-database",
availabilityZone: "us-east-1a",
masterDatabaseName: "exampledb",
masterPassword: "examplepassword123",
masterUsername: "exampleuser",
blueprintId: "postgres_12",
bundleId: "micro_1_0",
preferredBackupWindow: "16:00-16:30",
preferredMaintenanceWindow: "Tue:17:00-Tue:17:30",
finalSnapshotName: "example-final-snapshot",
});
import pulumi
import pulumi_aws as aws
example = aws.lightsail.Database("example",
relational_database_name="example-database",
availability_zone="us-east-1a",
master_database_name="exampledb",
master_password="examplepassword123",
master_username="exampleuser",
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="example-final-snapshot")
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, "example", &lightsail.DatabaseArgs{
RelationalDatabaseName: pulumi.String("example-database"),
AvailabilityZone: pulumi.String("us-east-1a"),
MasterDatabaseName: pulumi.String("exampledb"),
MasterPassword: pulumi.String("examplepassword123"),
MasterUsername: pulumi.String("exampleuser"),
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("example-final-snapshot"),
})
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 example = new Aws.LightSail.Database("example", new()
{
RelationalDatabaseName = "example-database",
AvailabilityZone = "us-east-1a",
MasterDatabaseName = "exampledb",
MasterPassword = "examplepassword123",
MasterUsername = "exampleuser",
BlueprintId = "postgres_12",
BundleId = "micro_1_0",
PreferredBackupWindow = "16:00-16:30",
PreferredMaintenanceWindow = "Tue:17:00-Tue:17:30",
FinalSnapshotName = "example-final-snapshot",
});
});
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 example = new Database("example", DatabaseArgs.builder()
.relationalDatabaseName("example-database")
.availabilityZone("us-east-1a")
.masterDatabaseName("exampledb")
.masterPassword("examplepassword123")
.masterUsername("exampleuser")
.blueprintId("postgres_12")
.bundleId("micro_1_0")
.preferredBackupWindow("16:00-16:30")
.preferredMaintenanceWindow("Tue:17:00-Tue:17:30")
.finalSnapshotName("example-final-snapshot")
.build());
}
}
resources:
example:
type: aws:lightsail:Database
properties:
relationalDatabaseName: example-database
availabilityZone: us-east-1a
masterDatabaseName: exampledb
masterPassword: examplepassword123
masterUsername: exampleuser
blueprintId: postgres_12
bundleId: micro_1_0
preferredBackupWindow: 16:00-16:30
preferredMaintenanceWindow: Tue:17:00-Tue:17:30
finalSnapshotName: example-final-snapshot
Apply Immediately
To enable applying changes immediately instead of waiting for a maintenance window, use the apply_immediately
argument.
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.lightsail.Database("example", {
relationalDatabaseName: "example-database",
availabilityZone: "us-east-1a",
masterDatabaseName: "exampledb",
masterPassword: "examplepassword123",
masterUsername: "exampleuser",
blueprintId: "postgres_12",
bundleId: "micro_1_0",
applyImmediately: true,
});
import pulumi
import pulumi_aws as aws
example = aws.lightsail.Database("example",
relational_database_name="example-database",
availability_zone="us-east-1a",
master_database_name="exampledb",
master_password="examplepassword123",
master_username="exampleuser",
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, "example", &lightsail.DatabaseArgs{
RelationalDatabaseName: pulumi.String("example-database"),
AvailabilityZone: pulumi.String("us-east-1a"),
MasterDatabaseName: pulumi.String("exampledb"),
MasterPassword: pulumi.String("examplepassword123"),
MasterUsername: pulumi.String("exampleuser"),
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 example = new Aws.LightSail.Database("example", new()
{
RelationalDatabaseName = "example-database",
AvailabilityZone = "us-east-1a",
MasterDatabaseName = "exampledb",
MasterPassword = "examplepassword123",
MasterUsername = "exampleuser",
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 example = new Database("example", DatabaseArgs.builder()
.relationalDatabaseName("example-database")
.availabilityZone("us-east-1a")
.masterDatabaseName("exampledb")
.masterPassword("examplepassword123")
.masterUsername("exampleuser")
.blueprintId("postgres_12")
.bundleId("micro_1_0")
.applyImmediately(true)
.build());
}
}
resources:
example:
type: aws:lightsail:Database
properties:
relationalDatabaseName: example-database
availabilityZone: us-east-1a
masterDatabaseName: exampledb
masterPassword: examplepassword123
masterUsername: exampleuser
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 suffix 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_password: Optional[str] = None,
relational_database_name: Optional[str] = None,
blueprint_id: Optional[str] = None,
bundle_id: Optional[str] = None,
master_username: Optional[str] = None,
availability_zone: Optional[str] = None,
preferred_maintenance_window: Optional[str] = None,
apply_immediately: Optional[bool] = None,
preferred_backup_window: Optional[str] = None,
final_snapshot_name: 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",
MasterPassword = "string",
RelationalDatabaseName = "string",
BlueprintId = "string",
BundleId = "string",
MasterUsername = "string",
AvailabilityZone = "string",
PreferredMaintenanceWindow = "string",
ApplyImmediately = false,
PreferredBackupWindow = "string",
FinalSnapshotName = "string",
PubliclyAccessible = false,
BackupRetentionEnabled = false,
SkipFinalSnapshot = false,
Tags =
{
{ "string", "string" },
},
});
example, err := lightsail.NewDatabase(ctx, "awsDatabaseResource", &lightsail.DatabaseArgs{
MasterDatabaseName: pulumi.String("string"),
MasterPassword: pulumi.String("string"),
RelationalDatabaseName: pulumi.String("string"),
BlueprintId: pulumi.String("string"),
BundleId: pulumi.String("string"),
MasterUsername: pulumi.String("string"),
AvailabilityZone: pulumi.String("string"),
PreferredMaintenanceWindow: pulumi.String("string"),
ApplyImmediately: pulumi.Bool(false),
PreferredBackupWindow: pulumi.String("string"),
FinalSnapshotName: 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 com.pulumi.aws.lightsail.Database("awsDatabaseResource", com.pulumi.aws.lightsail.DatabaseArgs.builder()
.masterDatabaseName("string")
.masterPassword("string")
.relationalDatabaseName("string")
.blueprintId("string")
.bundleId("string")
.masterUsername("string")
.availabilityZone("string")
.preferredMaintenanceWindow("string")
.applyImmediately(false)
.preferredBackupWindow("string")
.finalSnapshotName("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_password="string",
relational_database_name="string",
blueprint_id="string",
bundle_id="string",
master_username="string",
availability_zone="string",
preferred_maintenance_window="string",
apply_immediately=False,
preferred_backup_window="string",
final_snapshot_name="string",
publicly_accessible=False,
backup_retention_enabled=False,
skip_final_snapshot=False,
tags={
"string": "string",
})
const awsDatabaseResource = new aws.lightsail.Database("awsDatabaseResource", {
masterDatabaseName: "string",
masterPassword: "string",
relationalDatabaseName: "string",
blueprintId: "string",
bundleId: "string",
masterUsername: "string",
availabilityZone: "string",
preferredMaintenanceWindow: "string",
applyImmediately: false,
preferredBackupWindow: "string",
finalSnapshotName: "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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Database resource accepts the following input properties:
- Blueprint
Id string - Blueprint ID for your 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 string - Bundle ID for your 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 stringName - Name of the master database created when the Lightsail database resource is created.
- Master
Password string - Password for the master user of your database. The password can include any printable ASCII character except "/", """, or "@".
- Master
Username string - Master user name for your database.
- Relational
Database stringName Name to use for your Lightsail database resource. Names be unique within each AWS Region in your Lightsail account.
The following arguments are optional:
- Apply
Immediately bool - Whether to apply changes immediately. When false, applies changes during the preferred maintenance window. Some changes may cause an outage.
- Availability
Zone string - Availability Zone in which to create your database. Use the us-east-2a case-sensitive format.
- Backup
Retention boolEnabled - Whether to enable 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 stringName - Name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
- Preferred
Backup stringWindow - Daily time range during which automated backups are created for your 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 stringWindow - Weekly time range during which system maintenance can occur on your 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 - Whether the database is accessible to resources outside of your Lightsail account. 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 boolSnapshot - 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.
- Dictionary<string, string>
- 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.
- Blueprint
Id string - Blueprint ID for your 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 string - Bundle ID for your 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 stringName - Name of the master database created when the Lightsail database resource is created.
- Master
Password string - Password for the master user of your database. The password can include any printable ASCII character except "/", """, or "@".
- Master
Username string - Master user name for your database.
- Relational
Database stringName Name to use for your Lightsail database resource. Names be unique within each AWS Region in your Lightsail account.
The following arguments are optional:
- Apply
Immediately bool - Whether to apply changes immediately. When false, applies changes during the preferred maintenance window. Some changes may cause an outage.
- Availability
Zone string - Availability Zone in which to create your database. Use the us-east-2a case-sensitive format.
- Backup
Retention boolEnabled - Whether to enable 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 stringName - Name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
- Preferred
Backup stringWindow - Daily time range during which automated backups are created for your 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 stringWindow - Weekly time range during which system maintenance can occur on your 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 - Whether the database is accessible to resources outside of your Lightsail account. 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 boolSnapshot - 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.
- map[string]string
- 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.
- blueprint
Id String - Blueprint ID for your 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 String - Bundle ID for your 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 StringName - Name of the master database created when the Lightsail database resource is created.
- master
Password String - Password for the master user of your database. The password can include any printable ASCII character except "/", """, or "@".
- master
Username String - Master user name for your database.
- relational
Database StringName Name to use for your Lightsail database resource. Names be unique within each AWS Region in your Lightsail account.
The following arguments are optional:
- apply
Immediately Boolean - Whether to apply changes immediately. When false, applies changes during the preferred maintenance window. Some changes may cause an outage.
- availability
Zone String - Availability Zone in which to create your database. Use the us-east-2a case-sensitive format.
- backup
Retention BooleanEnabled - Whether to enable 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 StringName - Name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
- preferred
Backup StringWindow - Daily time range during which automated backups are created for your 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 StringWindow - Weekly time range during which system maintenance can occur on your 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 Boolean - Whether the database is accessible to resources outside of your Lightsail account. 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 BooleanSnapshot - 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.
- Map<String,String>
- 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.
- blueprint
Id string - Blueprint ID for your 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 string - Bundle ID for your 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 stringName - Name of the master database created when the Lightsail database resource is created.
- master
Password string - Password for the master user of your database. The password can include any printable ASCII character except "/", """, or "@".
- master
Username string - Master user name for your database.
- relational
Database stringName Name to use for your Lightsail database resource. Names be unique within each AWS Region in your Lightsail account.
The following arguments are optional:
- apply
Immediately boolean - Whether to apply changes immediately. When false, applies changes during the preferred maintenance window. Some changes may cause an outage.
- availability
Zone string - Availability Zone in which to create your database. Use the us-east-2a case-sensitive format.
- backup
Retention booleanEnabled - Whether to enable 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 stringName - Name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
- preferred
Backup stringWindow - Daily time range during which automated backups are created for your 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 stringWindow - Weekly time range during which system maintenance can occur on your 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 boolean - Whether the database is accessible to resources outside of your Lightsail account. 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 booleanSnapshot - 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.
- {[key: string]: string}
- 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.
- blueprint_
id str - Blueprint ID for your 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 - Bundle ID for your 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_ strname - Name of the master database created when the Lightsail database resource is created.
- master_
password str - Password for the master user of your database. The password can include any printable ASCII character except "/", """, or "@".
- master_
username str - Master user name for your database.
- relational_
database_ strname Name to use for your Lightsail database resource. Names be unique within each AWS Region in your Lightsail account.
The following arguments are optional:
- apply_
immediately bool - Whether to apply changes immediately. When false, applies changes during the preferred maintenance window. Some changes may cause an outage.
- availability_
zone str - Availability Zone in which to create your database. Use the us-east-2a case-sensitive format.
- backup_
retention_ boolenabled - Whether to enable 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_ strname - Name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
- preferred_
backup_ strwindow - Daily time range during which automated backups are created for your 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_ strwindow - Weekly time range during which system maintenance can occur on your 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 - Whether the database is accessible to resources outside of your Lightsail account. 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_ boolsnapshot - 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.
- Mapping[str, str]
- 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.
- blueprint
Id String - Blueprint ID for your 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 String - Bundle ID for your 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 StringName - Name of the master database created when the Lightsail database resource is created.
- master
Password String - Password for the master user of your database. The password can include any printable ASCII character except "/", """, or "@".
- master
Username String - Master user name for your database.
- relational
Database StringName Name to use for your Lightsail database resource. Names be unique within each AWS Region in your Lightsail account.
The following arguments are optional:
- apply
Immediately Boolean - Whether to apply changes immediately. When false, applies changes during the preferred maintenance window. Some changes may cause an outage.
- availability
Zone String - Availability Zone in which to create your database. Use the us-east-2a case-sensitive format.
- backup
Retention BooleanEnabled - Whether to enable 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 StringName - Name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
- preferred
Backup StringWindow - Daily time range during which automated backups are created for your 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 StringWindow - Weekly time range during which system maintenance can occur on your 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 Boolean - Whether the database is accessible to resources outside of your Lightsail account. 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 BooleanSnapshot - 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.
- Map<String>
- 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the Database resource produces the following output properties:
- Arn string
- ARN of the database (matches
id
). - Ca
Certificate stringIdentifier - Certificate associated with the database.
- Cpu
Count int - Number of vCPUs for the database.
- Created
At string - Date and time when the database was created.
- Disk
Size double - Size of the disk for the database.
- Engine string
- Database software (for example, MySQL).
- Engine
Version string - Database engine version (for example, 5.7.23).
- Id string
- The provider-assigned unique ID for this managed resource.
- Master
Endpoint stringAddress - Master endpoint FQDN for the database.
- Master
Endpoint intPort - Master endpoint network port for the database.
- Ram
Size double - Amount of RAM in GB for the database.
- Secondary
Availability stringZone - Secondary Availability Zone of a high availability database. The secondary database is used for failover support of a high availability database.
- Support
Code string - 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.
- Dictionary<string, string>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Arn string
- ARN of the database (matches
id
). - Ca
Certificate stringIdentifier - Certificate associated with the database.
- Cpu
Count int - Number of vCPUs for the database.
- Created
At string - Date and time when the database was created.
- Disk
Size float64 - Size of the disk for the database.
- Engine string
- Database software (for example, MySQL).
- Engine
Version string - Database engine version (for example, 5.7.23).
- Id string
- The provider-assigned unique ID for this managed resource.
- Master
Endpoint stringAddress - Master endpoint FQDN for the database.
- Master
Endpoint intPort - Master endpoint network port for the database.
- Ram
Size float64 - Amount of RAM in GB for the database.
- Secondary
Availability stringZone - Secondary Availability Zone of a high availability database. The secondary database is used for failover support of a high availability database.
- Support
Code string - 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.
- map[string]string
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- ARN of the database (matches
id
). - ca
Certificate StringIdentifier - Certificate associated with the database.
- cpu
Count Integer - Number of vCPUs for the database.
- created
At String - Date and time when the database was created.
- disk
Size Double - Size of the disk for the database.
- engine String
- Database software (for example, MySQL).
- engine
Version String - Database engine version (for example, 5.7.23).
- id String
- The provider-assigned unique ID for this managed resource.
- master
Endpoint StringAddress - Master endpoint FQDN for the database.
- master
Endpoint IntegerPort - Master endpoint network port for the database.
- ram
Size Double - Amount of RAM in GB for the database.
- secondary
Availability StringZone - Secondary Availability Zone of a high availability database. The secondary database is used for failover support of a high availability database.
- support
Code String - 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.
- Map<String,String>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn string
- ARN of the database (matches
id
). - ca
Certificate stringIdentifier - Certificate associated with the database.
- cpu
Count number - Number of vCPUs for the database.
- created
At string - Date and time when the database was created.
- disk
Size number - Size of the disk for the database.
- engine string
- Database software (for example, MySQL).
- engine
Version string - Database engine version (for example, 5.7.23).
- id string
- The provider-assigned unique ID for this managed resource.
- master
Endpoint stringAddress - Master endpoint FQDN for the database.
- master
Endpoint numberPort - Master endpoint network port for the database.
- ram
Size number - Amount of RAM in GB for the database.
- secondary
Availability stringZone - Secondary Availability Zone of a high availability database. The secondary database is used for failover support of a high availability database.
- support
Code string - 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.
- {[key: string]: string}
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn str
- ARN of the database (matches
id
). - ca_
certificate_ stridentifier - Certificate associated with the database.
- cpu_
count int - Number of vCPUs for the database.
- created_
at str - Date and time when the database was created.
- disk_
size float - Size of the disk for the database.
- engine str
- Database software (for example, MySQL).
- engine_
version str - Database engine version (for example, 5.7.23).
- id str
- The provider-assigned unique ID for this managed resource.
- master_
endpoint_ straddress - Master endpoint FQDN for the database.
- master_
endpoint_ intport - Master endpoint network port for the database.
- ram_
size float - Amount of RAM in GB for the database.
- secondary_
availability_ strzone - Secondary Availability Zone of a high availability database. The secondary database is used for failover support of a high availability database.
- support_
code str - 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.
- Mapping[str, str]
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- ARN of the database (matches
id
). - ca
Certificate StringIdentifier - Certificate associated with the database.
- cpu
Count Number - Number of vCPUs for the database.
- created
At String - Date and time when the database was created.
- disk
Size Number - Size of the disk for the database.
- engine String
- Database software (for example, MySQL).
- engine
Version String - Database engine version (for example, 5.7.23).
- id String
- The provider-assigned unique ID for this managed resource.
- master
Endpoint StringAddress - Master endpoint FQDN for the database.
- master
Endpoint NumberPort - Master endpoint network port for the database.
- ram
Size Number - Amount of RAM in GB for the database.
- secondary
Availability StringZone - Secondary Availability Zone of a high availability database. The secondary database is used for failover support of a high availability database.
- support
Code String - 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.
- Map<String>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
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)
resources: _: type: aws:lightsail:Database get: id: ${id}
- 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.
- Apply
Immediately bool - Whether to apply changes immediately. When false, applies changes during the preferred maintenance window. Some changes may cause an outage.
- Arn string
- ARN of the database (matches
id
). - Availability
Zone string - Availability Zone in which to create your database. Use the us-east-2a case-sensitive format.
- Backup
Retention boolEnabled - Whether to enable 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 string - Blueprint ID for your 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 string - Bundle ID for your 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 stringIdentifier - Certificate associated with the database.
- Cpu
Count int - Number of vCPUs for the database.
- Created
At string - Date and time when the database was created.
- Disk
Size double - Size of the disk for the database.
- Engine string
- Database software (for example, MySQL).
- Engine
Version string - Database engine version (for example, 5.7.23).
- Final
Snapshot stringName - Name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
- Master
Database stringName - Name of the master database created when the Lightsail database resource is created.
- Master
Endpoint stringAddress - Master endpoint FQDN for the database.
- Master
Endpoint intPort - Master endpoint network port for the database.
- Master
Password string - Password for the master user of your database. The password can include any printable ASCII character except "/", """, or "@".
- Master
Username string - Master user name for your database.
- Preferred
Backup stringWindow - Daily time range during which automated backups are created for your 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 stringWindow - Weekly time range during which system maintenance can occur on your 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 - Whether the database is accessible to resources outside of your Lightsail account. 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 double - Amount of RAM in GB for the database.
- Relational
Database stringName Name to use for your Lightsail database resource. Names be unique within each AWS Region in your Lightsail account.
The following arguments are optional:
- Secondary
Availability stringZone - Secondary Availability Zone of a high availability database. The secondary database is used for failover support of a high availability database.
- Skip
Final boolSnapshot - 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 string - 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.
- Dictionary<string, string>
- 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. - Dictionary<string, string>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Apply
Immediately bool - Whether to apply changes immediately. When false, applies changes during the preferred maintenance window. Some changes may cause an outage.
- Arn string
- ARN of the database (matches
id
). - Availability
Zone string - Availability Zone in which to create your database. Use the us-east-2a case-sensitive format.
- Backup
Retention boolEnabled - Whether to enable 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 string - Blueprint ID for your 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 string - Bundle ID for your 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 stringIdentifier - Certificate associated with the database.
- Cpu
Count int - Number of vCPUs for the database.
- Created
At string - Date and time when the database was created.
- Disk
Size float64 - Size of the disk for the database.
- Engine string
- Database software (for example, MySQL).
- Engine
Version string - Database engine version (for example, 5.7.23).
- Final
Snapshot stringName - Name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
- Master
Database stringName - Name of the master database created when the Lightsail database resource is created.
- Master
Endpoint stringAddress - Master endpoint FQDN for the database.
- Master
Endpoint intPort - Master endpoint network port for the database.
- Master
Password string - Password for the master user of your database. The password can include any printable ASCII character except "/", """, or "@".
- Master
Username string - Master user name for your database.
- Preferred
Backup stringWindow - Daily time range during which automated backups are created for your 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 stringWindow - Weekly time range during which system maintenance can occur on your 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 - Whether the database is accessible to resources outside of your Lightsail account. 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 float64 - Amount of RAM in GB for the database.
- Relational
Database stringName Name to use for your Lightsail database resource. Names be unique within each AWS Region in your Lightsail account.
The following arguments are optional:
- Secondary
Availability stringZone - Secondary Availability Zone of a high availability database. The secondary database is used for failover support of a high availability database.
- Skip
Final boolSnapshot - 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 string - 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.
- map[string]string
- 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. - map[string]string
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- apply
Immediately Boolean - Whether to apply changes immediately. When false, applies changes during the preferred maintenance window. Some changes may cause an outage.
- arn String
- ARN of the database (matches
id
). - availability
Zone String - Availability Zone in which to create your database. Use the us-east-2a case-sensitive format.
- backup
Retention BooleanEnabled - Whether to enable 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 String - Blueprint ID for your 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 String - Bundle ID for your 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 StringIdentifier - Certificate associated with the database.
- cpu
Count Integer - Number of vCPUs for the database.
- created
At String - Date and time when the database was created.
- disk
Size Double - Size of the disk for the database.
- engine String
- Database software (for example, MySQL).
- engine
Version String - Database engine version (for example, 5.7.23).
- final
Snapshot StringName - Name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
- master
Database StringName - Name of the master database created when the Lightsail database resource is created.
- master
Endpoint StringAddress - Master endpoint FQDN for the database.
- master
Endpoint IntegerPort - Master endpoint network port for the database.
- master
Password String - Password for the master user of your database. The password can include any printable ASCII character except "/", """, or "@".
- master
Username String - Master user name for your database.
- preferred
Backup StringWindow - Daily time range during which automated backups are created for your 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 StringWindow - Weekly time range during which system maintenance can occur on your 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 Boolean - Whether the database is accessible to resources outside of your Lightsail account. 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 Double - Amount of RAM in GB for the database.
- relational
Database StringName Name to use for your Lightsail database resource. Names be unique within each AWS Region in your Lightsail account.
The following arguments are optional:
- secondary
Availability StringZone - Secondary Availability Zone of a high availability database. The secondary database is used for failover support of a high availability database.
- skip
Final BooleanSnapshot - 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 String - 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.
- Map<String,String>
- 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. - Map<String,String>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- apply
Immediately boolean - Whether to apply changes immediately. When false, applies changes during the preferred maintenance window. Some changes may cause an outage.
- arn string
- ARN of the database (matches
id
). - availability
Zone string - Availability Zone in which to create your database. Use the us-east-2a case-sensitive format.
- backup
Retention booleanEnabled - Whether to enable 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 string - Blueprint ID for your 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 string - Bundle ID for your 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 stringIdentifier - Certificate associated with the database.
- cpu
Count number - Number of vCPUs for the database.
- created
At string - Date and time when the database was created.
- disk
Size number - Size of the disk for the database.
- engine string
- Database software (for example, MySQL).
- engine
Version string - Database engine version (for example, 5.7.23).
- final
Snapshot stringName - Name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
- master
Database stringName - Name of the master database created when the Lightsail database resource is created.
- master
Endpoint stringAddress - Master endpoint FQDN for the database.
- master
Endpoint numberPort - Master endpoint network port for the database.
- master
Password string - Password for the master user of your database. The password can include any printable ASCII character except "/", """, or "@".
- master
Username string - Master user name for your database.
- preferred
Backup stringWindow - Daily time range during which automated backups are created for your 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 stringWindow - Weekly time range during which system maintenance can occur on your 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 boolean - Whether the database is accessible to resources outside of your Lightsail account. 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 number - Amount of RAM in GB for the database.
- relational
Database stringName Name to use for your Lightsail database resource. Names be unique within each AWS Region in your Lightsail account.
The following arguments are optional:
- secondary
Availability stringZone - Secondary Availability Zone of a high availability database. The secondary database is used for failover support of a high availability database.
- skip
Final booleanSnapshot - 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 string - 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.
- {[key: string]: string}
- 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. - {[key: string]: string}
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- apply_
immediately bool - Whether to apply changes immediately. When false, applies changes during the preferred maintenance window. Some changes may cause an outage.
- arn str
- ARN of the database (matches
id
). - availability_
zone str - Availability Zone in which to create your database. Use the us-east-2a case-sensitive format.
- backup_
retention_ boolenabled - Whether to enable 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 - Blueprint ID for your 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 - Bundle ID for your 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_ stridentifier - Certificate associated with the database.
- cpu_
count int - Number of vCPUs for the database.
- created_
at str - Date and time when the database was created.
- disk_
size float - Size of the disk for the database.
- engine str
- Database software (for example, MySQL).
- engine_
version str - Database engine version (for example, 5.7.23).
- final_
snapshot_ strname - Name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
- master_
database_ strname - Name of the master database created when the Lightsail database resource is created.
- master_
endpoint_ straddress - Master endpoint FQDN for the database.
- master_
endpoint_ intport - Master endpoint network port for the database.
- master_
password str - Password for the master user of your database. The password can include any printable ASCII character except "/", """, or "@".
- master_
username str - Master user name for your database.
- preferred_
backup_ strwindow - Daily time range during which automated backups are created for your 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_ strwindow - Weekly time range during which system maintenance can occur on your 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 - Whether the database is accessible to resources outside of your Lightsail account. 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 - Amount of RAM in GB for the database.
- relational_
database_ strname Name to use for your Lightsail database resource. Names be unique within each AWS Region in your Lightsail account.
The following arguments are optional:
- secondary_
availability_ strzone - Secondary Availability Zone of a high availability database. The secondary database is used for failover support of a high availability database.
- skip_
final_ boolsnapshot - 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 - 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.
- Mapping[str, str]
- 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. - Mapping[str, str]
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- apply
Immediately Boolean - Whether to apply changes immediately. When false, applies changes during the preferred maintenance window. Some changes may cause an outage.
- arn String
- ARN of the database (matches
id
). - availability
Zone String - Availability Zone in which to create your database. Use the us-east-2a case-sensitive format.
- backup
Retention BooleanEnabled - Whether to enable 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 String - Blueprint ID for your 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 String - Bundle ID for your 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 StringIdentifier - Certificate associated with the database.
- cpu
Count Number - Number of vCPUs for the database.
- created
At String - Date and time when the database was created.
- disk
Size Number - Size of the disk for the database.
- engine String
- Database software (for example, MySQL).
- engine
Version String - Database engine version (for example, 5.7.23).
- final
Snapshot StringName - Name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
- master
Database StringName - Name of the master database created when the Lightsail database resource is created.
- master
Endpoint StringAddress - Master endpoint FQDN for the database.
- master
Endpoint NumberPort - Master endpoint network port for the database.
- master
Password String - Password for the master user of your database. The password can include any printable ASCII character except "/", """, or "@".
- master
Username String - Master user name for your database.
- preferred
Backup StringWindow - Daily time range during which automated backups are created for your 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 StringWindow - Weekly time range during which system maintenance can occur on your 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 Boolean - Whether the database is accessible to resources outside of your Lightsail account. 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 Number - Amount of RAM in GB for the database.
- relational
Database StringName Name to use for your Lightsail database resource. Names be unique within each AWS Region in your Lightsail account.
The following arguments are optional:
- secondary
Availability StringZone - Secondary Availability Zone of a high availability database. The secondary database is used for failover support of a high availability database.
- skip
Final BooleanSnapshot - 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 String - 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.
- Map<String>
- 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. - Map<String>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
Import
Using pulumi import
, import Lightsail Databases using their name. For example:
$ pulumi import aws:lightsail/database:Database example example-database
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.