We recommend new projects start with resources from the AWS provider.
aws-native.lightsail.Database
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
Resource Type definition for AWS::Lightsail::Database
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,
             relational_database_blueprint_id: Optional[str] = None,
             master_username: Optional[str] = None,
             relational_database_name: Optional[str] = None,
             master_database_name: Optional[str] = None,
             relational_database_bundle_id: Optional[str] = None,
             master_user_password: Optional[str] = None,
             backup_retention: Optional[bool] = None,
             publicly_accessible: Optional[bool] = None,
             preferred_backup_window: Optional[str] = None,
             availability_zone: Optional[str] = None,
             preferred_maintenance_window: Optional[str] = None,
             ca_certificate_identifier: Optional[str] = None,
             relational_database_parameters: Optional[Sequence[DatabaseRelationalDatabaseParameterArgs]] = None,
             rotate_master_user_password: Optional[bool] = None,
             tags: Optional[Sequence[_root_inputs.TagArgs]] = 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-native: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.
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:
- MasterDatabase stringName 
- The name of the database to create when the Lightsail database resource is created. For MySQL, if this parameter isn't specified, no database is created in the database resource. For PostgreSQL, if this parameter isn't specified, a database named postgres is created in the database resource.
- MasterUsername string
- The name for the master user.
- RelationalDatabase stringBlueprint Id 
- The blueprint ID for your new database. A blueprint describes the major engine version of a database.
- RelationalDatabase stringBundle Id 
- The bundle ID for your new database. A bundle describes the performance specifications for your database.
- RelationalDatabase stringName 
- The name to use for your new Lightsail database resource.
- AvailabilityZone string
- The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
- BackupRetention bool
- When true, enables automated backup retention for your database. Updates are applied during the next maintenance window because this can result in an outage.
- CaCertificate stringIdentifier 
- Indicates the certificate that needs to be associated with the database.
- MasterUser stringPassword 
- The password for the master user. The password can include any printable ASCII character except "/", """, or "@". It cannot contain spaces.
- PreferredBackup stringWindow 
- The daily time range during which automated backups are created for your new database if automated backups are enabled.
- PreferredMaintenance stringWindow 
- The weekly time range during which system maintenance can occur on your new database.
- PubliclyAccessible bool
- Specifies the accessibility options for your new database. A value of true specifies a database that is available to resources outside of your Lightsail account. A value of false specifies a database that is available only to your Lightsail resources in the same region as your database.
- RelationalDatabase List<Pulumi.Parameters Aws Native. Lightsail. Inputs. Database Relational Database Parameter> 
- Update one or more parameters of the relational database.
- RotateMaster boolUser Password 
- When true, the master user password is changed to a new strong password generated by Lightsail. Use the get relational database master user password operation to get the new password.
- 
List<Pulumi.Aws Native. Inputs. Tag> 
- An array of key-value pairs to apply to this resource.
- MasterDatabase stringName 
- The name of the database to create when the Lightsail database resource is created. For MySQL, if this parameter isn't specified, no database is created in the database resource. For PostgreSQL, if this parameter isn't specified, a database named postgres is created in the database resource.
- MasterUsername string
- The name for the master user.
- RelationalDatabase stringBlueprint Id 
- The blueprint ID for your new database. A blueprint describes the major engine version of a database.
- RelationalDatabase stringBundle Id 
- The bundle ID for your new database. A bundle describes the performance specifications for your database.
- RelationalDatabase stringName 
- The name to use for your new Lightsail database resource.
- AvailabilityZone string
- The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
- BackupRetention bool
- When true, enables automated backup retention for your database. Updates are applied during the next maintenance window because this can result in an outage.
- CaCertificate stringIdentifier 
- Indicates the certificate that needs to be associated with the database.
- MasterUser stringPassword 
- The password for the master user. The password can include any printable ASCII character except "/", """, or "@". It cannot contain spaces.
- PreferredBackup stringWindow 
- The daily time range during which automated backups are created for your new database if automated backups are enabled.
- PreferredMaintenance stringWindow 
- The weekly time range during which system maintenance can occur on your new database.
- PubliclyAccessible bool
- Specifies the accessibility options for your new database. A value of true specifies a database that is available to resources outside of your Lightsail account. A value of false specifies a database that is available only to your Lightsail resources in the same region as your database.
- RelationalDatabase []DatabaseParameters Relational Database Parameter Args 
- Update one or more parameters of the relational database.
- RotateMaster boolUser Password 
- When true, the master user password is changed to a new strong password generated by Lightsail. Use the get relational database master user password operation to get the new password.
- 
TagArgs 
- An array of key-value pairs to apply to this resource.
- masterDatabase StringName 
- The name of the database to create when the Lightsail database resource is created. For MySQL, if this parameter isn't specified, no database is created in the database resource. For PostgreSQL, if this parameter isn't specified, a database named postgres is created in the database resource.
- masterUsername String
- The name for the master user.
- relationalDatabase StringBlueprint Id 
- The blueprint ID for your new database. A blueprint describes the major engine version of a database.
- relationalDatabase StringBundle Id 
- The bundle ID for your new database. A bundle describes the performance specifications for your database.
- relationalDatabase StringName 
- The name to use for your new Lightsail database resource.
- availabilityZone String
- The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
- backupRetention Boolean
- When true, enables automated backup retention for your database. Updates are applied during the next maintenance window because this can result in an outage.
- caCertificate StringIdentifier 
- Indicates the certificate that needs to be associated with the database.
- masterUser StringPassword 
- The password for the master user. The password can include any printable ASCII character except "/", """, or "@". It cannot contain spaces.
- preferredBackup StringWindow 
- The daily time range during which automated backups are created for your new database if automated backups are enabled.
- preferredMaintenance StringWindow 
- The weekly time range during which system maintenance can occur on your new database.
- publiclyAccessible Boolean
- Specifies the accessibility options for your new database. A value of true specifies a database that is available to resources outside of your Lightsail account. A value of false specifies a database that is available only to your Lightsail resources in the same region as your database.
- relationalDatabase List<DatabaseParameters Relational Database Parameter> 
- Update one or more parameters of the relational database.
- rotateMaster BooleanUser Password 
- When true, the master user password is changed to a new strong password generated by Lightsail. Use the get relational database master user password operation to get the new password.
- List<Tag>
- An array of key-value pairs to apply to this resource.
- masterDatabase stringName 
- The name of the database to create when the Lightsail database resource is created. For MySQL, if this parameter isn't specified, no database is created in the database resource. For PostgreSQL, if this parameter isn't specified, a database named postgres is created in the database resource.
- masterUsername string
- The name for the master user.
- relationalDatabase stringBlueprint Id 
- The blueprint ID for your new database. A blueprint describes the major engine version of a database.
- relationalDatabase stringBundle Id 
- The bundle ID for your new database. A bundle describes the performance specifications for your database.
- relationalDatabase stringName 
- The name to use for your new Lightsail database resource.
- availabilityZone string
- The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
- backupRetention boolean
- When true, enables automated backup retention for your database. Updates are applied during the next maintenance window because this can result in an outage.
- caCertificate stringIdentifier 
- Indicates the certificate that needs to be associated with the database.
- masterUser stringPassword 
- The password for the master user. The password can include any printable ASCII character except "/", """, or "@". It cannot contain spaces.
- preferredBackup stringWindow 
- The daily time range during which automated backups are created for your new database if automated backups are enabled.
- preferredMaintenance stringWindow 
- The weekly time range during which system maintenance can occur on your new database.
- publiclyAccessible boolean
- Specifies the accessibility options for your new database. A value of true specifies a database that is available to resources outside of your Lightsail account. A value of false specifies a database that is available only to your Lightsail resources in the same region as your database.
- relationalDatabase DatabaseParameters Relational Database Parameter[] 
- Update one or more parameters of the relational database.
- rotateMaster booleanUser Password 
- When true, the master user password is changed to a new strong password generated by Lightsail. Use the get relational database master user password operation to get the new password.
- Tag[]
- An array of key-value pairs to apply to this resource.
- master_database_ strname 
- The name of the database to create when the Lightsail database resource is created. For MySQL, if this parameter isn't specified, no database is created in the database resource. For PostgreSQL, if this parameter isn't specified, a database named postgres is created in the database resource.
- master_username str
- The name for the master user.
- relational_database_ strblueprint_ id 
- The blueprint ID for your new database. A blueprint describes the major engine version of a database.
- relational_database_ strbundle_ id 
- The bundle ID for your new database. A bundle describes the performance specifications for your database.
- relational_database_ strname 
- The name to use for your new Lightsail database resource.
- availability_zone str
- The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
- backup_retention bool
- When true, enables automated backup retention for your database. Updates are applied during the next maintenance window because this can result in an outage.
- ca_certificate_ stridentifier 
- Indicates the certificate that needs to be associated with the database.
- master_user_ strpassword 
- The password for the master user. The password can include any printable ASCII character except "/", """, or "@". It cannot contain spaces.
- preferred_backup_ strwindow 
- The daily time range during which automated backups are created for your new database if automated backups are enabled.
- preferred_maintenance_ strwindow 
- The weekly time range during which system maintenance can occur on your new database.
- 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.
- relational_database_ Sequence[Databaseparameters Relational Database Parameter Args] 
- Update one or more parameters of the relational database.
- rotate_master_ booluser_ password 
- When true, the master user password is changed to a new strong password generated by Lightsail. Use the get relational database master user password operation to get the new password.
- 
Sequence[TagArgs] 
- An array of key-value pairs to apply to this resource.
- masterDatabase StringName 
- The name of the database to create when the Lightsail database resource is created. For MySQL, if this parameter isn't specified, no database is created in the database resource. For PostgreSQL, if this parameter isn't specified, a database named postgres is created in the database resource.
- masterUsername String
- The name for the master user.
- relationalDatabase StringBlueprint Id 
- The blueprint ID for your new database. A blueprint describes the major engine version of a database.
- relationalDatabase StringBundle Id 
- The bundle ID for your new database. A bundle describes the performance specifications for your database.
- relationalDatabase StringName 
- The name to use for your new Lightsail database resource.
- availabilityZone String
- The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
- backupRetention Boolean
- When true, enables automated backup retention for your database. Updates are applied during the next maintenance window because this can result in an outage.
- caCertificate StringIdentifier 
- Indicates the certificate that needs to be associated with the database.
- masterUser StringPassword 
- The password for the master user. The password can include any printable ASCII character except "/", """, or "@". It cannot contain spaces.
- preferredBackup StringWindow 
- The daily time range during which automated backups are created for your new database if automated backups are enabled.
- preferredMaintenance StringWindow 
- The weekly time range during which system maintenance can occur on your new database.
- publiclyAccessible Boolean
- Specifies the accessibility options for your new database. A value of true specifies a database that is available to resources outside of your Lightsail account. A value of false specifies a database that is available only to your Lightsail resources in the same region as your database.
- relationalDatabase List<Property Map>Parameters 
- Update one or more parameters of the relational database.
- rotateMaster BooleanUser Password 
- When true, the master user password is changed to a new strong password generated by Lightsail. Use the get relational database master user password operation to get the new password.
- List<Property Map>
- An array of key-value pairs to apply to this resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the Database resource produces the following output properties:
- DatabaseArn string
- The Amazon Resource Name (ARN) of the database (for example, arn:aws:lightsail:us-east-2:123456789101:RelationalDatabase/244ad76f-8aad-4741-809f-12345EXAMPLE).
- Id string
- The provider-assigned unique ID for this managed resource.
- DatabaseArn string
- The Amazon Resource Name (ARN) of the database (for example, arn:aws:lightsail:us-east-2:123456789101:RelationalDatabase/244ad76f-8aad-4741-809f-12345EXAMPLE).
- Id string
- The provider-assigned unique ID for this managed resource.
- databaseArn String
- The Amazon Resource Name (ARN) of the database (for example, arn:aws:lightsail:us-east-2:123456789101:RelationalDatabase/244ad76f-8aad-4741-809f-12345EXAMPLE).
- id String
- The provider-assigned unique ID for this managed resource.
- databaseArn string
- The Amazon Resource Name (ARN) of the database (for example, arn:aws:lightsail:us-east-2:123456789101:RelationalDatabase/244ad76f-8aad-4741-809f-12345EXAMPLE).
- id string
- The provider-assigned unique ID for this managed resource.
- database_arn str
- The Amazon Resource Name (ARN) of the database (for example, arn:aws:lightsail:us-east-2:123456789101:RelationalDatabase/244ad76f-8aad-4741-809f-12345EXAMPLE).
- id str
- The provider-assigned unique ID for this managed resource.
- databaseArn String
- The Amazon Resource Name (ARN) of the database (for example, arn:aws:lightsail:us-east-2:123456789101:RelationalDatabase/244ad76f-8aad-4741-809f-12345EXAMPLE).
- id String
- The provider-assigned unique ID for this managed resource.
Supporting Types
DatabaseRelationalDatabaseParameter, DatabaseRelationalDatabaseParameterArgs        
- AllowedValues string
- Specifies the valid range of values for the parameter.
- ApplyMethod string
- Indicates when parameter updates are applied. Can be immediate or pending-reboot.
- ApplyType string
- Specifies the engine-specific parameter type.
- DataType string
- Specifies the valid data type for the parameter.
- Description string
- Provides a description of the parameter.
- IsModifiable bool
- A Boolean value indicating whether the parameter can be modified.
- ParameterName string
- Specifies the name of the parameter.
- ParameterValue string
- Specifies the value of the parameter.
- AllowedValues string
- Specifies the valid range of values for the parameter.
- ApplyMethod string
- Indicates when parameter updates are applied. Can be immediate or pending-reboot.
- ApplyType string
- Specifies the engine-specific parameter type.
- DataType string
- Specifies the valid data type for the parameter.
- Description string
- Provides a description of the parameter.
- IsModifiable bool
- A Boolean value indicating whether the parameter can be modified.
- ParameterName string
- Specifies the name of the parameter.
- ParameterValue string
- Specifies the value of the parameter.
- allowedValues String
- Specifies the valid range of values for the parameter.
- applyMethod String
- Indicates when parameter updates are applied. Can be immediate or pending-reboot.
- applyType String
- Specifies the engine-specific parameter type.
- dataType String
- Specifies the valid data type for the parameter.
- description String
- Provides a description of the parameter.
- isModifiable Boolean
- A Boolean value indicating whether the parameter can be modified.
- parameterName String
- Specifies the name of the parameter.
- parameterValue String
- Specifies the value of the parameter.
- allowedValues string
- Specifies the valid range of values for the parameter.
- applyMethod string
- Indicates when parameter updates are applied. Can be immediate or pending-reboot.
- applyType string
- Specifies the engine-specific parameter type.
- dataType string
- Specifies the valid data type for the parameter.
- description string
- Provides a description of the parameter.
- isModifiable boolean
- A Boolean value indicating whether the parameter can be modified.
- parameterName string
- Specifies the name of the parameter.
- parameterValue string
- Specifies the value of the parameter.
- allowed_values str
- Specifies the valid range of values for the parameter.
- apply_method str
- Indicates when parameter updates are applied. Can be immediate or pending-reboot.
- apply_type str
- Specifies the engine-specific parameter type.
- data_type str
- Specifies the valid data type for the parameter.
- description str
- Provides a description of the parameter.
- is_modifiable bool
- A Boolean value indicating whether the parameter can be modified.
- parameter_name str
- Specifies the name of the parameter.
- parameter_value str
- Specifies the value of the parameter.
- allowedValues String
- Specifies the valid range of values for the parameter.
- applyMethod String
- Indicates when parameter updates are applied. Can be immediate or pending-reboot.
- applyType String
- Specifies the engine-specific parameter type.
- dataType String
- Specifies the valid data type for the parameter.
- description String
- Provides a description of the parameter.
- isModifiable Boolean
- A Boolean value indicating whether the parameter can be modified.
- parameterName String
- Specifies the name of the parameter.
- parameterValue String
- Specifies the value of the parameter.
Tag, TagArgs  
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.