/AWS1/IF_RDS=>SWITCHOVERBLUEGREENDEPLOYM00()¶
About SwitchoverBlueGreenDeployment¶
Switches over a blue/green deployment.
Before you switch over, production traffic is routed to the databases in the blue environment. After you switch over, production traffic is routed to the databases in the green environment.
For more information, see Using Amazon RDS Blue/Green Deployments for database updates in the Amazon RDS User Guide and Using Amazon RDS Blue/Green Deployments for database updates in the Amazon Aurora User Guide.
Method Signature¶
METHODS /AWS1/IF_RDS~SWITCHOVERBLUEGREENDEPLOYM00
IMPORTING
!IV_BLUEGREENDEPLOYMENTID TYPE /AWS1/RDSBLUEGREENDEPLOYMENTID OPTIONAL
!IV_SWITCHOVERTIMEOUT TYPE /AWS1/RDSSWITCHOVERTIMEOUT OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_rdsswitchoverbluegr01
RAISING
/AWS1/CX_RDSBLUEGREENDEPLOYM00
/AWS1/CX_RDSINVBLUEGREENDEPL00
/AWS1/CX_RDSCLIENTEXC
/AWS1/CX_RDSSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_bluegreendeploymentid TYPE /AWS1/RDSBLUEGREENDEPLOYMENTID /AWS1/RDSBLUEGREENDEPLOYMENTID¶
The resource ID of the blue/green deployment.
Constraints:
Must match an existing blue/green deployment resource ID.
Optional arguments:¶
iv_switchovertimeout TYPE /AWS1/RDSSWITCHOVERTIMEOUT /AWS1/RDSSWITCHOVERTIMEOUT¶
The amount of time, in seconds, for the switchover to complete.
Default: 300
If the switchover takes longer than the specified duration, then any changes are rolled back, and no changes are made to the environments.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_rdsswitchoverbluegr01 /AWS1/CL_RDSSWITCHOVERBLUEGR01¶
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->switchoverbluegreendeploym00(
iv_bluegreendeploymentid = |string|
iv_switchovertimeout = 123
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_bluegreendeployment = lo_result->get_bluegreendeployment( ).
IF lo_bluegreendeployment IS NOT INITIAL.
lv_bluegreendeploymentiden = lo_bluegreendeployment->get_bluegreendeploymentid( ).
lv_bluegreendeploymentname = lo_bluegreendeployment->get_bluegreendeploymentname( ).
lv_databasearn = lo_bluegreendeployment->get_source( ).
lv_databasearn = lo_bluegreendeployment->get_target( ).
LOOP AT lo_bluegreendeployment->get_switchoverdetails( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_databasearn = lo_row_1->get_sourcemember( ).
lv_databasearn = lo_row_1->get_targetmember( ).
lv_switchoverdetailstatus = lo_row_1->get_status( ).
ENDIF.
ENDLOOP.
LOOP AT lo_bluegreendeployment->get_tasks( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_bluegreendeploymenttask = lo_row_3->get_name( ).
lv_bluegreendeploymenttask_1 = lo_row_3->get_status( ).
ENDIF.
ENDLOOP.
lv_bluegreendeploymentstat = lo_bluegreendeployment->get_status( ).
lv_bluegreendeploymentstat_1 = lo_bluegreendeployment->get_statusdetails( ).
lv_tstamp = lo_bluegreendeployment->get_createtime( ).
lv_tstamp = lo_bluegreendeployment->get_deletetime( ).
LOOP AT lo_bluegreendeployment->get_taglist( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_string = lo_row_5->get_key( ).
lv_string = lo_row_5->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.