Skip to content

/AWS1/CL_APS=>UPDATEAPPBLOCKBUILDER()

About UpdateAppBlockBuilder

Updates an app block builder.

If the app block builder is in the STARTING or STOPPING state, you can't update it. If the app block builder is in the RUNNING state, you can only update the DisplayName and Description. If the app block builder is in the STOPPED state, you can update any attribute except the Name.

Method Signature

IMPORTING

Required arguments:

iv_name TYPE /AWS1/APSNAME /AWS1/APSNAME

The unique name for the app block builder.

Optional arguments:

iv_description TYPE /AWS1/APSDESCRIPTION /AWS1/APSDESCRIPTION

The description of the app block builder.

iv_displayname TYPE /AWS1/APSDISPLAYNAME /AWS1/APSDISPLAYNAME

The display name of the app block builder.

iv_platform TYPE /AWS1/APSPLATFORMTYPE /AWS1/APSPLATFORMTYPE

The platform of the app block builder.

WINDOWS_SERVER_2019 is the only valid value.

iv_instancetype TYPE /AWS1/APSSTRING /AWS1/APSSTRING

The instance type to use when launching the app block builder. The following instance types are available:

  • stream.standard.small

  • stream.standard.medium

  • stream.standard.large

  • stream.standard.xlarge

  • stream.standard.2xlarge

io_vpcconfig TYPE REF TO /AWS1/CL_APSVPCCONFIG /AWS1/CL_APSVPCCONFIG

The VPC configuration for the app block builder.

App block builders require that you specify at least two subnets in different availability zones.

iv_enabledefinternetaccess TYPE /AWS1/APSBOOLEANOBJECT /AWS1/APSBOOLEANOBJECT

Enables or disables default internet access for the app block builder.

iv_iamrolearn TYPE /AWS1/APSARN /AWS1/APSARN

The Amazon Resource Name (ARN) of the IAM role to apply to the app block builder. To assume a role, the app block builder calls the AWS Security Token Service (STS) AssumeRole API operation and passes the ARN of the role to use. The operation creates a new session with temporary credentials. AppStream 2.0 retrieves the temporary credentials and creates the appstream_machine_role credential profile on the instance.

For more information, see Using an IAM Role to Grant Permissions to Applications and Scripts Running on AppStream 2.0 Streaming Instances in the Amazon AppStream 2.0 Administration Guide.

it_accessendpoints TYPE /AWS1/CL_APSACCESSENDPOINT=>TT_ACCESSENDPOINTLIST TT_ACCESSENDPOINTLIST

The list of interface VPC endpoint (interface endpoint) objects. Administrators can connect to the app block builder only through the specified endpoints.

it_attributestodelete TYPE /AWS1/CL_APSAPPBLKBUILDERATT00=>TT_APPBLOCKBUILDERATTRIBUTES TT_APPBLOCKBUILDERATTRIBUTES

The attributes to delete from the app block builder.

RETURNING

oo_output TYPE REF TO /aws1/cl_apsupappblkbuilderrs /AWS1/CL_APSUPAPPBLKBUILDERRS

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~updateappblockbuilder(
  io_vpcconfig = new /aws1/cl_apsvpcconfig(
    it_securitygroupids = VALUE /aws1/cl_apssecgroupidlist_w=>tt_securitygroupidlist(
      ( new /aws1/cl_apssecgroupidlist_w( |string| ) )
    )
    it_subnetids = VALUE /aws1/cl_apssubnetidlist_w=>tt_subnetidlist(
      ( new /aws1/cl_apssubnetidlist_w( |string| ) )
    )
  )
  it_accessendpoints = VALUE /aws1/cl_apsaccessendpoint=>tt_accessendpointlist(
    (
      new /aws1/cl_apsaccessendpoint(
        iv_endpointtype = |string|
        iv_vpceid = |string|
      )
    )
  )
  it_attributestodelete = VALUE /aws1/cl_apsappblkbuilderatt00=>tt_appblockbuilderattributes(
    ( new /aws1/cl_apsappblkbuilderatt00( |string| ) )
  )
  iv_description = |string|
  iv_displayname = |string|
  iv_enabledefinternetaccess = ABAP_TRUE
  iv_iamrolearn = |string|
  iv_instancetype = |string|
  iv_name = |string|
  iv_platform = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_appblockbuilder = lo_result->get_appblockbuilder( ).
  IF lo_appblockbuilder IS NOT INITIAL.
    lv_arn = lo_appblockbuilder->get_arn( ).
    lv_string = lo_appblockbuilder->get_name( ).
    lv_string = lo_appblockbuilder->get_displayname( ).
    lv_string = lo_appblockbuilder->get_description( ).
    lv_appblockbuilderplatform = lo_appblockbuilder->get_platform( ).
    lv_string = lo_appblockbuilder->get_instancetype( ).
    lv_booleanobject = lo_appblockbuilder->get_enabledefinternetaccess( ).
    lv_arn = lo_appblockbuilder->get_iamrolearn( ).
    lo_vpcconfig = lo_appblockbuilder->get_vpcconfig( ).
    IF lo_vpcconfig IS NOT INITIAL.
      LOOP AT lo_vpcconfig->get_subnetids( ) into lo_row.
        lo_row_1 = lo_row.
        IF lo_row_1 IS NOT INITIAL.
          lv_string = lo_row_1->get_value( ).
        ENDIF.
      ENDLOOP.
      LOOP AT lo_vpcconfig->get_securitygroupids( ) into lo_row_2.
        lo_row_3 = lo_row_2.
        IF lo_row_3 IS NOT INITIAL.
          lv_string = lo_row_3->get_value( ).
        ENDIF.
      ENDLOOP.
    ENDIF.
    lv_appblockbuilderstate = lo_appblockbuilder->get_state( ).
    lv_timestamp = lo_appblockbuilder->get_createdtime( ).
    LOOP AT lo_appblockbuilder->get_appblockbuildererrors( ) into lo_row_4.
      lo_row_5 = lo_row_4.
      IF lo_row_5 IS NOT INITIAL.
        lv_fleeterrorcode = lo_row_5->get_errorcode( ).
        lv_string = lo_row_5->get_errormessage( ).
        lv_timestamp = lo_row_5->get_errortimestamp( ).
      ENDIF.
    ENDLOOP.
    lo_appblockbuilderstatecha = lo_appblockbuilder->get_statechangereason( ).
    IF lo_appblockbuilderstatecha IS NOT INITIAL.
      lv_appblockbuilderstatecha_1 = lo_appblockbuilderstatecha->get_code( ).
      lv_string = lo_appblockbuilderstatecha->get_message( ).
    ENDIF.
    LOOP AT lo_appblockbuilder->get_accessendpoints( ) into lo_row_6.
      lo_row_7 = lo_row_6.
      IF lo_row_7 IS NOT INITIAL.
        lv_accessendpointtype = lo_row_7->get_endpointtype( ).
        lv_string = lo_row_7->get_vpceid( ).
      ENDIF.
    ENDLOOP.
  ENDIF.
ENDIF.