/AWS1/IF_SGM=>CREATEAPP()¶
About CreateApp¶
Creates a running app for the specified UserProfile. This operation is automatically invoked by Amazon SageMaker AI upon access to the associated Domain, and when new kernel configurations are selected by the user. A user may have multiple Apps active simultaneously.
Method Signature¶
METHODS /AWS1/IF_SGM~CREATEAPP
IMPORTING
!IV_DOMAINID TYPE /AWS1/SGMDOMAINID OPTIONAL
!IV_USERPROFILENAME TYPE /AWS1/SGMUSERPROFILENAME OPTIONAL
!IV_SPACENAME TYPE /AWS1/SGMSPACENAME OPTIONAL
!IV_APPTYPE TYPE /AWS1/SGMAPPTYPE OPTIONAL
!IV_APPNAME TYPE /AWS1/SGMAPPNAME OPTIONAL
!IT_TAGS TYPE /AWS1/CL_SGMTAG=>TT_TAGLIST OPTIONAL
!IO_RESOURCESPEC TYPE REF TO /AWS1/CL_SGMRESOURCESPEC OPTIONAL
!IV_RECOVERYMODE TYPE /AWS1/SGMBOOLEAN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_sgmcreateappresponse
RAISING
/AWS1/CX_SGMRESOURCEINUSE
/AWS1/CX_SGMRESOURCELIMITEXCD
/AWS1/CX_SGMCLIENTEXC
/AWS1/CX_SGMSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_domainid TYPE /AWS1/SGMDOMAINID /AWS1/SGMDOMAINID¶
The domain ID.
iv_apptype TYPE /AWS1/SGMAPPTYPE /AWS1/SGMAPPTYPE¶
The type of app.
iv_appname TYPE /AWS1/SGMAPPNAME /AWS1/SGMAPPNAME¶
The name of the app.
Optional arguments:¶
iv_userprofilename TYPE /AWS1/SGMUSERPROFILENAME /AWS1/SGMUSERPROFILENAME¶
The user profile name. If this value is not set, then
SpaceNamemust be set.
iv_spacename TYPE /AWS1/SGMSPACENAME /AWS1/SGMSPACENAME¶
The name of the space. If this value is not set, then
UserProfileNamemust be set.
it_tags TYPE /AWS1/CL_SGMTAG=>TT_TAGLIST TT_TAGLIST¶
Each tag consists of a key and an optional value. Tag keys must be unique per resource.
io_resourcespec TYPE REF TO /AWS1/CL_SGMRESOURCESPEC /AWS1/CL_SGMRESOURCESPEC¶
The instance type and the Amazon Resource Name (ARN) of the SageMaker AI image created on the instance.
The value of
InstanceTypepassed as part of theResourceSpecin theCreateAppcall overrides the value passed as part of theResourceSpecconfigured for the user profile or the domain. IfInstanceTypeis not specified in any of those threeResourceSpecvalues for aKernelGatewayapp, theCreateAppcall fails with a request validation error.
iv_recoverymode TYPE /AWS1/SGMBOOLEAN /AWS1/SGMBOOLEAN¶
Indicates whether the application is launched in recovery mode.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_sgmcreateappresponse /AWS1/CL_SGMCREATEAPPRESPONSE¶
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->createapp(
io_resourcespec = new /aws1/cl_sgmresourcespec(
iv_instancetype = |string|
iv_lifecycleconfigarn = |string|
iv_sagemakerimagearn = |string|
iv_sagemakerimageversionarn = |string|
iv_smimageversionalias = |string|
)
it_tags = VALUE /aws1/cl_sgmtag=>tt_taglist(
(
new /aws1/cl_sgmtag(
iv_key = |string|
iv_value = |string|
)
)
)
iv_appname = |string|
iv_apptype = |string|
iv_domainid = |string|
iv_recoverymode = ABAP_TRUE
iv_spacename = |string|
iv_userprofilename = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_apparn = lo_result->get_apparn( ).
ENDIF.