/AWS1/IF_ATH=>STARTSESSION()¶
About StartSession¶
Creates a session for running calculations within a workgroup. The session is ready
when it reaches an IDLE state.
Method Signature¶
METHODS /AWS1/IF_ATH~STARTSESSION
IMPORTING
!IV_DESCRIPTION TYPE /AWS1/ATHDESCRIPTIONSTRING OPTIONAL
!IV_WORKGROUP TYPE /AWS1/ATHWORKGROUPNAME OPTIONAL
!IO_ENGINECONFIGURATION TYPE REF TO /AWS1/CL_ATHENGINECONF OPTIONAL
!IV_EXECUTIONROLE TYPE /AWS1/ATHROLEARN OPTIONAL
!IO_MONITORINGCONFIGURATION TYPE REF TO /AWS1/CL_ATHMONITORINGCONF OPTIONAL
!IV_NOTEBOOKVERSION TYPE /AWS1/ATHNAMESTRING OPTIONAL
!IV_SESSIDLETIMEOUTINMINUTES TYPE /AWS1/ATHSESSIDLETMOUTINMINS OPTIONAL
!IV_CLIENTREQUESTTOKEN TYPE /AWS1/ATHIDEMPOTENCYTOKEN OPTIONAL
!IT_TAGS TYPE /AWS1/CL_ATHTAG=>TT_TAGLIST OPTIONAL
!IV_COPYWORKGROUPTAGS TYPE /AWS1/ATHBOXEDBOOLEAN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_athstartsessionrsp
RAISING
/AWS1/CX_ATHINTERNALSERVEREX
/AWS1/CX_ATHINVALIDREQUESTEX
/AWS1/CX_ATHRESOURCENOTFOUNDEX
/AWS1/CX_ATHSESSALRDYEXISTSEX
/AWS1/CX_ATHTOOMANYREQUESTSEX
/AWS1/CX_ATHCLIENTEXC
/AWS1/CX_ATHSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_workgroup TYPE /AWS1/ATHWORKGROUPNAME /AWS1/ATHWORKGROUPNAME¶
The workgroup to which the session belongs.
io_engineconfiguration TYPE REF TO /AWS1/CL_ATHENGINECONF /AWS1/CL_ATHENGINECONF¶
Contains engine data processing unit (DPU) configuration settings and parameter mappings.
Optional arguments:¶
iv_description TYPE /AWS1/ATHDESCRIPTIONSTRING /AWS1/ATHDESCRIPTIONSTRING¶
The session description.
iv_executionrole TYPE /AWS1/ATHROLEARN /AWS1/ATHROLEARN¶
The ARN of the execution role used to access user resources for Spark sessions and Identity Center enabled workgroups. This property applies only to Spark enabled workgroups and Identity Center enabled workgroups.
io_monitoringconfiguration TYPE REF TO /AWS1/CL_ATHMONITORINGCONF /AWS1/CL_ATHMONITORINGCONF¶
Contains the configuration settings for managed log persistence, delivering logs to Amazon S3 buckets, Amazon CloudWatch log groups etc.
iv_notebookversion TYPE /AWS1/ATHNAMESTRING /AWS1/ATHNAMESTRING¶
The notebook version. This value is supplied automatically for notebook sessions in the Athena console and is not required for programmatic session access. The only valid notebook version is
Athena notebook version 1. If you specify a value forNotebookVersion, you must also specify a value forNotebookId. See EngineConfiguration$AdditionalConfigs.
iv_sessidletimeoutinminutes TYPE /AWS1/ATHSESSIDLETMOUTINMINS /AWS1/ATHSESSIDLETMOUTINMINS¶
The idle timeout in minutes for the session.
iv_clientrequesttoken TYPE /AWS1/ATHIDEMPOTENCYTOKEN /AWS1/ATHIDEMPOTENCYTOKEN¶
A unique case-sensitive string used to ensure the request to create the session is idempotent (executes only once). If another
StartSessionRequestis received, the same response is returned and another session is not created. If a parameter has changed, an error is returned.This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java) auto-generate the token for users. If you are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide this token or the action will fail.
it_tags TYPE /AWS1/CL_ATHTAG=>TT_TAGLIST TT_TAGLIST¶
A list of comma separated tags to add to the session that is created.
iv_copyworkgrouptags TYPE /AWS1/ATHBOXEDBOOLEAN /AWS1/ATHBOXEDBOOLEAN¶
Copies the tags from the Workgroup to the Session when.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_athstartsessionrsp /AWS1/CL_ATHSTARTSESSIONRSP¶
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->startsession(
io_engineconfiguration = new /aws1/cl_athengineconf(
it_additionalconfigs = VALUE /aws1/cl_athparametersmap_w=>tt_parametersmap(
(
VALUE /aws1/cl_athparametersmap_w=>ts_parametersmap_maprow(
value = new /aws1/cl_athparametersmap_w( |string| )
key = |string|
)
)
)
it_classifications = VALUE /aws1/cl_athclassification=>tt_classificationlist(
(
new /aws1/cl_athclassification(
it_properties = VALUE /aws1/cl_athparametersmap_w=>tt_parametersmap(
(
VALUE /aws1/cl_athparametersmap_w=>ts_parametersmap_maprow(
value = new /aws1/cl_athparametersmap_w( |string| )
key = |string|
)
)
)
iv_name = |string|
)
)
)
it_sparkproperties = VALUE /aws1/cl_athparametersmap_w=>tt_parametersmap(
(
VALUE /aws1/cl_athparametersmap_w=>ts_parametersmap_maprow(
value = new /aws1/cl_athparametersmap_w( |string| )
key = |string|
)
)
)
iv_coordinatordpusize = 123
iv_defaultexecutordpusize = 123
iv_maxconcurrentdpus = 123
)
io_monitoringconfiguration = new /aws1/cl_athmonitoringconf(
io_cloudwatchloggingconf = new /aws1/cl_athcloudwatchlogconf(
it_logtypes = VALUE /aws1/cl_athlogtypevalslist_w=>tt_logtypesmap(
(
VALUE /aws1/cl_athlogtypevalslist_w=>ts_logtypesmap_maprow(
key = |string|
value = VALUE /aws1/cl_athlogtypevalslist_w=>tt_logtypevalueslist(
( new /aws1/cl_athlogtypevalslist_w( |string| ) )
)
)
)
)
iv_enabled = ABAP_TRUE
iv_loggroup = |string|
iv_logstreamnameprefix = |string|
)
io_managedloggingconf = new /aws1/cl_athmanagedloggingconf(
iv_enabled = ABAP_TRUE
iv_kmskey = |string|
)
io_s3loggingconfiguration = new /aws1/cl_aths3loggingconf(
iv_enabled = ABAP_TRUE
iv_kmskey = |string|
iv_loglocation = |string|
)
)
it_tags = VALUE /aws1/cl_athtag=>tt_taglist(
(
new /aws1/cl_athtag(
iv_key = |string|
iv_value = |string|
)
)
)
iv_clientrequesttoken = |string|
iv_copyworkgrouptags = ABAP_TRUE
iv_description = |string|
iv_executionrole = |string|
iv_notebookversion = |string|
iv_sessidletimeoutinminutes = 123
iv_workgroup = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_sessionid = lo_result->get_sessionid( ).
lv_sessionstate = lo_result->get_state( ).
ENDIF.