We recommend new projects start with resources from the AWS provider.
AWS Cloud Control v1.5.0 published on Friday, Nov 1, 2024 by Pulumi
aws-native.lightsail.Database
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
AWS Cloud Control v1.5.0 published on Friday, Nov 1, 2024 by Pulumi
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
The Database resource accepts the following input properties:
- Master
Database 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.
- Master
Username string - The name for the master user.
- Relational
Database stringBlueprint Id - The blueprint ID for your new database. A blueprint describes the major engine version of a database.
- Relational
Database stringBundle Id - The bundle ID for your new database. A bundle describes the performance specifications for your database.
- Relational
Database stringName - The name to use for your new Lightsail database resource.
- Availability
Zone string - 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 stringIdentifier - Indicates the certificate that needs to be associated with the database.
- Master
User stringPassword - The password for the master user. The password can include any printable ASCII character except "/", """, or "@". It cannot contain spaces.
- Preferred
Backup stringWindow - The daily time range during which automated backups are created for your new database if automated backups are enabled.
- Preferred
Maintenance stringWindow - 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 List<Pulumi.Parameters Aws Native. Lightsail. Inputs. Database Relational Database Parameter> - 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.
- List<Pulumi.
Aws Native. Inputs. Tag> - An array of key-value pairs to apply to this resource.
- Master
Database 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.
- Master
Username string - The name for the master user.
- Relational
Database stringBlueprint Id - The blueprint ID for your new database. A blueprint describes the major engine version of a database.
- Relational
Database stringBundle Id - The bundle ID for your new database. A bundle describes the performance specifications for your database.
- Relational
Database stringName - The name to use for your new Lightsail database resource.
- Availability
Zone string - 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 stringIdentifier - Indicates the certificate that needs to be associated with the database.
- Master
User stringPassword - The password for the master user. The password can include any printable ASCII character except "/", """, or "@". It cannot contain spaces.
- Preferred
Backup stringWindow - The daily time range during which automated backups are created for your new database if automated backups are enabled.
- Preferred
Maintenance stringWindow - 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 []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.
- Tag
Args - An array of key-value pairs to apply to this resource.
- master
Database 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.
- master
Username String - The name for the master user.
- relational
Database StringBlueprint Id - The blueprint ID for your new database. A blueprint describes the major engine version of a database.
- relational
Database StringBundle Id - The bundle ID for your new database. A bundle describes the performance specifications for your database.
- relational
Database StringName - The name to use for your new Lightsail database resource.
- availability
Zone String - The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
- backup
Retention 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.
- ca
Certificate StringIdentifier - Indicates the certificate that needs to be associated with the database.
- master
User StringPassword - The password for the master user. The password can include any printable ASCII character except "/", """, or "@". It cannot contain spaces.
- preferred
Backup StringWindow - The daily time range during which automated backups are created for your new database if automated backups are enabled.
- preferred
Maintenance StringWindow - The weekly time range during which system maintenance can occur on your new database.
- 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.
- relational
Database List<DatabaseParameters Relational Database Parameter> - Update one or more parameters of the relational database.
- rotate
Master 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.
- master
Database 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.
- master
Username string - The name for the master user.
- relational
Database stringBlueprint Id - The blueprint ID for your new database. A blueprint describes the major engine version of a database.
- relational
Database stringBundle Id - The bundle ID for your new database. A bundle describes the performance specifications for your database.
- relational
Database stringName - The name to use for your new Lightsail database resource.
- availability
Zone string - The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
- backup
Retention 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.
- ca
Certificate stringIdentifier - Indicates the certificate that needs to be associated with the database.
- master
User stringPassword - The password for the master user. The password can include any printable ASCII character except "/", """, or "@". It cannot contain spaces.
- preferred
Backup stringWindow - The daily time range during which automated backups are created for your new database if automated backups are enabled.
- preferred
Maintenance stringWindow - The weekly time range during which system maintenance can occur on your new database.
- 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.
- relational
Database DatabaseParameters Relational Database Parameter[] - Update one or more parameters of the relational database.
- rotate
Master 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[Tag
Args] - An array of key-value pairs to apply to this resource.
- master
Database 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.
- master
Username String - The name for the master user.
- relational
Database StringBlueprint Id - The blueprint ID for your new database. A blueprint describes the major engine version of a database.
- relational
Database StringBundle Id - The bundle ID for your new database. A bundle describes the performance specifications for your database.
- relational
Database StringName - The name to use for your new Lightsail database resource.
- availability
Zone String - The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
- backup
Retention 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.
- ca
Certificate StringIdentifier - Indicates the certificate that needs to be associated with the database.
- master
User StringPassword - The password for the master user. The password can include any printable ASCII character except "/", """, or "@". It cannot contain spaces.
- preferred
Backup StringWindow - The daily time range during which automated backups are created for your new database if automated backups are enabled.
- preferred
Maintenance StringWindow - The weekly time range during which system maintenance can occur on your new database.
- 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.
- relational
Database List<Property Map>Parameters - Update one or more parameters of the relational database.
- rotate
Master 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:
- Database
Arn 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 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 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 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.
- database
Arn 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
- Allowed
Values string - Specifies the valid range of values for the parameter.
- Apply
Method string - Indicates when parameter updates are applied. Can be immediate or pending-reboot.
- Apply
Type string - Specifies the engine-specific parameter type.
- Data
Type string - Specifies the valid data type for the parameter.
- Description string
- Provides a description of the parameter.
- Is
Modifiable bool - A Boolean value indicating whether the parameter can be modified.
- Parameter
Name string - Specifies the name of the parameter.
- Parameter
Value string - Specifies the value of the parameter.
- Allowed
Values string - Specifies the valid range of values for the parameter.
- Apply
Method string - Indicates when parameter updates are applied. Can be immediate or pending-reboot.
- Apply
Type string - Specifies the engine-specific parameter type.
- Data
Type string - Specifies the valid data type for the parameter.
- Description string
- Provides a description of the parameter.
- Is
Modifiable bool - A Boolean value indicating whether the parameter can be modified.
- Parameter
Name string - Specifies the name of the parameter.
- Parameter
Value string - Specifies the value of the parameter.
- allowed
Values String - Specifies the valid range of values for the parameter.
- apply
Method String - Indicates when parameter updates are applied. Can be immediate or pending-reboot.
- apply
Type String - Specifies the engine-specific parameter type.
- data
Type String - Specifies the valid data type for the parameter.
- description String
- Provides a description of the parameter.
- is
Modifiable Boolean - A Boolean value indicating whether the parameter can be modified.
- parameter
Name String - Specifies the name of the parameter.
- parameter
Value String - Specifies the value of the parameter.
- allowed
Values string - Specifies the valid range of values for the parameter.
- apply
Method string - Indicates when parameter updates are applied. Can be immediate or pending-reboot.
- apply
Type string - Specifies the engine-specific parameter type.
- data
Type string - Specifies the valid data type for the parameter.
- description string
- Provides a description of the parameter.
- is
Modifiable boolean - A Boolean value indicating whether the parameter can be modified.
- parameter
Name string - Specifies the name of the parameter.
- parameter
Value 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.
- allowed
Values String - Specifies the valid range of values for the parameter.
- apply
Method String - Indicates when parameter updates are applied. Can be immediate or pending-reboot.
- apply
Type String - Specifies the engine-specific parameter type.
- data
Type String - Specifies the valid data type for the parameter.
- description String
- Provides a description of the parameter.
- is
Modifiable Boolean - A Boolean value indicating whether the parameter can be modified.
- parameter
Name String - Specifies the name of the parameter.
- parameter
Value 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.
AWS Cloud Control v1.5.0 published on Friday, Nov 1, 2024 by Pulumi