/AWS1/IF_WSP=>CREATEWORKSPACEIMAGE()¶
About CreateWorkspaceImage¶
Creates a new WorkSpace image from an existing WorkSpace.
Method Signature¶
METHODS /AWS1/IF_WSP~CREATEWORKSPACEIMAGE
IMPORTING
!IV_NAME TYPE /AWS1/WSPWORKSPACEIMAGENAME OPTIONAL
!IV_DESCRIPTION TYPE /AWS1/WSPWORKSPACEIMAGEDESC OPTIONAL
!IV_WORKSPACEID TYPE /AWS1/WSPWORKSPACEID OPTIONAL
!IT_TAGS TYPE /AWS1/CL_WSPTAG=>TT_TAGLIST OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_wspcreworkspaceimag01
RAISING
/AWS1/CX_WSPACCESSDENIEDEX
/AWS1/CX_WSPINVPARAMVALUESEX
/AWS1/CX_WSPINVRESOURCESTATEEX
/AWS1/CX_WSPOPNOTSUPPORTEDEX
/AWS1/CX_WSPRESRCALRDYEXISTSEX
/AWS1/CX_WSPRESRCLIMITEXCDEX
/AWS1/CX_WSPRESOURCENOTFOUNDEX
/AWS1/CX_WSPCLIENTEXC
/AWS1/CX_WSPSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_name TYPE /AWS1/WSPWORKSPACEIMAGENAME /AWS1/WSPWORKSPACEIMAGENAME¶
The name of the new WorkSpace image.
iv_description TYPE /AWS1/WSPWORKSPACEIMAGEDESC /AWS1/WSPWORKSPACEIMAGEDESC¶
The description of the new WorkSpace image.
iv_workspaceid TYPE /AWS1/WSPWORKSPACEID /AWS1/WSPWORKSPACEID¶
The identifier of the source WorkSpace
Optional arguments:¶
it_tags TYPE /AWS1/CL_WSPTAG=>TT_TAGLIST TT_TAGLIST¶
The tags that you want to add to the new WorkSpace image. To add tags when you're creating the image, you must create an IAM policy that grants your IAM user permission to use
workspaces:CreateTags.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_wspcreworkspaceimag01 /AWS1/CL_WSPCREWORKSPACEIMAG01¶
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->createworkspaceimage(
it_tags = VALUE /aws1/cl_wsptag=>tt_taglist(
(
new /aws1/cl_wsptag(
iv_key = |string|
iv_value = |string|
)
)
)
iv_description = |string|
iv_name = |string|
iv_workspaceid = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_workspaceimageid = lo_result->get_imageid( ).
lv_workspaceimagename = lo_result->get_name( ).
lv_workspaceimagedescripti = lo_result->get_description( ).
lo_operatingsystem = lo_result->get_operatingsystem( ).
IF lo_operatingsystem IS NOT INITIAL.
lv_operatingsystemtype = lo_operatingsystem->get_type( ).
ENDIF.
lv_workspaceimagestate = lo_result->get_state( ).
lv_workspaceimagerequiredt = lo_result->get_requiredtenancy( ).
lv_timestamp = lo_result->get_created( ).
lv_awsaccount = lo_result->get_owneraccountid( ).
ENDIF.