Skip to content

/AWS1/IF_SGM=>UPDATECLUSTER()

About UpdateCluster

Updates a SageMaker HyperPod cluster.

Method Signature

METHODS /AWS1/IF_SGM~UPDATECLUSTER
  IMPORTING
    !IV_CLUSTERNAME TYPE /AWS1/SGMCLUSTERNAMEORARN OPTIONAL
    !IT_INSTANCEGROUPS TYPE /AWS1/CL_SGMCLUSTINSTGROUPSPEC=>TT_CLUSTERINSTANCEGROUPSPECS OPTIONAL
    !IT_RESTRICTEDINSTANCEGROUPS TYPE /AWS1/CL_SGMCLSTRESTRICTEDIN00=>TT_CLUSTRESTRICTEDINSTGRPSPECS OPTIONAL
    !IO_TIEREDSTORAGECONFIG TYPE REF TO /AWS1/CL_SGMCLUSTTIEREDSTRGCFG OPTIONAL
    !IV_NODERECOVERY TYPE /AWS1/SGMCLUSTERNODERECOVERY OPTIONAL
    !IT_INSTANCEGROUPSTODELETE TYPE /AWS1/CL_SGMCLSTINSTGRSTODEL_W=>TT_CLUSTERINSTGROUPSTODELETE OPTIONAL
    !IV_NODEPROVISIONINGMODE TYPE /AWS1/SGMCLUSTERNODEPROVMODE OPTIONAL
    !IV_CLUSTERROLE TYPE /AWS1/SGMROLEARN OPTIONAL
    !IO_AUTOSCALING TYPE REF TO /AWS1/CL_SGMCLUSTAUTOSCCONFIG OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_sgmupdateclusterrsp
  RAISING
    /AWS1/CX_SGMCONFLICTEXCEPTION
    /AWS1/CX_SGMRESOURCELIMITEXCD
    /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

Specify the name of the SageMaker HyperPod cluster you want to update.

Optional arguments:

it_instancegroups TYPE /AWS1/CL_SGMCLUSTINSTGROUPSPEC=>TT_CLUSTERINSTANCEGROUPSPECS TT_CLUSTERINSTANCEGROUPSPECS

Specify the instance groups to update.

it_restrictedinstancegroups TYPE /AWS1/CL_SGMCLSTRESTRICTEDIN00=>TT_CLUSTRESTRICTEDINSTGRPSPECS TT_CLUSTRESTRICTEDINSTGRPSPECS

The specialized instance groups for training models like Amazon Nova to be created in the SageMaker HyperPod cluster.

io_tieredstorageconfig TYPE REF TO /AWS1/CL_SGMCLUSTTIEREDSTRGCFG /AWS1/CL_SGMCLUSTTIEREDSTRGCFG

Updates the configuration for managed tier checkpointing on the HyperPod cluster. For example, you can enable or disable the feature and modify the percentage of cluster memory allocated for checkpoint storage.

iv_noderecovery TYPE /AWS1/SGMCLUSTERNODERECOVERY /AWS1/SGMCLUSTERNODERECOVERY

The node recovery mode to be applied to the SageMaker HyperPod cluster.

it_instancegroupstodelete TYPE /AWS1/CL_SGMCLSTINSTGRSTODEL_W=>TT_CLUSTERINSTGROUPSTODELETE TT_CLUSTERINSTGROUPSTODELETE

Specify the names of the instance groups to delete. Use a single , as the separator between multiple names.

iv_nodeprovisioningmode TYPE /AWS1/SGMCLUSTERNODEPROVMODE /AWS1/SGMCLUSTERNODEPROVMODE

Determines how instance provisioning is handled during cluster operations. In Continuous mode, the cluster provisions available instances incrementally and retries until the target count is reached. The cluster becomes operational once cluster-level resources are ready. Use CurrentCount and TargetCount in DescribeCluster to track provisioning progress.

iv_clusterrole TYPE /AWS1/SGMROLEARN /AWS1/SGMROLEARN

The Amazon Resource Name (ARN) of the IAM role that HyperPod assumes for cluster autoscaling operations. Cannot be updated while autoscaling is enabled.

io_autoscaling TYPE REF TO /AWS1/CL_SGMCLUSTAUTOSCCONFIG /AWS1/CL_SGMCLUSTAUTOSCCONFIG

Updates the autoscaling configuration for the cluster. Use to enable or disable automatic node scaling.

RETURNING

oo_output TYPE REF TO /aws1/cl_sgmupdateclusterrsp /AWS1/CL_SGMUPDATECLUSTERRSP

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->updatecluster(
  io_autoscaling = new /aws1/cl_sgmclustautoscconfig(
    iv_autoscalertype = |string|
    iv_mode = |string|
  )
  io_tieredstorageconfig = new /aws1/cl_sgmclusttieredstrgcfg(
    iv_instmemoryallocpercentage = 123
    iv_mode = |string|
  )
  it_instancegroups = VALUE /aws1/cl_sgmclustinstgroupspec=>tt_clusterinstancegroupspecs(
    (
      new /aws1/cl_sgmclustinstgroupspec(
        io_lifecycleconfig = new /aws1/cl_sgmclusterlcconfig(
          iv_oncreate = |string|
          iv_sources3uri = |string|
        )
        io_overridevpcconfig = new /aws1/cl_sgmvpcconfig(
          it_securitygroupids = VALUE /aws1/cl_sgmvpcsecgroupids_w=>tt_vpcsecuritygroupids(
            ( new /aws1/cl_sgmvpcsecgroupids_w( |string| ) )
          )
          it_subnets = VALUE /aws1/cl_sgmsubnets_w=>tt_subnets(
            ( new /aws1/cl_sgmsubnets_w( |string| ) )
          )
        )
        io_scheduledupdateconfig = new /aws1/cl_sgmschddupdateconfig(
          io_deploymentconfig = new /aws1/cl_sgmdeploymentconf(
            io_rollingupdatepolicy = new /aws1/cl_sgmrollingdeploymen00(
              io_maximumbatchsize = new /aws1/cl_sgmcapacitysizeconfig(
                iv_type = |string|
                iv_value = 123
              )
              io_rollbackmaximumbatchsize = new /aws1/cl_sgmcapacitysizeconfig(
                iv_type = |string|
                iv_value = 123
              )
            )
            it_autorollbackconfiguration = VALUE /aws1/cl_sgmalarmdetails=>tt_autorollbackalarms(
              ( new /aws1/cl_sgmalarmdetails( |string| ) )
            )
            iv_waitintervalinseconds = 123
          )
          iv_scheduleexpression = |string|
        )
        it_instancestorageconfigs = VALUE /aws1/cl_sgmclustinststrgcfg=>tt_clusterinststorageconfigs(
          (
            new /aws1/cl_sgmclustinststrgcfg(
              io_ebsvolumeconfig = new /aws1/cl_sgmclustebsvolumecfg(
                iv_rootvolume = ABAP_TRUE
                iv_volumekmskeyid = |string|
                iv_volumesizeingb = 123
              )
            )
          )
        )
        it_onstartdeephealthchecks = VALUE /aws1/cl_sgmonstrtdeephealth00=>tt_onstartdeephealthchecks(
          ( new /aws1/cl_sgmonstrtdeephealth00( |string| ) )
        )
        iv_executionrole = |string|
        iv_imageid = |string|
        iv_instancecount = 123
        iv_instancegroupname = |string|
        iv_instancetype = |string|
        iv_threadspercore = 123
        iv_trainingplanarn = |string|
      )
    )
  )
  it_instancegroupstodelete = VALUE /aws1/cl_sgmclstinstgrstodel_w=>tt_clusterinstgroupstodelete(
    ( new /aws1/cl_sgmclstinstgrstodel_w( |string| ) )
  )
  it_restrictedinstancegroups = VALUE /aws1/cl_sgmclstrestrictedin00=>tt_clustrestrictedinstgrpspecs(
    (
      new /aws1/cl_sgmclstrestrictedin00(
        io_environmentconfig = new /aws1/cl_sgmenvironmentconfig(
          io_fsxlustreconfig = new /aws1/cl_sgmfsxlustreconfig(
            iv_perunitstoragethroughput = 123
            iv_sizeingib = 123
          )
        )
        io_overridevpcconfig = new /aws1/cl_sgmvpcconfig(
          it_securitygroupids = VALUE /aws1/cl_sgmvpcsecgroupids_w=>tt_vpcsecuritygroupids(
            ( new /aws1/cl_sgmvpcsecgroupids_w( |string| ) )
          )
          it_subnets = VALUE /aws1/cl_sgmsubnets_w=>tt_subnets(
            ( new /aws1/cl_sgmsubnets_w( |string| ) )
          )
        )
        io_scheduledupdateconfig = new /aws1/cl_sgmschddupdateconfig(
          io_deploymentconfig = new /aws1/cl_sgmdeploymentconf(
            io_rollingupdatepolicy = new /aws1/cl_sgmrollingdeploymen00(
              io_maximumbatchsize = new /aws1/cl_sgmcapacitysizeconfig(
                iv_type = |string|
                iv_value = 123
              )
              io_rollbackmaximumbatchsize = new /aws1/cl_sgmcapacitysizeconfig(
                iv_type = |string|
                iv_value = 123
              )
            )
            it_autorollbackconfiguration = VALUE /aws1/cl_sgmalarmdetails=>tt_autorollbackalarms(
              ( new /aws1/cl_sgmalarmdetails( |string| ) )
            )
            iv_waitintervalinseconds = 123
          )
          iv_scheduleexpression = |string|
        )
        it_instancestorageconfigs = VALUE /aws1/cl_sgmclustinststrgcfg=>tt_clusterinststorageconfigs(
          (
            new /aws1/cl_sgmclustinststrgcfg(
              io_ebsvolumeconfig = new /aws1/cl_sgmclustebsvolumecfg(
                iv_rootvolume = ABAP_TRUE
                iv_volumekmskeyid = |string|
                iv_volumesizeingb = 123
              )
            )
          )
        )
        it_onstartdeephealthchecks = VALUE /aws1/cl_sgmonstrtdeephealth00=>tt_onstartdeephealthchecks(
          ( new /aws1/cl_sgmonstrtdeephealth00( |string| ) )
        )
        iv_executionrole = |string|
        iv_instancecount = 123
        iv_instancegroupname = |string|
        iv_instancetype = |string|
        iv_threadspercore = 123
        iv_trainingplanarn = |string|
      )
    )
  )
  iv_clustername = |string|
  iv_clusterrole = |string|
  iv_nodeprovisioningmode = |string|
  iv_noderecovery = |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( ).
ENDIF.