Try AWS Native preview for resources not in the classic version.
aws.lightsail.Database
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
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
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
Example Usage
Basic mysql blueprint
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()
{
AvailabilityZone = "us-east-1a",
BlueprintId = "mysql_8_0",
BundleId = "micro_1_0",
MasterDatabaseName = "testdatabasename",
MasterPassword = "testdatabasepassword",
MasterUsername = "test",
RelationalDatabaseName = "test",
});
});
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{
AvailabilityZone: pulumi.String("us-east-1a"),
BlueprintId: pulumi.String("mysql_8_0"),
BundleId: pulumi.String("micro_1_0"),
MasterDatabaseName: pulumi.String("testdatabasename"),
MasterPassword: pulumi.String("testdatabasepassword"),
MasterUsername: pulumi.String("test"),
RelationalDatabaseName: pulumi.String("test"),
})
if err != nil {
return err
}
return nil
})
}
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()
.availabilityZone("us-east-1a")
.blueprintId("mysql_8_0")
.bundleId("micro_1_0")
.masterDatabaseName("testdatabasename")
.masterPassword("testdatabasepassword")
.masterUsername("test")
.relationalDatabaseName("test")
.build());
}
}
import pulumi
import pulumi_aws as aws
test = aws.lightsail.Database("test",
availability_zone="us-east-1a",
blueprint_id="mysql_8_0",
bundle_id="micro_1_0",
master_database_name="testdatabasename",
master_password="testdatabasepassword",
master_username="test",
relational_database_name="test")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = new aws.lightsail.Database("test", {
availabilityZone: "us-east-1a",
blueprintId: "mysql_8_0",
bundleId: "micro_1_0",
masterDatabaseName: "testdatabasename",
masterPassword: "testdatabasepassword",
masterUsername: "test",
relationalDatabaseName: "test",
});
resources:
test:
type: aws:lightsail:Database
properties:
availabilityZone: us-east-1a
blueprintId: mysql_8_0
bundleId: micro_1_0
masterDatabaseName: testdatabasename
masterPassword: testdatabasepassword
masterUsername: test
relationalDatabaseName: test
Basic postrgres blueprint
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()
{
AvailabilityZone = "us-east-1a",
BlueprintId = "postgres_12",
BundleId = "micro_1_0",
MasterDatabaseName = "testdatabasename",
MasterPassword = "testdatabasepassword",
MasterUsername = "test",
RelationalDatabaseName = "test",
});
});
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{
AvailabilityZone: pulumi.String("us-east-1a"),
BlueprintId: pulumi.String("postgres_12"),
BundleId: pulumi.String("micro_1_0"),
MasterDatabaseName: pulumi.String("testdatabasename"),
MasterPassword: pulumi.String("testdatabasepassword"),
MasterUsername: pulumi.String("test"),
RelationalDatabaseName: pulumi.String("test"),
})
if err != nil {
return err
}
return nil
})
}
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()
.availabilityZone("us-east-1a")
.blueprintId("postgres_12")
.bundleId("micro_1_0")
.masterDatabaseName("testdatabasename")
.masterPassword("testdatabasepassword")
.masterUsername("test")
.relationalDatabaseName("test")
.build());
}
}
import pulumi
import pulumi_aws as aws
test = aws.lightsail.Database("test",
availability_zone="us-east-1a",
blueprint_id="postgres_12",
bundle_id="micro_1_0",
master_database_name="testdatabasename",
master_password="testdatabasepassword",
master_username="test",
relational_database_name="test")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = new aws.lightsail.Database("test", {
availabilityZone: "us-east-1a",
blueprintId: "postgres_12",
bundleId: "micro_1_0",
masterDatabaseName: "testdatabasename",
masterPassword: "testdatabasepassword",
masterUsername: "test",
relationalDatabaseName: "test",
});
resources:
test:
type: aws:lightsail:Database
properties:
availabilityZone: us-east-1a
blueprintId: postgres_12
bundleId: micro_1_0
masterDatabaseName: testdatabasename
masterPassword: testdatabasepassword
masterUsername: test
relationalDatabaseName: test
Custom backup and maintenance windows
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()
{
AvailabilityZone = "us-east-1a",
BlueprintId = "postgres_12",
BundleId = "micro_1_0",
MasterDatabaseName = "testdatabasename",
MasterPassword = "testdatabasepassword",
MasterUsername = "test",
PreferredBackupWindow = "16:00-16:30",
PreferredMaintenanceWindow = "Tue:17:00-Tue:17:30",
RelationalDatabaseName = "test",
});
});
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{
AvailabilityZone: pulumi.String("us-east-1a"),
BlueprintId: pulumi.String("postgres_12"),
BundleId: pulumi.String("micro_1_0"),
MasterDatabaseName: pulumi.String("testdatabasename"),
MasterPassword: pulumi.String("testdatabasepassword"),
MasterUsername: pulumi.String("test"),
PreferredBackupWindow: pulumi.String("16:00-16:30"),
PreferredMaintenanceWindow: pulumi.String("Tue:17:00-Tue:17:30"),
RelationalDatabaseName: pulumi.String("test"),
})
if err != nil {
return err
}
return nil
})
}
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()
.availabilityZone("us-east-1a")
.blueprintId("postgres_12")
.bundleId("micro_1_0")
.masterDatabaseName("testdatabasename")
.masterPassword("testdatabasepassword")
.masterUsername("test")
.preferredBackupWindow("16:00-16:30")
.preferredMaintenanceWindow("Tue:17:00-Tue:17:30")
.relationalDatabaseName("test")
.build());
}
}
import pulumi
import pulumi_aws as aws
test = aws.lightsail.Database("test",
availability_zone="us-east-1a",
blueprint_id="postgres_12",
bundle_id="micro_1_0",
master_database_name="testdatabasename",
master_password="testdatabasepassword",
master_username="test",
preferred_backup_window="16:00-16:30",
preferred_maintenance_window="Tue:17:00-Tue:17:30",
relational_database_name="test")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = new aws.lightsail.Database("test", {
availabilityZone: "us-east-1a",
blueprintId: "postgres_12",
bundleId: "micro_1_0",
masterDatabaseName: "testdatabasename",
masterPassword: "testdatabasepassword",
masterUsername: "test",
preferredBackupWindow: "16:00-16:30",
preferredMaintenanceWindow: "Tue:17:00-Tue:17:30",
relationalDatabaseName: "test",
});
resources:
test:
type: aws:lightsail:Database
properties:
availabilityZone: us-east-1a
blueprintId: postgres_12
bundleId: micro_1_0
masterDatabaseName: testdatabasename
masterPassword: testdatabasepassword
masterUsername: test
preferredBackupWindow: 16:00-16:30
preferredMaintenanceWindow: Tue:17:00-Tue:17:30
relationalDatabaseName: test
Final Snapshots
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()
{
AvailabilityZone = "us-east-1a",
BlueprintId = "postgres_12",
BundleId = "micro_1_0",
FinalSnapshotName = "MyFinalSnapshot",
MasterDatabaseName = "testdatabasename",
MasterPassword = "testdatabasepassword",
MasterUsername = "test",
PreferredBackupWindow = "16:00-16:30",
PreferredMaintenanceWindow = "Tue:17:00-Tue:17:30",
RelationalDatabaseName = "test",
});
});
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{
AvailabilityZone: pulumi.String("us-east-1a"),
BlueprintId: pulumi.String("postgres_12"),
BundleId: pulumi.String("micro_1_0"),
FinalSnapshotName: pulumi.String("MyFinalSnapshot"),
MasterDatabaseName: pulumi.String("testdatabasename"),
MasterPassword: pulumi.String("testdatabasepassword"),
MasterUsername: pulumi.String("test"),
PreferredBackupWindow: pulumi.String("16:00-16:30"),
PreferredMaintenanceWindow: pulumi.String("Tue:17:00-Tue:17:30"),
RelationalDatabaseName: pulumi.String("test"),
})
if err != nil {
return err
}
return nil
})
}
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()
.availabilityZone("us-east-1a")
.blueprintId("postgres_12")
.bundleId("micro_1_0")
.finalSnapshotName("MyFinalSnapshot")
.masterDatabaseName("testdatabasename")
.masterPassword("testdatabasepassword")
.masterUsername("test")
.preferredBackupWindow("16:00-16:30")
.preferredMaintenanceWindow("Tue:17:00-Tue:17:30")
.relationalDatabaseName("test")
.build());
}
}
import pulumi
import pulumi_aws as aws
test = aws.lightsail.Database("test",
availability_zone="us-east-1a",
blueprint_id="postgres_12",
bundle_id="micro_1_0",
final_snapshot_name="MyFinalSnapshot",
master_database_name="testdatabasename",
master_password="testdatabasepassword",
master_username="test",
preferred_backup_window="16:00-16:30",
preferred_maintenance_window="Tue:17:00-Tue:17:30",
relational_database_name="test")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = new aws.lightsail.Database("test", {
availabilityZone: "us-east-1a",
blueprintId: "postgres_12",
bundleId: "micro_1_0",
finalSnapshotName: "MyFinalSnapshot",
masterDatabaseName: "testdatabasename",
masterPassword: "testdatabasepassword",
masterUsername: "test",
preferredBackupWindow: "16:00-16:30",
preferredMaintenanceWindow: "Tue:17:00-Tue:17:30",
relationalDatabaseName: "test",
});
resources:
test:
type: aws:lightsail:Database
properties:
availabilityZone: us-east-1a
blueprintId: postgres_12
bundleId: micro_1_0
finalSnapshotName: MyFinalSnapshot
masterDatabaseName: testdatabasename
masterPassword: testdatabasepassword
masterUsername: test
preferredBackupWindow: 16:00-16:30
preferredMaintenanceWindow: Tue:17:00-Tue:17:30
relationalDatabaseName: test
Apply Immediately
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()
{
ApplyImmediately = true,
AvailabilityZone = "us-east-1a",
BlueprintId = "postgres_12",
BundleId = "micro_1_0",
MasterDatabaseName = "testdatabasename",
MasterPassword = "testdatabasepassword",
MasterUsername = "test",
RelationalDatabaseName = "test",
});
});
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{
ApplyImmediately: pulumi.Bool(true),
AvailabilityZone: pulumi.String("us-east-1a"),
BlueprintId: pulumi.String("postgres_12"),
BundleId: pulumi.String("micro_1_0"),
MasterDatabaseName: pulumi.String("testdatabasename"),
MasterPassword: pulumi.String("testdatabasepassword"),
MasterUsername: pulumi.String("test"),
RelationalDatabaseName: pulumi.String("test"),
})
if err != nil {
return err
}
return nil
})
}
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()
.applyImmediately(true)
.availabilityZone("us-east-1a")
.blueprintId("postgres_12")
.bundleId("micro_1_0")
.masterDatabaseName("testdatabasename")
.masterPassword("testdatabasepassword")
.masterUsername("test")
.relationalDatabaseName("test")
.build());
}
}
import pulumi
import pulumi_aws as aws
test = aws.lightsail.Database("test",
apply_immediately=True,
availability_zone="us-east-1a",
blueprint_id="postgres_12",
bundle_id="micro_1_0",
master_database_name="testdatabasename",
master_password="testdatabasepassword",
master_username="test",
relational_database_name="test")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = new aws.lightsail.Database("test", {
applyImmediately: true,
availabilityZone: "us-east-1a",
blueprintId: "postgres_12",
bundleId: "micro_1_0",
masterDatabaseName: "testdatabasename",
masterPassword: "testdatabasepassword",
masterUsername: "test",
relationalDatabaseName: "test",
});
resources:
test:
type: aws:lightsail:Database
properties:
applyImmediately: true
availabilityZone: us-east-1a
blueprintId: postgres_12
bundleId: micro_1_0
masterDatabaseName: testdatabasename
masterPassword: testdatabasepassword
masterUsername: test
relationalDatabaseName: test
Create Database Resource
new Database(name: string, args: DatabaseArgs, opts?: CustomResourceOptions);
@overload
def Database(resource_name: str,
opts: Optional[ResourceOptions] = None,
apply_immediately: Optional[bool] = None,
availability_zone: Optional[str] = None,
backup_retention_enabled: Optional[bool] = None,
blueprint_id: Optional[str] = None,
bundle_id: Optional[str] = None,
final_snapshot_name: Optional[str] = None,
master_database_name: Optional[str] = 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,
relational_database_name: Optional[str] = None,
skip_final_snapshot: Optional[bool] = None,
tags: Optional[Mapping[str, str]] = None)
@overload
def Database(resource_name: str,
args: DatabaseArgs,
opts: Optional[ResourceOptions] = 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.
- 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.
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:
- Blueprint
Id 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
- Bundle
Id 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
.- Master
Database stringName The name of the master database created when the Lightsail database resource is created.
- Master
Password string The password for the master user of your new database. The password can include any printable ASCII character except "/", """, or "@".
- Master
Username string The master user name for your new database.
- Relational
Database stringName 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 string The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
- Backup
Retention boolEnabled 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 stringName The name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
- Preferred
Backup stringWindow 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 stringWindow 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 boolSnapshot 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.
- 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.
- Blueprint
Id 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
- Bundle
Id 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
.- Master
Database stringName The name of the master database created when the Lightsail database resource is created.
- Master
Password string The password for the master user of your new database. The password can include any printable ASCII character except "/", """, or "@".
- Master
Username string The master user name for your new database.
- Relational
Database stringName 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 string The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
- Backup
Retention boolEnabled 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 stringName The name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
- Preferred
Backup stringWindow 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 stringWindow 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 boolSnapshot 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.
- 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.
- blueprint
Id 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
- bundle
Id 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
.- master
Database StringName The name of the master database created when the Lightsail database resource is created.
- master
Password String The password for the master user of your new database. The password can include any printable ASCII character except "/", """, or "@".
- master
Username String The master user name for your new database.
- relational
Database StringName The name to use for your new Lightsail database resource. Names be unique within each AWS Region in your Lightsail account.
- apply
Immediately Boolean When true , applies changes immediately. When false , applies changes during the preferred maintenance window. Some changes may cause an outage.
- availability
Zone String The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
- backup
Retention BooleanEnabled 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 StringName The name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
- preferred
Backup StringWindow 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 StringWindow 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 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.
- skip
Final BooleanSnapshot 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.
- 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.
- blueprint
Id 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
- bundle
Id 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
.- master
Database stringName The name of the master database created when the Lightsail database resource is created.
- master
Password string The password for the master user of your new database. The password can include any printable ASCII character except "/", """, or "@".
- master
Username string The master user name for your new database.
- relational
Database stringName The name to use for your new Lightsail database resource. Names be unique within each AWS Region in your Lightsail account.
- apply
Immediately boolean When true , applies changes immediately. When false , applies changes during the preferred maintenance window. Some changes may cause an outage.
- availability
Zone string The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
- backup
Retention booleanEnabled 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 stringName The name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
- preferred
Backup stringWindow 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 stringWindow 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 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.
- skip
Final booleanSnapshot 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.
- {[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_ strname 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_ strname 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_ boolenabled 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_ strname The name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
- preferred_
backup_ strwindow 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_ strwindow 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_ boolsnapshot 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.
- 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.
- blueprint
Id 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
- bundle
Id 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
.- master
Database StringName The name of the master database created when the Lightsail database resource is created.
- master
Password String The password for the master user of your new database. The password can include any printable ASCII character except "/", """, or "@".
- master
Username String The master user name for your new database.
- relational
Database StringName The name to use for your new Lightsail database resource. Names be unique within each AWS Region in your Lightsail account.
- apply
Immediately Boolean When true , applies changes immediately. When false , applies changes during the preferred maintenance window. Some changes may cause an outage.
- availability
Zone String The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
- backup
Retention BooleanEnabled 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 StringName The name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
- preferred
Backup StringWindow 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 StringWindow 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 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.
- skip
Final BooleanSnapshot 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.
- 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
).- Ca
Certificate stringIdentifier The certificate associated with the database.
- Cpu
Count int The number of vCPUs for the database.
- Created
At string The timestamp when the instance was created.
- Disk
Size double The size of the disk for the database.
- Engine string
The database software (for example, MySQL).
- Engine
Version string The database engine version (for example, 5.7.23).
- Id string
The provider-assigned unique ID for this managed resource.
- Master
Endpoint stringAddress The master endpoint fqdn for the database.
- Master
Endpoint intPort The master endpoint network port for the database.
- Ram
Size double The amount of RAM in GB for the database.
- Secondary
Availability stringZone 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 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.
- Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.
- Arn string
The ARN of the Lightsail instance (matches
id
).- Ca
Certificate stringIdentifier The certificate associated with the database.
- Cpu
Count int The number of vCPUs for the database.
- Created
At string The timestamp when the instance was created.
- Disk
Size float64 The size of the disk for the database.
- Engine string
The database software (for example, MySQL).
- Engine
Version string The database engine version (for example, 5.7.23).
- Id string
The provider-assigned unique ID for this managed resource.
- Master
Endpoint stringAddress The master endpoint fqdn for the database.
- Master
Endpoint intPort The master endpoint network port for the database.
- Ram
Size float64 The amount of RAM in GB for the database.
- Secondary
Availability stringZone 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 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.
- map[string]string
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.
- arn String
The ARN of the Lightsail instance (matches
id
).- ca
Certificate StringIdentifier The certificate associated with the database.
- cpu
Count Integer The number of vCPUs for the database.
- created
At String The timestamp when the instance was created.
- disk
Size Double The size of the disk for the database.
- engine String
The database software (for example, MySQL).
- engine
Version String The database engine version (for example, 5.7.23).
- id String
The provider-assigned unique ID for this managed resource.
- master
Endpoint StringAddress The master endpoint fqdn for the database.
- master
Endpoint IntegerPort The master endpoint network port for the database.
- ram
Size Double The amount of RAM in GB for the database.
- secondary
Availability StringZone 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 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.
- Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.
- arn string
The ARN of the Lightsail instance (matches
id
).- ca
Certificate stringIdentifier The certificate associated with the database.
- cpu
Count number The number of vCPUs for the database.
- created
At string The timestamp when the instance was created.
- disk
Size number The size of the disk for the database.
- engine string
The database software (for example, MySQL).
- engine
Version string The database engine version (for example, 5.7.23).
- id string
The provider-assigned unique ID for this managed resource.
- master
Endpoint stringAddress The master endpoint fqdn for the database.
- master
Endpoint numberPort The master endpoint network port for the database.
- ram
Size number The amount of RAM in GB for the database.
- secondary
Availability stringZone 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 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.
- {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.
- arn str
The ARN of the Lightsail instance (matches
id
).- ca_
certificate_ stridentifier 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_ straddress The master endpoint fqdn for the database.
- master_
endpoint_ intport The master endpoint network port for the database.
- ram_
size float The amount of RAM in GB for the database.
- secondary_
availability_ strzone 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.
- Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.
- arn String
The ARN of the Lightsail instance (matches
id
).- ca
Certificate StringIdentifier The certificate associated with the database.
- cpu
Count Number The number of vCPUs for the database.
- created
At String The timestamp when the instance was created.
- disk
Size Number The size of the disk for the database.
- engine String
The database software (for example, MySQL).
- engine
Version String The database engine version (for example, 5.7.23).
- id String
The provider-assigned unique ID for this managed resource.
- master
Endpoint StringAddress The master endpoint fqdn for the database.
- master
Endpoint NumberPort The master endpoint network port for the database.
- ram
Size Number The amount of RAM in GB for the database.
- secondary
Availability StringZone 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 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.
- Map<String>
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.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.
- Apply
Immediately 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
).- Availability
Zone string The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
- Backup
Retention boolEnabled 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 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
- Bundle
Id 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
.- Ca
Certificate stringIdentifier The certificate associated with the database.
- Cpu
Count int The number of vCPUs for the database.
- Created
At string The timestamp when the instance was created.
- Disk
Size double The size of the disk for the database.
- Engine string
The database software (for example, MySQL).
- Engine
Version string The database engine version (for example, 5.7.23).
- Final
Snapshot stringName The name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
- Master
Database stringName The name of the master database created when the Lightsail database resource is created.
- Master
Endpoint stringAddress The master endpoint fqdn for the database.
- Master
Endpoint intPort The master endpoint network port for the database.
- Master
Password string The password for the master user of your new database. The password can include any printable ASCII character except "/", """, or "@".
- Master
Username string The master user name for your new database.
- Preferred
Backup stringWindow 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 stringWindow 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 double The amount of RAM in GB for the database.
- Relational
Database stringName The name to use for your new Lightsail database resource. Names be unique within each AWS Region in your Lightsail account.
- Secondary
Availability stringZone 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 boolSnapshot 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 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.
- 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.
- Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.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 string
The ARN of the Lightsail instance (matches
id
).- Availability
Zone string The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
- Backup
Retention boolEnabled 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 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
- Bundle
Id 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
.- Ca
Certificate stringIdentifier The certificate associated with the database.
- Cpu
Count int The number of vCPUs for the database.
- Created
At string The timestamp when the instance was created.
- Disk
Size float64 The size of the disk for the database.
- Engine string
The database software (for example, MySQL).
- Engine
Version string The database engine version (for example, 5.7.23).
- Final
Snapshot stringName The name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
- Master
Database stringName The name of the master database created when the Lightsail database resource is created.
- Master
Endpoint stringAddress The master endpoint fqdn for the database.
- Master
Endpoint intPort The master endpoint network port for the database.
- Master
Password string The password for the master user of your new database. The password can include any printable ASCII character except "/", """, or "@".
- Master
Username string The master user name for your new database.
- Preferred
Backup stringWindow 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 stringWindow 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 float64 The amount of RAM in GB for the database.
- Relational
Database stringName The name to use for your new Lightsail database resource. Names be unique within each AWS Region in your Lightsail account.
- Secondary
Availability stringZone 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 boolSnapshot 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 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.
- 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.
- map[string]string
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.
- apply
Immediately 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
).- availability
Zone String The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
- backup
Retention BooleanEnabled 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 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
- bundle
Id 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
.- ca
Certificate StringIdentifier The certificate associated with the database.
- cpu
Count Integer The number of vCPUs for the database.
- created
At String The timestamp when the instance was created.
- disk
Size Double The size of the disk for the database.
- engine String
The database software (for example, MySQL).
- engine
Version String The database engine version (for example, 5.7.23).
- final
Snapshot StringName The name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
- master
Database StringName The name of the master database created when the Lightsail database resource is created.
- master
Endpoint StringAddress The master endpoint fqdn for the database.
- master
Endpoint IntegerPort The master endpoint network port for the database.
- master
Password String The password for the master user of your new database. The password can include any printable ASCII character except "/", """, or "@".
- master
Username String The master user name for your new database.
- preferred
Backup StringWindow 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 StringWindow 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 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.
- ram
Size Double The amount of RAM in GB for the database.
- relational
Database StringName The name to use for your new Lightsail database resource. Names be unique within each AWS Region in your Lightsail account.
- secondary
Availability StringZone 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 BooleanSnapshot 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 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.
- 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.
- Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.
- apply
Immediately 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
).- availability
Zone string The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
- backup
Retention booleanEnabled 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 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
- bundle
Id 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
.- ca
Certificate stringIdentifier The certificate associated with the database.
- cpu
Count number The number of vCPUs for the database.
- created
At string The timestamp when the instance was created.
- disk
Size number The size of the disk for the database.
- engine string
The database software (for example, MySQL).
- engine
Version string The database engine version (for example, 5.7.23).
- final
Snapshot stringName The name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
- master
Database stringName The name of the master database created when the Lightsail database resource is created.
- master
Endpoint stringAddress The master endpoint fqdn for the database.
- master
Endpoint numberPort The master endpoint network port for the database.
- master
Password string The password for the master user of your new database. The password can include any printable ASCII character except "/", """, or "@".
- master
Username string The master user name for your new database.
- preferred
Backup stringWindow 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 stringWindow 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 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.
- ram
Size number The amount of RAM in GB for the database.
- relational
Database stringName The name to use for your new Lightsail database resource. Names be unique within each AWS Region in your Lightsail account.
- secondary
Availability stringZone 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 booleanSnapshot 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 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.
- {[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.
- {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.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_ boolenabled 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_ stridentifier 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_ strname The name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
- master_
database_ strname The name of the master database created when the Lightsail database resource is created.
- master_
endpoint_ straddress The master endpoint fqdn for the database.
- master_
endpoint_ intport 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_ strwindow 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_ strwindow 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_ strname The name to use for your new Lightsail database resource. Names be unique within each AWS Region in your Lightsail account.
- secondary_
availability_ strzone 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_ boolsnapshot 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.
- 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.
- Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.
- apply
Immediately 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
).- availability
Zone String The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
- backup
Retention BooleanEnabled 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 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
- bundle
Id 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
.- ca
Certificate StringIdentifier The certificate associated with the database.
- cpu
Count Number The number of vCPUs for the database.
- created
At String The timestamp when the instance was created.
- disk
Size Number The size of the disk for the database.
- engine String
The database software (for example, MySQL).
- engine
Version String The database engine version (for example, 5.7.23).
- final
Snapshot StringName The name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.
- master
Database StringName The name of the master database created when the Lightsail database resource is created.
- master
Endpoint StringAddress The master endpoint fqdn for the database.
- master
Endpoint NumberPort The master endpoint network port for the database.
- master
Password String The password for the master user of your new database. The password can include any printable ASCII character except "/", """, or "@".
- master
Username String The master user name for your new database.
- preferred
Backup StringWindow 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 StringWindow 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 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.
- ram
Size Number The amount of RAM in GB for the database.
- relational
Database StringName The name to use for your new Lightsail database resource. Names be unique within each AWS Region in your Lightsail account.
- secondary
Availability StringZone 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 BooleanSnapshot 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 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.
- Map<String>
A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value.
- Map<String>
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.
Import
Using pulumi import
, import Lightsail Databases using their name. For example:
$ pulumi import aws:lightsail/database:Database foo 'bar'
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.