Skip to content

/AWS1/IF_DZN=>GETNOTEBOOK()

About GetNotebook

Gets the details of a notebook in Amazon SageMaker Unified Studio.

Method Signature

METHODS /AWS1/IF_DZN~GETNOTEBOOK
  IMPORTING
    !IV_DOMAINIDENTIFIER TYPE /AWS1/DZNDOMAINID OPTIONAL
    !IV_IDENTIFIER TYPE /AWS1/DZNNOTEBOOKID OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_dzngetnotebookoutput
  RAISING
    /AWS1/CX_DZNACCESSDENIEDEX
    /AWS1/CX_DZNTHROTTLINGEX
    /AWS1/CX_DZNUNAUTHORIZEDEX
    /AWS1/CX_DZNINTERNALSERVEREX
    /AWS1/CX_DZNRESOURCENOTFOUNDEX
    /AWS1/CX_DZNVALIDATIONEX
    /AWS1/CX_DZNCLIENTEXC
    /AWS1/CX_DZNSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_domainidentifier TYPE /AWS1/DZNDOMAINID /AWS1/DZNDOMAINID

The identifier of the Amazon SageMaker Unified Studio domain in which the notebook exists.

iv_identifier TYPE /AWS1/DZNNOTEBOOKID /AWS1/DZNNOTEBOOKID

The identifier of the notebook.

RETURNING

oo_output TYPE REF TO /aws1/cl_dzngetnotebookoutput /AWS1/CL_DZNGETNOTEBOOKOUTPUT

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->getnotebook(
  iv_domainidentifier = |string|
  iv_identifier = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_notebookid = lo_result->get_id( ).
  lv_notebookname = lo_result->get_name( ).
  lv_projectid = lo_result->get_owningprojectid( ).
  lv_domainid = lo_result->get_domainid( ).
  LOOP AT lo_result->get_cellorder( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
    ENDIF.
  ENDLOOP.
  lv_notebookstatus = lo_result->get_status( ).
  lv_description = lo_result->get_description( ).
  lv_createdat = lo_result->get_createdat( ).
  lv_createdby = lo_result->get_createdby( ).
  lv_updatedat = lo_result->get_updatedat( ).
  lv_updatedby = lo_result->get_updatedby( ).
  lv_string = lo_result->get_lockedby( ).
  lv_timestamp = lo_result->get_lockedat( ).
  lv_timestamp = lo_result->get_lockexpiresat( ).
  lv_computeid = lo_result->get_computeid( ).
  LOOP AT lo_result->get_metadata( ) into ls_row_2.
    lv_key = ls_row_2-key.
    lo_value = ls_row_2-value.
    IF lo_value IS NOT INITIAL.
      lv_metadatavalue = lo_value->get_value( ).
    ENDIF.
  ENDLOOP.
  LOOP AT lo_result->get_parameters( ) into ls_row_3.
    lv_key_1 = ls_row_3-key.
    lo_value_1 = ls_row_3-value.
    IF lo_value_1 IS NOT INITIAL.
      lv_parametervalue = lo_value_1->get_value( ).
    ENDIF.
  ENDLOOP.
  lo_environmentconfig = lo_result->get_environmentconfiguration( ).
  IF lo_environmentconfig IS NOT INITIAL.
    lv_string = lo_environmentconfig->get_imageversion( ).
    lo_packageconfig = lo_environmentconfig->get_packageconfig( ).
    IF lo_packageconfig IS NOT INITIAL.
      lv_packagemanager = lo_packageconfig->get_packagemanager( ).
      lv_string = lo_packageconfig->get_packagespecification( ).
    ENDIF.
  ENDIF.
  lo_notebookerror = lo_result->get_error( ).
  IF lo_notebookerror IS NOT INITIAL.
    lv_string = lo_notebookerror->get_message( ).
  ENDIF.
ENDIF.