/AWS1/IF_LSA=>UPDATERELATIONALDATABASE()¶
About UpdateRelationalDatabase¶
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.
Method Signature¶
METHODS /AWS1/IF_LSA~UPDATERELATIONALDATABASE
IMPORTING
!IV_RELATIONALDATABASENAME TYPE /AWS1/LSARESOURCENAME OPTIONAL
!IV_MASTERUSERPASSWORD TYPE /AWS1/LSASENSITIVESTRING OPTIONAL
!IV_ROTATEMASTERUSERPASSWORD TYPE /AWS1/LSABOOLEAN OPTIONAL
!IV_PREFERREDBACKUPWINDOW TYPE /AWS1/LSASTRING OPTIONAL
!IV_PREFERREDMAINTENANCEWIN00 TYPE /AWS1/LSASTRING OPTIONAL
!IV_ENABLEBACKUPRETENTION TYPE /AWS1/LSABOOLEAN OPTIONAL
!IV_DISABLEBACKUPRETENTION TYPE /AWS1/LSABOOLEAN OPTIONAL
!IV_PUBLICLYACCESSIBLE TYPE /AWS1/LSABOOLEAN OPTIONAL
!IV_APPLYIMMEDIATELY TYPE /AWS1/LSABOOLEAN OPTIONAL
!IV_CACERTIFICATEIDENTIFIER TYPE /AWS1/LSASTRING OPTIONAL
!IV_RELATIONALDATABASEBLUEP00 TYPE /AWS1/LSASTRING OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_lsauprelationaldata01
RAISING
/AWS1/CX_LSAACCESSDENIEDEX
/AWS1/CX_LSAACCTSETUPINPRGSSEX
/AWS1/CX_LSAINVALIDINPUTEX
/AWS1/CX_LSANOTFOUNDEXCEPTION
/AWS1/CX_LSAOPERATIONFAILUREEX
/AWS1/CX_LSARGNSETUPINPRGSSEX
/AWS1/CX_LSASERVICEEXCEPTION
/AWS1/CX_LSAUNAUTHNTCTDEX
/AWS1/CX_LSACLIENTEXC
/AWS1/CX_LSASERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_relationaldatabasename TYPE /AWS1/LSARESOURCENAME /AWS1/LSARESOURCENAME¶
The name of your Lightsail database resource to update.
Optional arguments:¶
iv_masteruserpassword TYPE /AWS1/LSASENSITIVESTRING /AWS1/LSASENSITIVESTRING¶
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.
iv_rotatemasteruserpassword TYPE /AWS1/LSABOOLEAN /AWS1/LSABOOLEAN¶
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.
iv_preferredbackupwindow TYPE /AWS1/LSASTRING /AWS1/LSASTRING¶
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:30Specified in Coordinated Universal Time (UTC).
Must not conflict with the preferred maintenance window.
Must be at least 30 minutes.
iv_preferredmaintenancewin00 TYPE /AWS1/LSASTRING /AWS1/LSASTRING¶
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
iv_enablebackupretention TYPE /AWS1/LSABOOLEAN /AWS1/LSABOOLEAN¶
When
true, enables automated backup retention for your database.Updates are applied during the next maintenance window because this can result in an outage.
iv_disablebackupretention TYPE /AWS1/LSABOOLEAN /AWS1/LSABOOLEAN¶
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.
iv_publiclyaccessible TYPE /AWS1/LSABOOLEAN /AWS1/LSABOOLEAN¶
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.
iv_applyimmediately TYPE /AWS1/LSABOOLEAN /AWS1/LSABOOLEAN¶
When
true, applies changes immediately. Whenfalse, applies changes during the preferred maintenance window. Some changes may cause an outage.Default:
false
iv_cacertificateidentifier TYPE /AWS1/LSASTRING /AWS1/LSASTRING¶
Indicates the certificate that needs to be associated with the database.
iv_relationaldatabasebluep00 TYPE /AWS1/LSASTRING /AWS1/LSASTRING¶
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.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_lsauprelationaldata01 /AWS1/CL_LSAUPRELATIONALDATA01¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->updaterelationaldatabase(
iv_applyimmediately = ABAP_TRUE
iv_cacertificateidentifier = |string|
iv_disablebackupretention = ABAP_TRUE
iv_enablebackupretention = ABAP_TRUE
iv_masteruserpassword = |string|
iv_preferredbackupwindow = |string|
iv_preferredmaintenancewin00 = |string|
iv_publiclyaccessible = ABAP_TRUE
iv_relationaldatabasebluep00 = |string|
iv_relationaldatabasename = |string|
iv_rotatemasteruserpassword = ABAP_TRUE
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
LOOP AT lo_result->get_operations( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_nonemptystring = lo_row_1->get_id( ).
lv_resourcename = lo_row_1->get_resourcename( ).
lv_resourcetype = lo_row_1->get_resourcetype( ).
lv_isodate = lo_row_1->get_createdat( ).
lo_resourcelocation = lo_row_1->get_location( ).
IF lo_resourcelocation IS NOT INITIAL.
lv_string = lo_resourcelocation->get_availabilityzone( ).
lv_regionname = lo_resourcelocation->get_regionname( ).
ENDIF.
lv_boolean = lo_row_1->get_isterminal( ).
lv_string = lo_row_1->get_operationdetails( ).
lv_operationtype = lo_row_1->get_operationtype( ).
lv_operationstatus = lo_row_1->get_status( ).
lv_isodate = lo_row_1->get_statuschangedat( ).
lv_string = lo_row_1->get_errorcode( ).
lv_string = lo_row_1->get_errordetails( ).
ENDIF.
ENDLOOP.
ENDIF.