Skip to content

/AWS1/IF_PCY=>REMOVEKEYREPLICATIONREGIONS()

About RemoveKeyReplicationRegions

Removes Replication Regions from an existing Amazon Web Services Payment Cryptography key, disabling the key's availability for cryptographic operations in the specified Amazon Web Services Regions.

When you remove Replication Regions, the key material is securely deleted from those regions and can no longer be used for cryptographic operations there. This operation is irreversible for the specified Amazon Web Services Regions.

Ensure that no active cryptographic operations or applications depend on the key in the regions you're removing before performing this operation.

Cross-account use: This operation can't be used across different Amazon Web Services accounts.

Related operations:

Method Signature

IMPORTING

Required arguments:

iv_keyidentifier TYPE /AWS1/PCYKEYARNORKEYALIASTYPE /AWS1/PCYKEYARNORKEYALIASTYPE

The key identifier (ARN or alias) of the key from which to remove replication regions.

This key must exist and have replication enabled in the specified regions.

it_replicationregions TYPE /AWS1/CL_PCYREGIONS_W=>TT_REGIONS TT_REGIONS

The list of Amazon Web Services Regions to remove from the key's replication configuration.

The key will no longer be available for cryptographic operations in these regions after removal. Ensure no active operations depend on the key in these regions before removal.

RETURNING

oo_output TYPE REF TO /aws1/cl_pcyremkeyreplrgnsout /AWS1/CL_PCYREMKEYREPLRGNSOUT

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_pcy~removekeyreplicationregions(
  it_replicationregions = VALUE /aws1/cl_pcyregions_w=>tt_regions(
    ( new /aws1/cl_pcyregions_w( |string| ) )
  )
  iv_keyidentifier = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_key = lo_result->get_key( ).
  IF lo_key IS NOT INITIAL.
    lv_keyarn = lo_key->get_keyarn( ).
    lo_keyattributes = lo_key->get_keyattributes( ).
    IF lo_keyattributes IS NOT INITIAL.
      lv_keyusage = lo_keyattributes->get_keyusage( ).
      lv_keyclass = lo_keyattributes->get_keyclass( ).
      lv_keyalgorithm = lo_keyattributes->get_keyalgorithm( ).
      lo_keymodesofuse = lo_keyattributes->get_keymodesofuse( ).
      IF lo_keymodesofuse IS NOT INITIAL.
        lv_primitiveboolean = lo_keymodesofuse->get_encrypt( ).
        lv_primitiveboolean = lo_keymodesofuse->get_decrypt( ).
        lv_primitiveboolean = lo_keymodesofuse->get_wrap( ).
        lv_primitiveboolean = lo_keymodesofuse->get_unwrap( ).
        lv_primitiveboolean = lo_keymodesofuse->get_generate( ).
        lv_primitiveboolean = lo_keymodesofuse->get_sign( ).
        lv_primitiveboolean = lo_keymodesofuse->get_verify( ).
        lv_primitiveboolean = lo_keymodesofuse->get_derivekey( ).
        lv_primitiveboolean = lo_keymodesofuse->get_norestrictions( ).
      ENDIF.
    ENDIF.
    lv_keycheckvalue = lo_key->get_keycheckvalue( ).
    lv_keycheckvaluealgorithm = lo_key->get_keycheckvaluealgorithm( ).
    lv_boolean = lo_key->get_enabled( ).
    lv_boolean = lo_key->get_exportable( ).
    lv_keystate = lo_key->get_keystate( ).
    lv_keyorigin = lo_key->get_keyorigin( ).
    lv_timestamp = lo_key->get_createtimestamp( ).
    lv_timestamp = lo_key->get_usagestarttimestamp( ).
    lv_timestamp = lo_key->get_usagestoptimestamp( ).
    lv_timestamp = lo_key->get_deletependingtimestamp( ).
    lv_timestamp = lo_key->get_deletetimestamp( ).
    lv_derivekeyusage = lo_key->get_derivekeyusage( ).
    lv_multiregionkeytype = lo_key->get_multiregionkeytype( ).
    lv_region = lo_key->get_primaryregion( ).
    LOOP AT lo_key->get_replicationstatus( ) into ls_row.
      lv_key_1 = ls_row-key.
      lo_value = ls_row-value.
      IF lo_value IS NOT INITIAL.
        lv_keyreplicationstate = lo_value->get_status( ).
        lv_string = lo_value->get_statusmessage( ).
      ENDIF.
    ENDLOOP.
    lv_boolean = lo_key->get_usingdefaultreplregions( ).
  ENDIF.
ENDIF.