/AWS1/CL_APS=>CREATEUPDATEDIMAGE()
¶
About CreateUpdatedImage¶
Creates a new image with the latest Windows operating system updates, driver updates, and AppStream 2.0 agent software.
For more information, see the "Update an Image by Using Managed AppStream 2.0 Image Updates" section in Administer Your AppStream 2.0 Images, in the Amazon AppStream 2.0 Administration Guide.
Method Signature¶
IMPORTING¶
Required arguments:¶
iv_existingimagename
TYPE /AWS1/APSNAME
/AWS1/APSNAME
¶
The name of the image to update.
iv_newimagename
TYPE /AWS1/APSNAME
/AWS1/APSNAME
¶
The name of the new image. The name must be unique within the AWS account and Region.
Optional arguments:¶
iv_newimagedescription
TYPE /AWS1/APSDESCRIPTION
/AWS1/APSDESCRIPTION
¶
The description to display for the new image.
iv_newimagedisplayname
TYPE /AWS1/APSDISPLAYNAME
/AWS1/APSDISPLAYNAME
¶
The name to display for the new image.
it_newimagetags
TYPE /AWS1/CL_APSTAGS_W=>TT_TAGS
TT_TAGS
¶
The tags to associate with the new image. A tag is a key-value pair, and the value is optional. For example, Environment=Test. If you do not specify a value, Environment=.
Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following special characters:
_ . : / = + \ - @
If you do not specify a value, the value is set to an empty string.
For more information about tags, see Tagging Your Resources in the Amazon AppStream 2.0 Administration Guide.
iv_dryrun
TYPE /AWS1/APSBOOLEAN
/AWS1/APSBOOLEAN
¶
Indicates whether to display the status of image update availability before AppStream 2.0 initiates the process of creating a new updated image. If this value is set to
true
, AppStream 2.0 displays whether image updates are available. If this value is set tofalse
, AppStream 2.0 initiates the process of creating a new updated image without displaying whether image updates are available.
RETURNING¶
oo_output
TYPE REF TO /aws1/cl_apscreupddimagerslt
/AWS1/CL_APSCREUPDDIMAGERSLT
¶
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_aps~createupdatedimage(
it_newimagetags = VALUE /aws1/cl_apstags_w=>tt_tags(
(
VALUE /aws1/cl_apstags_w=>ts_tags_maprow(
key = |string|
value = new /aws1/cl_apstags_w( |string| )
)
)
)
iv_dryrun = ABAP_TRUE
iv_existingimagename = |string|
iv_newimagedescription = |string|
iv_newimagedisplayname = |string|
iv_newimagename = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_image = lo_result->get_image( ).
IF lo_image IS NOT INITIAL.
lv_string = lo_image->get_name( ).
lv_arn = lo_image->get_arn( ).
lv_arn = lo_image->get_baseimagearn( ).
lv_string = lo_image->get_displayname( ).
lv_imagestate = lo_image->get_state( ).
lv_visibilitytype = lo_image->get_visibility( ).
lv_boolean = lo_image->get_imagebuildersupported( ).
lv_string = lo_image->get_imagebuildername( ).
lv_platformtype = lo_image->get_platform( ).
lv_string = lo_image->get_description( ).
lo_imagestatechangereason = lo_image->get_statechangereason( ).
IF lo_imagestatechangereason IS NOT INITIAL.
lv_imagestatechangereasonc = lo_imagestatechangereason->get_code( ).
lv_string = lo_imagestatechangereason->get_message( ).
ENDIF.
LOOP AT lo_image->get_applications( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_name( ).
lv_string = lo_row_1->get_displayname( ).
lv_string = lo_row_1->get_iconurl( ).
lv_string = lo_row_1->get_launchpath( ).
lv_string = lo_row_1->get_launchparameters( ).
lv_boolean = lo_row_1->get_enabled( ).
LOOP AT lo_row_1->get_metadata( ) into ls_row_2.
lv_key = ls_row_2-key.
lo_value = ls_row_2-value.
IF lo_value IS NOT INITIAL.
lv_string = lo_value->get_value( ).
ENDIF.
ENDLOOP.
lv_string = lo_row_1->get_workingdirectory( ).
lv_string = lo_row_1->get_description( ).
lv_arn = lo_row_1->get_arn( ).
lv_arn = lo_row_1->get_appblockarn( ).
lo_s3location = lo_row_1->get_icons3location( ).
IF lo_s3location IS NOT INITIAL.
lv_s3bucket = lo_s3location->get_s3bucket( ).
lv_s3key = lo_s3location->get_s3key( ).
ENDIF.
LOOP AT lo_row_1->get_platforms( ) into lo_row_3.
lo_row_4 = lo_row_3.
IF lo_row_4 IS NOT INITIAL.
lv_platformtype = lo_row_4->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_row_1->get_instancefamilies( ) into lo_row_5.
lo_row_6 = lo_row_5.
IF lo_row_6 IS NOT INITIAL.
lv_string = lo_row_6->get_value( ).
ENDIF.
ENDLOOP.
lv_timestamp = lo_row_1->get_createdtime( ).
ENDIF.
ENDLOOP.
lv_timestamp = lo_image->get_createdtime( ).
lv_timestamp = lo_image->get_pubbaseimagereleaseddate( ).
lv_appstreamagentversion = lo_image->get_appstreamagentversion( ).
lo_imagepermissions = lo_image->get_imagepermissions( ).
IF lo_imagepermissions IS NOT INITIAL.
lv_booleanobject = lo_imagepermissions->get_allowfleet( ).
lv_booleanobject = lo_imagepermissions->get_allowimagebuilder( ).
ENDIF.
LOOP AT lo_image->get_imageerrors( ) into lo_row_7.
lo_row_8 = lo_row_7.
IF lo_row_8 IS NOT INITIAL.
lv_fleeterrorcode = lo_row_8->get_errorcode( ).
lv_string = lo_row_8->get_errormessage( ).
lv_timestamp = lo_row_8->get_errortimestamp( ).
ENDIF.
ENDLOOP.
lv_latestappstreamagentver = lo_image->get_latestappstreamagentvrs( ).
LOOP AT lo_image->get_supportedinstfamilies( ) into lo_row_5.
lo_row_6 = lo_row_5.
IF lo_row_6 IS NOT INITIAL.
lv_string = lo_row_6->get_value( ).
ENDIF.
ENDLOOP.
lv_dynamicappprovidersenab = lo_image->get_dynamicapppvdrsenabled( ).
lv_imagesharedwithothers = lo_image->get_imagesharedwithothers( ).
ENDIF.
lv_boolean = lo_result->get_canupdateimage( ).
ENDIF.