Skip to content

/AWS1/CL_DCO=>ASSOCIATEMACSECKEY()

About AssociateMacSecKey

Associates a MAC Security (MACsec) Connection Key Name (CKN)/ Connectivity Association Key (CAK) pair with an Direct Connect dedicated connection.

You must supply either the secretARN, or the CKN/CAK (ckn and cak) pair in the request.

For information about MAC Security (MACsec) key considerations, see MACsec pre-shared CKN/CAK key considerations in the Direct Connect User Guide.

Method Signature

IMPORTING

Required arguments:

iv_connectionid TYPE /AWS1/DCOCONNECTIONID /AWS1/DCOCONNECTIONID

The ID of the dedicated connection (dxcon-xxxx), or the ID of the LAG (dxlag-xxxx).

You can use DescribeConnections or DescribeLags to retrieve connection ID.

Optional arguments:

iv_secretarn TYPE /AWS1/DCOSECRETARN /AWS1/DCOSECRETARN

The Amazon Resource Name (ARN) of the MAC Security (MACsec) secret key to associate with the dedicated connection.

You can use DescribeConnections or DescribeLags to retrieve the MAC Security (MACsec) secret key.

If you use this request parameter, you do not use the ckn and cak request parameters.

iv_ckn TYPE /AWS1/DCOCKN /AWS1/DCOCKN

The MAC Security (MACsec) CKN to associate with the dedicated connection.

You can create the CKN/CAK pair using an industry standard tool.

The valid values are 64 hexadecimal characters (0-9, A-E).

If you use this request parameter, you must use the cak request parameter and not use the secretARN request parameter.

iv_cak TYPE /AWS1/DCOCAK /AWS1/DCOCAK

The MAC Security (MACsec) CAK to associate with the dedicated connection.

You can create the CKN/CAK pair using an industry standard tool.

The valid values are 64 hexadecimal characters (0-9, A-E).

If you use this request parameter, you must use the ckn request parameter and not use the secretARN request parameter.

RETURNING

oo_output TYPE REF TO /aws1/cl_dcoassocmacseckeyrsp /AWS1/CL_DCOASSOCMACSECKEYRSP

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_dco~associatemacseckey(
  iv_cak = |string|
  iv_ckn = |string|
  iv_connectionid = |string|
  iv_secretarn = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_connectionid = lo_result->get_connectionid( ).
  LOOP AT lo_result->get_macseckeys( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_secretarn = lo_row_1->get_secretarn( ).
      lv_ckn = lo_row_1->get_ckn( ).
      lv_state = lo_row_1->get_state( ).
      lv_startondate = lo_row_1->get_starton( ).
    ENDIF.
  ENDLOOP.
ENDIF.