/AWS1/IF_TRL=>CREATEDASHBOARD()¶
About CreateDashboard¶
Creates a custom dashboard or the Highlights dashboard.
-
Custom dashboards - Custom dashboards allow you to query events in any event data store type. You can add up to 10 widgets to a custom dashboard. You can manually refresh a custom dashboard, or you can set a refresh schedule.
-
Highlights dashboard - You can create the Highlights dashboard to see a summary of key user activities and API usage across all your event data stores. CloudTrail Lake manages the Highlights dashboard and refreshes the dashboard every 6 hours. To create the Highlights dashboard, you must set and enable a refresh schedule.
CloudTrail runs queries to populate the dashboard's widgets during a manual or scheduled refresh. CloudTrail must be granted permissions to run the StartQuery operation on your behalf. To provide permissions, run the PutResourcePolicy operation to attach a resource-based policy to each event data store. For more information,
see Example: Allow CloudTrail to run queries to populate a dashboard in the CloudTrail User Guide.
To set a refresh schedule, CloudTrail must be granted permissions to run the StartDashboardRefresh operation to refresh the dashboard on your behalf. To provide permissions, run the PutResourcePolicy operation to attach a resource-based policy to the dashboard. For more information,
see
Resource-based policy example for a dashboard in the CloudTrail User Guide.
For more information about dashboards, see CloudTrail Lake dashboards in the CloudTrail User Guide.
Method Signature¶
METHODS /AWS1/IF_TRL~CREATEDASHBOARD
IMPORTING
!IV_NAME TYPE /AWS1/TRLDASHBOARDNAME OPTIONAL
!IO_REFRESHSCHEDULE TYPE REF TO /AWS1/CL_TRLREFRESHSCHEDULE OPTIONAL
!IT_TAGSLIST TYPE /AWS1/CL_TRLTAG=>TT_TAGSLIST OPTIONAL
!IV_TERMINATIONPROTECTIONENBD TYPE /AWS1/TRLTERMINATIONPROTECTI00 OPTIONAL
!IT_WIDGETS TYPE /AWS1/CL_TRLREQUESTWIDGET=>TT_REQUESTWIDGETLIST OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_trlcreatedashboardrsp
RAISING
/AWS1/CX_TRLCONFLICTEXCEPTION
/AWS1/CX_TRLEVTDATASTORENOTF00
/AWS1/CX_TRLINACTEVTDATASTOR00
/AWS1/CX_TRLINSUFFICIENTENCP00
/AWS1/CX_TRLINVALIDQUERYSTMTEX
/AWS1/CX_TRLINVALIDTAGPARAMEX
/AWS1/CX_TRLSERVICEQUOTAEXCDEX
/AWS1/CX_TRLUNSUPPORTEDOPEX
/AWS1/CX_TRLCLIENTEXC
/AWS1/CX_TRLSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_name TYPE /AWS1/TRLDASHBOARDNAME /AWS1/TRLDASHBOARDNAME¶
The name of the dashboard. The name must be unique to your account.
To create the Highlights dashboard, the name must be
AWSCloudTrail-Highlights.
Optional arguments:¶
io_refreshschedule TYPE REF TO /AWS1/CL_TRLREFRESHSCHEDULE /AWS1/CL_TRLREFRESHSCHEDULE¶
The refresh schedule configuration for the dashboard.
To create the Highlights dashboard, you must set a refresh schedule and set the
StatustoENABLED. TheUnitfor the refresh schedule must beHOURSand theValuemust be6.
it_tagslist TYPE /AWS1/CL_TRLTAG=>TT_TAGSLIST TT_TAGSLIST¶
TagsList
iv_terminationprotectionenbd TYPE /AWS1/TRLTERMINATIONPROTECTI00 /AWS1/TRLTERMINATIONPROTECTI00¶
Specifies whether termination protection is enabled for the dashboard. If termination protection is enabled, you cannot delete the dashboard until termination protection is disabled.
it_widgets TYPE /AWS1/CL_TRLREQUESTWIDGET=>TT_REQUESTWIDGETLIST TT_REQUESTWIDGETLIST¶
An array of widgets for a custom dashboard. A custom dashboard can have a maximum of ten widgets.
You do not need to specify widgets for the Highlights dashboard.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_trlcreatedashboardrsp /AWS1/CL_TRLCREATEDASHBOARDRSP¶
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->createdashboard(
io_refreshschedule = new /aws1/cl_trlrefreshschedule(
io_frequency = new /aws1/cl_trlrefreshschfreque00(
iv_unit = |string|
iv_value = 123
)
iv_status = |string|
iv_timeofday = |string|
)
it_tagslist = VALUE /aws1/cl_trltag=>tt_tagslist(
(
new /aws1/cl_trltag(
iv_key = |string|
iv_value = |string|
)
)
)
it_widgets = VALUE /aws1/cl_trlrequestwidget=>tt_requestwidgetlist(
(
new /aws1/cl_trlrequestwidget(
it_queryparameters = VALUE /aws1/cl_trlqueryparameters_w=>tt_queryparameters(
( new /aws1/cl_trlqueryparameters_w( |string| ) )
)
it_viewproperties = VALUE /aws1/cl_trlviewprpsmap_w=>tt_viewpropertiesmap(
(
VALUE /aws1/cl_trlviewprpsmap_w=>ts_viewpropertiesmap_maprow(
value = new /aws1/cl_trlviewprpsmap_w( |string| )
key = |string|
)
)
)
iv_querystatement = |string|
)
)
)
iv_name = |string|
iv_terminationprotectionenbd = ABAP_TRUE
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_dashboardarn = lo_result->get_dashboardarn( ).
lv_dashboardname = lo_result->get_name( ).
lv_dashboardtype = lo_result->get_type( ).
LOOP AT lo_result->get_widgets( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_queryalias = lo_row_1->get_queryalias( ).
lv_querystatement = lo_row_1->get_querystatement( ).
LOOP AT lo_row_1->get_queryparameters( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_queryparameter = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_row_1->get_viewproperties( ) into ls_row_4.
lv_key = ls_row_4-key.
lo_value = ls_row_4-value.
IF lo_value IS NOT INITIAL.
lv_viewpropertiesvalue = lo_value->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
LOOP AT lo_result->get_tagslist( ) into lo_row_5.
lo_row_6 = lo_row_5.
IF lo_row_6 IS NOT INITIAL.
lv_tagkey = lo_row_6->get_key( ).
lv_tagvalue = lo_row_6->get_value( ).
ENDIF.
ENDLOOP.
lo_refreshschedule = lo_result->get_refreshschedule( ).
IF lo_refreshschedule IS NOT INITIAL.
lo_refreshschedulefrequenc = lo_refreshschedule->get_frequency( ).
IF lo_refreshschedulefrequenc IS NOT INITIAL.
lv_refreshschedulefrequenc_1 = lo_refreshschedulefrequenc->get_unit( ).
lv_refreshschedulefrequenc_2 = lo_refreshschedulefrequenc->get_value( ).
ENDIF.
lv_refreshschedulestatus = lo_refreshschedule->get_status( ).
lv_timeofday = lo_refreshschedule->get_timeofday( ).
ENDIF.
lv_terminationprotectionen = lo_result->get_terminationprotectione00( ).
ENDIF.