Skip to content

/AWS1/IF_SGM=>DESCRIBECLUSTER()

About DescribeCluster

Retrieves information of a SageMaker HyperPod cluster.

Method Signature

METHODS /AWS1/IF_SGM~DESCRIBECLUSTER
  IMPORTING
    !IV_CLUSTERNAME TYPE /AWS1/SGMCLUSTERNAMEORARN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_sgmdescrclusterrsp
  RAISING
    /AWS1/CX_SGMRESOURCENOTFOUND
    /AWS1/CX_SGMCLIENTEXC
    /AWS1/CX_SGMSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_clustername TYPE /AWS1/SGMCLUSTERNAMEORARN /AWS1/SGMCLUSTERNAMEORARN

The string name or the Amazon Resource Name (ARN) of the SageMaker HyperPod cluster.

RETURNING

oo_output TYPE REF TO /aws1/cl_sgmdescrclusterrsp /AWS1/CL_SGMDESCRCLUSTERRSP

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->describecluster( |string| ).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_clusterarn = lo_result->get_clusterarn( ).
  lv_clustername = lo_result->get_clustername( ).
  lv_clusterstatus = lo_result->get_clusterstatus( ).
  lv_timestamp = lo_result->get_creationtime( ).
  lv_string = lo_result->get_failuremessage( ).
  LOOP AT lo_result->get_instancegroups( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_clusternonnegativeinsta = lo_row_1->get_currentcount( ).
      lv_clusterinstancecount = lo_row_1->get_targetcount( ).
      lv_clusterinstancecount = lo_row_1->get_mincount( ).
      lv_clusterinstancegroupnam = lo_row_1->get_instancegroupname( ).
      lv_clusterinstancetype = lo_row_1->get_instancetype( ).
      lo_clusterinstancerequirem = lo_row_1->get_instancerequirements( ).
      IF lo_clusterinstancerequirem IS NOT INITIAL.
        LOOP AT lo_clusterinstancerequirem->get_currentinstancetypes( ) into lo_row_2.
          lo_row_3 = lo_row_2.
          IF lo_row_3 IS NOT INITIAL.
            lv_clusterinstancetype = lo_row_3->get_value( ).
          ENDIF.
        ENDLOOP.
        LOOP AT lo_clusterinstancerequirem->get_desiredinstancetypes( ) into lo_row_2.
          lo_row_3 = lo_row_2.
          IF lo_row_3 IS NOT INITIAL.
            lv_clusterinstancetype = lo_row_3->get_value( ).
          ENDIF.
        ENDLOOP.
      ENDIF.
      LOOP AT lo_row_1->get_instancetypedetails( ) into lo_row_4.
        lo_row_5 = lo_row_4.
        IF lo_row_5 IS NOT INITIAL.
          lv_clusterinstancetype = lo_row_5->get_instancetype( ).
          lv_clusternonnegativeinsta = lo_row_5->get_currentcount( ).
          lv_clusterthreadspercore = lo_row_5->get_threadspercore( ).
        ENDIF.
      ENDLOOP.
      lo_clusterlifecycleconfig = lo_row_1->get_lifecycleconfig( ).
      IF lo_clusterlifecycleconfig IS NOT INITIAL.
        lv_s3uri = lo_clusterlifecycleconfig->get_sources3uri( ).
        lv_clusterlifecycleconfigf = lo_clusterlifecycleconfig->get_oncreate( ).
        lv_clusterlifecycleconfigf = lo_clusterlifecycleconfig->get_oninitcomplete( ).
      ENDIF.
      lv_rolearn = lo_row_1->get_executionrole( ).
      lv_clusterthreadspercore = lo_row_1->get_threadspercore( ).
      LOOP AT lo_row_1->get_instancestorageconfigs( ) into lo_row_6.
        lo_row_7 = lo_row_6.
        IF lo_row_7 IS NOT INITIAL.
          lo_clusterebsvolumeconfig = lo_row_7->get_ebsvolumeconfig( ).
          IF lo_clusterebsvolumeconfig IS NOT INITIAL.
            lv_clusterebsvolumesizeing = lo_clusterebsvolumeconfig->get_volumesizeingb( ).
            lv_kmskeyid = lo_clusterebsvolumeconfig->get_volumekmskeyid( ).
            lv_boolean = lo_clusterebsvolumeconfig->get_rootvolume( ).
          ENDIF.
          lo_clusterfsxlustreconfig = lo_row_7->get_fsxlustreconfig( ).
          IF lo_clusterfsxlustreconfig IS NOT INITIAL.
            lv_clusterdnsname = lo_clusterfsxlustreconfig->get_dnsname( ).
            lv_clustermountname = lo_clusterfsxlustreconfig->get_mountname( ).
            lv_clusterfsxmountpath = lo_clusterfsxlustreconfig->get_mountpath( ).
          ENDIF.
          lo_clusterfsxopenzfsconfig = lo_row_7->get_fsxopenzfsconfig( ).
          IF lo_clusterfsxopenzfsconfig IS NOT INITIAL.
            lv_clusterdnsname = lo_clusterfsxopenzfsconfig->get_dnsname( ).
            lv_clusterfsxmountpath = lo_clusterfsxopenzfsconfig->get_mountpath( ).
          ENDIF.
        ENDIF.
      ENDLOOP.
      LOOP AT lo_row_1->get_onstartdeephealthchecks( ) into lo_row_8.
        lo_row_9 = lo_row_8.
        IF lo_row_9 IS NOT INITIAL.
          lv_deephealthchecktype = lo_row_9->get_value( ).
        ENDIF.
      ENDLOOP.
      lv_instancegroupstatus = lo_row_1->get_status( ).
      lv_trainingplanarn = lo_row_1->get_trainingplanarn( ).
      lv_instancegrouptrainingpl = lo_row_1->get_trainingplanstatus( ).
      lo_vpcconfig = lo_row_1->get_overridevpcconfig( ).
      IF lo_vpcconfig IS NOT INITIAL.
        LOOP AT lo_vpcconfig->get_securitygroupids( ) into lo_row_10.
          lo_row_11 = lo_row_10.
          IF lo_row_11 IS NOT INITIAL.
            lv_securitygroupid = lo_row_11->get_value( ).
          ENDIF.
        ENDLOOP.
        LOOP AT lo_vpcconfig->get_subnets( ) into lo_row_12.
          lo_row_13 = lo_row_12.
          IF lo_row_13 IS NOT INITIAL.
            lv_subnetid = lo_row_13->get_value( ).
          ENDIF.
        ENDLOOP.
      ENDIF.
      lo_scheduledupdateconfig = lo_row_1->get_scheduledupdateconfig( ).
      IF lo_scheduledupdateconfig IS NOT INITIAL.
        lv_cronscheduleexpression = lo_scheduledupdateconfig->get_scheduleexpression( ).
        lo_deploymentconfiguration = lo_scheduledupdateconfig->get_deploymentconfig( ).
        IF lo_deploymentconfiguration IS NOT INITIAL.
          lo_rollingdeploymentpolicy = lo_deploymentconfiguration->get_rollingupdatepolicy( ).
          IF lo_rollingdeploymentpolicy IS NOT INITIAL.
            lo_capacitysizeconfig = lo_rollingdeploymentpolicy->get_maximumbatchsize( ).
            IF lo_capacitysizeconfig IS NOT INITIAL.
              lv_nodeunavailabilitytype = lo_capacitysizeconfig->get_type( ).
              lv_nodeunavailabilityvalue = lo_capacitysizeconfig->get_value( ).
            ENDIF.
            lo_capacitysizeconfig = lo_rollingdeploymentpolicy->get_rollbackmaximumbatchsize( ).
            IF lo_capacitysizeconfig IS NOT INITIAL.
              lv_nodeunavailabilitytype = lo_capacitysizeconfig->get_type( ).
              lv_nodeunavailabilityvalue = lo_capacitysizeconfig->get_value( ).
            ENDIF.
          ENDIF.
          lv_waittimeintervalinsecon = lo_deploymentconfiguration->get_waitintervalinseconds( ).
          LOOP AT lo_deploymentconfiguration->get_autorollbackconf( ) into lo_row_14.
            lo_row_15 = lo_row_14.
            IF lo_row_15 IS NOT INITIAL.
              lv_alarmname = lo_row_15->get_alarmname( ).
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDIF.
      lv_imageid = lo_row_1->get_currentimageid( ).
      lv_imageid = lo_row_1->get_desiredimageid( ).
      LOOP AT lo_row_1->get_activeoperations( ) into ls_row_16.
        lv_key = ls_row_16-key.
        lo_value = ls_row_16-value.
        IF lo_value IS NOT INITIAL.
          lv_activeclusteroperationc = lo_value->get_value( ).
        ENDIF.
      ENDLOOP.
      lo_clusterkubernetesconfig = lo_row_1->get_kubernetesconfig( ).
      IF lo_clusterkubernetesconfig IS NOT INITIAL.
        LOOP AT lo_clusterkubernetesconfig->get_currentlabels( ) into ls_row_17.
          lv_key_1 = ls_row_17-key.
          lo_value_1 = ls_row_17-value.
          IF lo_value_1 IS NOT INITIAL.
            lv_clusterkuberneteslabelv = lo_value_1->get_value( ).
          ENDIF.
        ENDLOOP.
        LOOP AT lo_clusterkubernetesconfig->get_desiredlabels( ) into ls_row_17.
          lv_key_1 = ls_row_17-key.
          lo_value_1 = ls_row_17-value.
          IF lo_value_1 IS NOT INITIAL.
            lv_clusterkuberneteslabelv = lo_value_1->get_value( ).
          ENDIF.
        ENDLOOP.
        LOOP AT lo_clusterkubernetesconfig->get_currenttaints( ) into lo_row_18.
          lo_row_19 = lo_row_18.
          IF lo_row_19 IS NOT INITIAL.
            lv_clusterkubernetestaintk = lo_row_19->get_key( ).
            lv_clusterkubernetestaintv = lo_row_19->get_value( ).
            lv_clusterkubernetestainte = lo_row_19->get_effect( ).
          ENDIF.
        ENDLOOP.
        LOOP AT lo_clusterkubernetesconfig->get_desiredtaints( ) into lo_row_18.
          lo_row_19 = lo_row_18.
          IF lo_row_19 IS NOT INITIAL.
            lv_clusterkubernetestaintk = lo_row_19->get_key( ).
            lv_clusterkubernetestaintv = lo_row_19->get_value( ).
            lv_clusterkubernetestainte = lo_row_19->get_effect( ).
          ENDIF.
        ENDLOOP.
      ENDIF.
      lo_clustercapacityrequirem = lo_row_1->get_capacityrequirements( ).
      IF lo_clustercapacityrequirem IS NOT INITIAL.
        lo_clusterspotoptions = lo_clustercapacityrequirem->get_spot( ).
        IF lo_clusterspotoptions IS NOT INITIAL.
        ENDIF.
        lo_clusterondemandoptions = lo_clustercapacityrequirem->get_ondemand( ).
        IF lo_clusterondemandoptions IS NOT INITIAL.
        ENDIF.
      ENDIF.
      lv_clusterinstancecount = lo_row_1->get_targetstatecount( ).
      lv_softwareupdatestatus = lo_row_1->get_softwareupdatestatus( ).
      lo_deploymentconfiguration = lo_row_1->get_actsoftwareupdateconfig( ).
      IF lo_deploymentconfiguration IS NOT INITIAL.
        lo_rollingdeploymentpolicy = lo_deploymentconfiguration->get_rollingupdatepolicy( ).
        IF lo_rollingdeploymentpolicy IS NOT INITIAL.
          lo_capacitysizeconfig = lo_rollingdeploymentpolicy->get_maximumbatchsize( ).
          IF lo_capacitysizeconfig IS NOT INITIAL.
            lv_nodeunavailabilitytype = lo_capacitysizeconfig->get_type( ).
            lv_nodeunavailabilityvalue = lo_capacitysizeconfig->get_value( ).
          ENDIF.
          lo_capacitysizeconfig = lo_rollingdeploymentpolicy->get_rollbackmaximumbatchsize( ).
          IF lo_capacitysizeconfig IS NOT INITIAL.
            lv_nodeunavailabilitytype = lo_capacitysizeconfig->get_type( ).
            lv_nodeunavailabilityvalue = lo_capacitysizeconfig->get_value( ).
          ENDIF.
        ENDIF.
        lv_waittimeintervalinsecon = lo_deploymentconfiguration->get_waitintervalinseconds( ).
        LOOP AT lo_deploymentconfiguration->get_autorollbackconf( ) into lo_row_14.
          lo_row_15 = lo_row_14.
          IF lo_row_15 IS NOT INITIAL.
            lv_alarmname = lo_row_15->get_alarmname( ).
          ENDIF.
        ENDLOOP.
      ENDIF.
      lo_clusterslurmconfigdetai = lo_row_1->get_slurmconfig( ).
      IF lo_clusterslurmconfigdetai IS NOT INITIAL.
        lv_clusterslurmnodetype = lo_clusterslurmconfigdetai->get_nodetype( ).
        LOOP AT lo_clusterslurmconfigdetai->get_partitionnames( ) into lo_row_20.
          lo_row_21 = lo_row_20.
          IF lo_row_21 IS NOT INITIAL.
            lv_clusterpartitionname = lo_row_21->get_value( ).
          ENDIF.
        ENDLOOP.
      ENDIF.
      lo_clusternetworkinterface = lo_row_1->get_networkinterface( ).
      IF lo_clusternetworkinterface IS NOT INITIAL.
        lv_clusterinterfacetype = lo_clusternetworkinterface->get_interfacetype( ).
      ENDIF.
    ENDIF.
  ENDLOOP.
  LOOP AT lo_result->get_restrictedinstancegroups( ) into lo_row_22.
    lo_row_23 = lo_row_22.
    IF lo_row_23 IS NOT INITIAL.
      lv_clusternonnegativeinsta = lo_row_23->get_currentcount( ).
      lv_clusterinstancecount = lo_row_23->get_targetcount( ).
      lv_clusterinstancegroupnam = lo_row_23->get_instancegroupname( ).
      lv_clusterinstancetype = lo_row_23->get_instancetype( ).
      lv_rolearn = lo_row_23->get_executionrole( ).
      lv_clusterthreadspercore = lo_row_23->get_threadspercore( ).
      LOOP AT lo_row_23->get_instancestorageconfigs( ) into lo_row_6.
        lo_row_7 = lo_row_6.
        IF lo_row_7 IS NOT INITIAL.
          lo_clusterebsvolumeconfig = lo_row_7->get_ebsvolumeconfig( ).
          IF lo_clusterebsvolumeconfig IS NOT INITIAL.
            lv_clusterebsvolumesizeing = lo_clusterebsvolumeconfig->get_volumesizeingb( ).
            lv_kmskeyid = lo_clusterebsvolumeconfig->get_volumekmskeyid( ).
            lv_boolean = lo_clusterebsvolumeconfig->get_rootvolume( ).
          ENDIF.
          lo_clusterfsxlustreconfig = lo_row_7->get_fsxlustreconfig( ).
          IF lo_clusterfsxlustreconfig IS NOT INITIAL.
            lv_clusterdnsname = lo_clusterfsxlustreconfig->get_dnsname( ).
            lv_clustermountname = lo_clusterfsxlustreconfig->get_mountname( ).
            lv_clusterfsxmountpath = lo_clusterfsxlustreconfig->get_mountpath( ).
          ENDIF.
          lo_clusterfsxopenzfsconfig = lo_row_7->get_fsxopenzfsconfig( ).
          IF lo_clusterfsxopenzfsconfig IS NOT INITIAL.
            lv_clusterdnsname = lo_clusterfsxopenzfsconfig->get_dnsname( ).
            lv_clusterfsxmountpath = lo_clusterfsxopenzfsconfig->get_mountpath( ).
          ENDIF.
        ENDIF.
      ENDLOOP.
      LOOP AT lo_row_23->get_onstartdeephealthchecks( ) into lo_row_8.
        lo_row_9 = lo_row_8.
        IF lo_row_9 IS NOT INITIAL.
          lv_deephealthchecktype = lo_row_9->get_value( ).
        ENDIF.
      ENDLOOP.
      lv_instancegroupstatus = lo_row_23->get_status( ).
      lv_trainingplanarn = lo_row_23->get_trainingplanarn( ).
      lv_instancegrouptrainingpl = lo_row_23->get_trainingplanstatus( ).
      lo_vpcconfig = lo_row_23->get_overridevpcconfig( ).
      IF lo_vpcconfig IS NOT INITIAL.
        LOOP AT lo_vpcconfig->get_securitygroupids( ) into lo_row_10.
          lo_row_11 = lo_row_10.
          IF lo_row_11 IS NOT INITIAL.
            lv_securitygroupid = lo_row_11->get_value( ).
          ENDIF.
        ENDLOOP.
        LOOP AT lo_vpcconfig->get_subnets( ) into lo_row_12.
          lo_row_13 = lo_row_12.
          IF lo_row_13 IS NOT INITIAL.
            lv_subnetid = lo_row_13->get_value( ).
          ENDIF.
        ENDLOOP.
      ENDIF.
      lo_scheduledupdateconfig = lo_row_23->get_scheduledupdateconfig( ).
      IF lo_scheduledupdateconfig IS NOT INITIAL.
        lv_cronscheduleexpression = lo_scheduledupdateconfig->get_scheduleexpression( ).
        lo_deploymentconfiguration = lo_scheduledupdateconfig->get_deploymentconfig( ).
        IF lo_deploymentconfiguration IS NOT INITIAL.
          lo_rollingdeploymentpolicy = lo_deploymentconfiguration->get_rollingupdatepolicy( ).
          IF lo_rollingdeploymentpolicy IS NOT INITIAL.
            lo_capacitysizeconfig = lo_rollingdeploymentpolicy->get_maximumbatchsize( ).
            IF lo_capacitysizeconfig IS NOT INITIAL.
              lv_nodeunavailabilitytype = lo_capacitysizeconfig->get_type( ).
              lv_nodeunavailabilityvalue = lo_capacitysizeconfig->get_value( ).
            ENDIF.
            lo_capacitysizeconfig = lo_rollingdeploymentpolicy->get_rollbackmaximumbatchsize( ).
            IF lo_capacitysizeconfig IS NOT INITIAL.
              lv_nodeunavailabilitytype = lo_capacitysizeconfig->get_type( ).
              lv_nodeunavailabilityvalue = lo_capacitysizeconfig->get_value( ).
            ENDIF.
          ENDIF.
          lv_waittimeintervalinsecon = lo_deploymentconfiguration->get_waitintervalinseconds( ).
          LOOP AT lo_deploymentconfiguration->get_autorollbackconf( ) into lo_row_14.
            lo_row_15 = lo_row_14.
            IF lo_row_15 IS NOT INITIAL.
              lv_alarmname = lo_row_15->get_alarmname( ).
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDIF.
      lo_environmentconfigdetail = lo_row_23->get_environmentconfig( ).
      IF lo_environmentconfigdetail IS NOT INITIAL.
        lo_fsxlustreconfig = lo_environmentconfigdetail->get_fsxlustreconfig( ).
        IF lo_fsxlustreconfig IS NOT INITIAL.
          lv_fsxlustresizeingib = lo_fsxlustreconfig->get_sizeingib( ).
          lv_fsxlustreperunitstorage = lo_fsxlustreconfig->get_perunitstoragethroughput( ).
        ENDIF.
        lv_s3uri = lo_environmentconfigdetail->get_s3outputpath( ).
      ENDIF.
    ENDIF.
  ENDLOOP.
  lo_vpcconfig = lo_result->get_vpcconfig( ).
  IF lo_vpcconfig IS NOT INITIAL.
    LOOP AT lo_vpcconfig->get_securitygroupids( ) into lo_row_10.
      lo_row_11 = lo_row_10.
      IF lo_row_11 IS NOT INITIAL.
        lv_securitygroupid = lo_row_11->get_value( ).
      ENDIF.
    ENDLOOP.
    LOOP AT lo_vpcconfig->get_subnets( ) into lo_row_12.
      lo_row_13 = lo_row_12.
      IF lo_row_13 IS NOT INITIAL.
        lv_subnetid = lo_row_13->get_value( ).
      ENDIF.
    ENDLOOP.
  ENDIF.
  lo_clusterorchestrator = lo_result->get_orchestrator( ).
  IF lo_clusterorchestrator IS NOT INITIAL.
    lo_clusterorchestratoreksc = lo_clusterorchestrator->get_eks( ).
    IF lo_clusterorchestratoreksc IS NOT INITIAL.
      lv_eksclusterarn = lo_clusterorchestratoreksc->get_clusterarn( ).
    ENDIF.
    lo_clusterorchestratorslur = lo_clusterorchestrator->get_slurm( ).
    IF lo_clusterorchestratorslur IS NOT INITIAL.
      lv_clusterslurmconfigstrat = lo_clusterorchestratorslur->get_slurmconfigstrategy( ).
    ENDIF.
  ENDIF.
  lo_clustertieredstoragecon = lo_result->get_tieredstorageconfig( ).
  IF lo_clustertieredstoragecon IS NOT INITIAL.
    lv_clusterconfigmode = lo_clustertieredstoragecon->get_mode( ).
    lv_clusterinstancememoryal = lo_clustertieredstoragecon->get_instmemoryallocpercage( ).
  ENDIF.
  lv_clusternoderecovery = lo_result->get_noderecovery( ).
  lv_clusternodeprovisioning = lo_result->get_nodeprovisioningmode( ).
  lv_rolearn = lo_result->get_clusterrole( ).
  lo_clusterautoscalingconfi = lo_result->get_autoscaling( ).
  IF lo_clusterautoscalingconfi IS NOT INITIAL.
    lv_clusterautoscalingmode = lo_clusterautoscalingconfi->get_mode( ).
    lv_clusterautoscalertype = lo_clusterautoscalingconfi->get_autoscalertype( ).
    lv_clusterautoscalingstatu = lo_clusterautoscalingconfi->get_status( ).
    lv_string_1 = lo_clusterautoscalingconfi->get_failuremessage( ).
  ENDIF.
ENDIF.