update_relational_database
¶
update_relational_database(
relational_database_name: ResourceName,
*,
config_overrides: Optional[LightsailClientConfig] = None,
master_user_password: Optional[SensitiveString] = None,
rotate_master_user_password: Optional[boolean] = None,
preferred_backup_window: Optional[string] = None,
preferred_maintenance_window: Optional[string] = None,
enable_backup_retention: Optional[boolean] = None,
disable_backup_retention: Optional[boolean] = None,
publicly_accessible: Optional[boolean] = None,
apply_immediately: Optional[boolean] = None,
ca_certificate_identifier: Optional[string] = None,
relational_database_blueprint_id: Optional[string] = None,
) -> UpdateRelationalDatabaseResult
Allows the update of one or more attributes of a database in Amazon Lightsail.
Updates are applied immediately, or in cases where the updates could result in an outage, are applied during the database's predefined maintenance window.
The update relational database operation supports tag-based access control via resource tags applied to the resource identified by relationalDatabaseName. For more information, see the Amazon Lightsail Developer Guide.
Parameters:
-
relational_database_name(ResourceName) –The name of your Lightsail database resource to update.
-
master_user_password(Optional[SensitiveString], default:None) –The password for the master user. The password can include any printable ASCII character except "/", """, or "@".
MySQL
Constraints: Must contain from 8 to 41 characters.
PostgreSQL
Constraints: Must contain from 8 to 128 characters.
-
rotate_master_user_password(Optional[boolean], default:None) –When
true, the master user password is changed to a new strong password generated by Lightsail.Use the
get relational database master user passwordoperation to get the new password. -
preferred_backup_window(Optional[string], default:None) –The daily time range during which automated backups are created for your database if automated backups are enabled.
Constraints:
-
Must be in the
hh24:mi-hh24:miformat.Example:
16:00-16:30 -
Specified in Coordinated Universal Time (UTC).
-
Must not conflict with the preferred maintenance window.
-
Must be at least 30 minutes.
-
-
preferred_maintenance_window(Optional[string], default:None) –The weekly time range during which system maintenance can occur on your database.
The default is a 30-minute window selected at random from an 8-hour block of time for each Amazon Web Services Region, occurring on a random day of the week.
Constraints:
-
Must be in the
ddd:hh24:mi-ddd:hh24:miformat. -
Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun.
-
Must be at least 30 minutes.
-
Specified in Coordinated Universal Time (UTC).
-
Example:
Tue:17:00-Tue:17:30
-
-
enable_backup_retention(Optional[boolean], default:None) –When
true, enables automated backup retention for your database.Updates are applied during the next maintenance window because this can result in an outage.
-
disable_backup_retention(Optional[boolean], default:None) –When
true, 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 using the
create relational database snapshotoperation.Updates are applied during the next maintenance window because this can result in an outage.
-
publicly_accessible(Optional[boolean], default:None) –Specifies the accessibility options for your database. A value of
truespecifies a database that is available to resources outside of your Lightsail account. A value offalsespecifies a database that is available only to your Lightsail resources in the same region as your database. -
apply_immediately(Optional[boolean], default:None) –When
true, applies changes immediately. Whenfalse, applies changes during the preferred maintenance window. Some changes may cause an outage.Default:
false -
ca_certificate_identifier(Optional[string], default:None) –Indicates the certificate that needs to be associated with the database.
-
relational_database_blueprint_id(Optional[string], default:None) –This parameter is used to update the major version of the database. Enter the
blueprintIdfor the major version that you want to update to.Use the GetRelationalDatabaseBlueprints action to get a list of available blueprint IDs.
Raises:
-
AccessDeniedException–Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to access a resource.
-
AccountSetupInProgressException–Lightsail throws this exception when an account is still in the setup in progress state.
-
InvalidInputException–Lightsail throws this exception when user input does not conform to the validation rules of an input field.
Domain and distribution APIs are only available in the N. Virginia (
us-east-1) Amazon Web Services Region. Please set your Amazon Web Services Region configuration tous-east-1to create, view, or edit these resources. -
NotFoundException–Lightsail throws this exception when it cannot find a resource.
-
OperationFailureException–Lightsail throws this exception when an operation fails to execute.
-
RegionSetupInProgressException–Lightsail throws this exception when an operation is performed on resources in an opt-in Region that is currently being set up.
-
ServiceException–A general service exception.
-
UnauthenticatedException–Lightsail throws this exception when the user has not been authenticated.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_lightsail/_services/lightsail.py
9869 9870 9871 9872 9873 9874 9875 9876 9877 9878 9879 9880 9881 9882 9883 9884 9885 9886 9887 9888 9889 9890 9891 9892 9893 9894 9895 9896 9897 9898 9899 9900 9901 9902 9903 9904 9905 9906 9907 9908 9909 9910 9911 9912 9913 9914 9915 9916 9917 9918 9919 9920 9921 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9954 9955 9956 9957 9958 9959 9960 9961 9962 9963 9964 9965 9966 9967 9968 9969 9970 9971 9972 9973 9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 | |