Skip to content

/AWS1/CL_SGM=>UPDATEMODELPACKAGE()

About UpdateModelPackage

Updates a versioned model.

Method Signature

IMPORTING

Required arguments:

iv_modelpackagearn TYPE /AWS1/SGMMODELPACKAGEARN /AWS1/SGMMODELPACKAGEARN

The Amazon Resource Name (ARN) of the model package.

Optional arguments:

iv_modelapprovalstatus TYPE /AWS1/SGMMODELAPPROVALSTATUS /AWS1/SGMMODELAPPROVALSTATUS

The approval status of the model.

iv_approvaldescription TYPE /AWS1/SGMAPPROVALDESCRIPTION /AWS1/SGMAPPROVALDESCRIPTION

A description for the approval status of the model.

it_customermetadataprps TYPE /AWS1/CL_SGMCUSTOMERMETMAP_W=>TT_CUSTOMERMETADATAMAP TT_CUSTOMERMETADATAMAP

The metadata properties associated with the model package versions.

it_customermetprpstoremove TYPE /AWS1/CL_SGMCUSMETKEYLIST_W=>TT_CUSTOMERMETADATAKEYLIST TT_CUSTOMERMETADATAKEYLIST

The metadata properties associated with the model package versions to remove.

it_addlinferencespecstoadd TYPE /AWS1/CL_SGMADDLINFERENCESPE00=>TT_ADDITIONALINFERENCESPECS TT_ADDITIONALINFERENCESPECS

An array of additional Inference Specification objects to be added to the existing array additional Inference Specification. Total number of additional Inference Specifications can not exceed 15. Each additional Inference Specification specifies artifacts based on this model package that can be used on inference endpoints. Generally used with SageMaker Neo to store the compiled artifacts.

io_inferencespecification TYPE REF TO /AWS1/CL_SGMINFERENCESPEC /AWS1/CL_SGMINFERENCESPEC

Specifies details about inference jobs that you can run with models based on this model package, including the following information:

  • The Amazon ECR paths of containers that contain the inference code and model artifacts.

  • The instance types that the model package supports for transform jobs and real-time endpoints used for inference.

  • The input and output content formats that the model package supports for inference.

iv_sourceuri TYPE /AWS1/SGMMODELPACKAGESOURCEURI /AWS1/SGMMODELPACKAGESOURCEURI

The URI of the source for the model package.

io_modelcard TYPE REF TO /AWS1/CL_SGMMDELPACKAGEMDELC00 /AWS1/CL_SGMMDELPACKAGEMDELC00

The model card associated with the model package. Since ModelPackageModelCard is tied to a model package, it is a specific usage of a model card and its schema is simplified compared to the schema of ModelCard. The ModelPackageModelCard schema does not include model_package_details, and model_overview is composed of the model_creator and model_artifact properties. For more information about the model package model card schema, see Model package model card schema. For more information about the model card associated with the model package, see View the Details of a Model Version.

io_modellifecycle TYPE REF TO /AWS1/CL_SGMMODELLIFECYCLE /AWS1/CL_SGMMODELLIFECYCLE

A structure describing the current state of the model in its life cycle.

iv_clienttoken TYPE /AWS1/SGMCLIENTTOKEN /AWS1/SGMCLIENTTOKEN

A unique token that guarantees that the call to this API is idempotent.

RETURNING

oo_output TYPE REF TO /aws1/cl_sgmupdmodelpackageout /AWS1/CL_SGMUPDMODELPACKAGEOUT

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->/aws1/if_sgm~updatemodelpackage(
  io_inferencespecification = new /aws1/cl_sgminferencespec(
    it_containers = VALUE /aws1/cl_sgmmdelpackageconta00=>tt_mdelpackagecontainerdefnlst(
      (
        new /aws1/cl_sgmmdelpackageconta00(
          io_additionals3datasource = new /aws1/cl_sgmaddls3datasource(
            iv_compressiontype = |string|
            iv_etag = |string|
            iv_s3datatype = |string|
            iv_s3uri = |string|
          )
          io_modeldatasource = new /aws1/cl_sgmmodeldatasource(
            io_s3datasource = new /aws1/cl_sgms3modeldatasource(
              io_hubaccessconfig = new /aws1/cl_sgminferencehubacccfg( |string| )
              io_modelaccessconfig = new /aws1/cl_sgmmodelaccessconfig( ABAP_TRUE )
              iv_compressiontype = |string|
              iv_etag = |string|
              iv_manifestetag = |string|
              iv_manifests3uri = |string|
              iv_s3datatype = |string|
              iv_s3uri = |string|
            )
          )
          io_modelinput = new /aws1/cl_sgmmodelinput( |string| )
          it_environment = VALUE /aws1/cl_sgmenvironmentmap_w=>tt_environmentmap(
            (
              VALUE /aws1/cl_sgmenvironmentmap_w=>ts_environmentmap_maprow(
                value = new /aws1/cl_sgmenvironmentmap_w( |string| )
                key = |string|
              )
            )
          )
          iv_containerhostname = |string|
          iv_framework = |string|
          iv_frameworkversion = |string|
          iv_image = |string|
          iv_imagedigest = |string|
          iv_modeldataetag = |string|
          iv_modeldataurl = |string|
          iv_nearestmodelname = |string|
          iv_productid = |string|
        )
      )
    )
    it_suppedrealtimeinference00 = VALUE /aws1/cl_sgmrealtimeinferenc00=>tt_realtimeinferenceinsttypes(
      ( new /aws1/cl_sgmrealtimeinferenc00( |string| ) )
    )
    it_suppedtransforminsttypes = VALUE /aws1/cl_sgmtransforminsttyp00=>tt_transforminstancetypes(
      ( new /aws1/cl_sgmtransforminsttyp00( |string| ) )
    )
    it_supportedcontenttypes = VALUE /aws1/cl_sgmcontenttypes_w=>tt_contenttypes(
      ( new /aws1/cl_sgmcontenttypes_w( |string| ) )
    )
    it_supportedrspmimetypes = VALUE /aws1/cl_sgmrspmimetypes_w=>tt_responsemimetypes(
      ( new /aws1/cl_sgmrspmimetypes_w( |string| ) )
    )
  )
  io_modelcard = new /aws1/cl_sgmmdelpackagemdelc00(
    iv_modelcardcontent = |string|
    iv_modelcardstatus = |string|
  )
  io_modellifecycle = new /aws1/cl_sgmmodellifecycle(
    iv_stage = |string|
    iv_stagedescription = |string|
    iv_stagestatus = |string|
  )
  it_addlinferencespecstoadd = VALUE /aws1/cl_sgmaddlinferencespe00=>tt_additionalinferencespecs(
    (
      new /aws1/cl_sgmaddlinferencespe00(
        it_containers = VALUE /aws1/cl_sgmmdelpackageconta00=>tt_mdelpackagecontainerdefnlst(
          (
            new /aws1/cl_sgmmdelpackageconta00(
              io_additionals3datasource = new /aws1/cl_sgmaddls3datasource(
                iv_compressiontype = |string|
                iv_etag = |string|
                iv_s3datatype = |string|
                iv_s3uri = |string|
              )
              io_modeldatasource = new /aws1/cl_sgmmodeldatasource(
                io_s3datasource = new /aws1/cl_sgms3modeldatasource(
                  io_hubaccessconfig = new /aws1/cl_sgminferencehubacccfg( |string| )
                  io_modelaccessconfig = new /aws1/cl_sgmmodelaccessconfig( ABAP_TRUE )
                  iv_compressiontype = |string|
                  iv_etag = |string|
                  iv_manifestetag = |string|
                  iv_manifests3uri = |string|
                  iv_s3datatype = |string|
                  iv_s3uri = |string|
                )
              )
              io_modelinput = new /aws1/cl_sgmmodelinput( |string| )
              it_environment = VALUE /aws1/cl_sgmenvironmentmap_w=>tt_environmentmap(
                (
                  VALUE /aws1/cl_sgmenvironmentmap_w=>ts_environmentmap_maprow(
                    value = new /aws1/cl_sgmenvironmentmap_w( |string| )
                    key = |string|
                  )
                )
              )
              iv_containerhostname = |string|
              iv_framework = |string|
              iv_frameworkversion = |string|
              iv_image = |string|
              iv_imagedigest = |string|
              iv_modeldataetag = |string|
              iv_modeldataurl = |string|
              iv_nearestmodelname = |string|
              iv_productid = |string|
            )
          )
        )
        it_suppedrealtimeinference00 = VALUE /aws1/cl_sgmrealtimeinferenc00=>tt_realtimeinferenceinsttypes(
          ( new /aws1/cl_sgmrealtimeinferenc00( |string| ) )
        )
        it_suppedtransforminsttypes = VALUE /aws1/cl_sgmtransforminsttyp00=>tt_transforminstancetypes(
          ( new /aws1/cl_sgmtransforminsttyp00( |string| ) )
        )
        it_supportedcontenttypes = VALUE /aws1/cl_sgmcontenttypes_w=>tt_contenttypes(
          ( new /aws1/cl_sgmcontenttypes_w( |string| ) )
        )
        it_supportedrspmimetypes = VALUE /aws1/cl_sgmrspmimetypes_w=>tt_responsemimetypes(
          ( new /aws1/cl_sgmrspmimetypes_w( |string| ) )
        )
        iv_description = |string|
        iv_name = |string|
      )
    )
  )
  it_customermetadataprps = VALUE /aws1/cl_sgmcustomermetmap_w=>tt_customermetadatamap(
    (
      VALUE /aws1/cl_sgmcustomermetmap_w=>ts_customermetadatamap_maprow(
        value = new /aws1/cl_sgmcustomermetmap_w( |string| )
        key = |string|
      )
    )
  )
  it_customermetprpstoremove = VALUE /aws1/cl_sgmcusmetkeylist_w=>tt_customermetadatakeylist(
    ( new /aws1/cl_sgmcusmetkeylist_w( |string| ) )
  )
  iv_approvaldescription = |string|
  iv_clienttoken = |string|
  iv_modelapprovalstatus = |string|
  iv_modelpackagearn = |string|
  iv_sourceuri = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_modelpackagearn = lo_result->get_modelpackagearn( ).
ENDIF.