Skip to content

/AWS1/CL_FNT=>UPDATEKEYGROUP()

About UpdateKeyGroup

Updates a key group.

When you update a key group, all the fields are updated with the values provided in the request. You cannot update some fields independent of others. To update a key group:

  1. Get the current key group with GetKeyGroup or GetKeyGroupConfig.

  2. Locally modify the fields in the key group that you want to update. For example, add or remove public key IDs.

  3. Call UpdateKeyGroup with the entire key group object, including the fields that you modified and those that you didn't.

Method Signature

IMPORTING

Required arguments:

io_keygroupconfig TYPE REF TO /AWS1/CL_FNTKEYGROUPCONFIG /AWS1/CL_FNTKEYGROUPCONFIG

The key group configuration.

iv_id TYPE /AWS1/FNTSTRING /AWS1/FNTSTRING

The identifier of the key group that you are updating.

Optional arguments:

iv_ifmatch TYPE /AWS1/FNTSTRING /AWS1/FNTSTRING

The version of the key group that you are updating. The version is the key group's ETag value.

RETURNING

oo_output TYPE REF TO /aws1/cl_fntupdatekeygrouprslt /AWS1/CL_FNTUPDATEKEYGROUPRSLT

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_fnt~updatekeygroup(
  io_keygroupconfig = new /aws1/cl_fntkeygroupconfig(
    it_items = VALUE /aws1/cl_fntpublickeyidlist_w=>tt_publickeyidlist(
      ( new /aws1/cl_fntpublickeyidlist_w( |string| ) )
    )
    iv_comment = |string|
    iv_name = |string|
  )
  iv_id = |string|
  iv_ifmatch = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_keygroup = lo_result->get_keygroup( ).
  IF lo_keygroup IS NOT INITIAL.
    lv_string = lo_keygroup->get_id( ).
    lv_timestamp = lo_keygroup->get_lastmodifiedtime( ).
    lo_keygroupconfig = lo_keygroup->get_keygroupconfig( ).
    IF lo_keygroupconfig IS NOT INITIAL.
      lv_string = lo_keygroupconfig->get_name( ).
      LOOP AT lo_keygroupconfig->get_items( ) into lo_row.
        lo_row_1 = lo_row.
        IF lo_row_1 IS NOT INITIAL.
          lv_string = lo_row_1->get_value( ).
        ENDIF.
      ENDLOOP.
      lv_string = lo_keygroupconfig->get_comment( ).
    ENDIF.
  ENDIF.
  lv_string = lo_result->get_etag( ).
ENDIF.