Skip to content

/AWS1/CL_EC2=>MODIFYTRANSITGATEWAY()

About ModifyTransitGateway

Modifies the specified transit gateway. When you modify a transit gateway, the modified options are applied to new transit gateway attachments only. Your existing transit gateway attachments are not modified.

Method Signature

IMPORTING

Required arguments:

iv_transitgatewayid TYPE /AWS1/EC2TRANSITGATEWAYID /AWS1/EC2TRANSITGATEWAYID

The ID of the transit gateway.

Optional arguments:

iv_description TYPE /AWS1/EC2STRING /AWS1/EC2STRING

The description for the transit gateway.

io_options TYPE REF TO /AWS1/CL_EC2MODIFYTGWOPTIONS /AWS1/CL_EC2MODIFYTGWOPTIONS

The options to modify.

iv_dryrun TYPE /AWS1/EC2BOOLEAN /AWS1/EC2BOOLEAN

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

RETURNING

oo_output TYPE REF TO /aws1/cl_ec2modifytgwresult /AWS1/CL_EC2MODIFYTGWRESULT

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_ec2~modifytransitgateway(
  io_options = new /aws1/cl_ec2modifytgwoptions(
    it_addtgwcidrblocks = VALUE /aws1/cl_ec2tgwcidrblkstrlst_w=>tt_tgwcidrblockstringlist(
      ( new /aws1/cl_ec2tgwcidrblkstrlst_w( |string| ) )
    )
    it_removetgwcidrblocks = VALUE /aws1/cl_ec2tgwcidrblkstrlst_w=>tt_tgwcidrblockstringlist(
      ( new /aws1/cl_ec2tgwcidrblkstrlst_w( |string| ) )
    )
    iv_amazonsideasn = 123
    iv_associationdefroutetblid = |string|
    iv_autoaccsharedattachments = |string|
    iv_defroutetableassociation = |string|
    iv_defroutetablepropagation = |string|
    iv_dnssupport = |string|
    iv_propagationdefroutetblid = |string|
    iv_secgroupreferencingsupp = |string|
    iv_vpnecmpsupport = |string|
  )
  iv_description = |string|
  iv_dryrun = ABAP_TRUE
  iv_transitgatewayid = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_transitgateway = lo_result->get_transitgateway( ).
  IF lo_transitgateway IS NOT INITIAL.
    lv_string = lo_transitgateway->get_transitgatewayid( ).
    lv_string = lo_transitgateway->get_transitgatewayarn( ).
    lv_transitgatewaystate = lo_transitgateway->get_state( ).
    lv_string = lo_transitgateway->get_ownerid( ).
    lv_string = lo_transitgateway->get_description( ).
    lv_datetime = lo_transitgateway->get_creationtime( ).
    lo_transitgatewayoptions = lo_transitgateway->get_options( ).
    IF lo_transitgatewayoptions IS NOT INITIAL.
      lv_long = lo_transitgatewayoptions->get_amazonsideasn( ).
      LOOP AT lo_transitgatewayoptions->get_transitgatewaycidrblocks( ) 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_autoacceptsharedattachm = lo_transitgatewayoptions->get_autoaccsharedattachments( ).
      lv_defaultroutetableassoci = lo_transitgatewayoptions->get_defroutetableassociation( ).
      lv_string = lo_transitgatewayoptions->get_associationdefroutetblid( ).
      lv_defaultroutetablepropag = lo_transitgatewayoptions->get_defroutetablepropagation( ).
      lv_string = lo_transitgatewayoptions->get_propagationdefroutetblid( ).
      lv_vpnecmpsupportvalue = lo_transitgatewayoptions->get_vpnecmpsupport( ).
      lv_dnssupportvalue = lo_transitgatewayoptions->get_dnssupport( ).
      lv_securitygroupreferencin = lo_transitgatewayoptions->get_secgroupreferencingsupp( ).
      lv_multicastsupportvalue = lo_transitgatewayoptions->get_multicastsupport( ).
    ENDIF.
    LOOP AT lo_transitgateway->get_tags( ) into lo_row_2.
      lo_row_3 = lo_row_2.
      IF lo_row_3 IS NOT INITIAL.
        lv_string = lo_row_3->get_key( ).
        lv_string = lo_row_3->get_value( ).
      ENDIF.
    ENDLOOP.
  ENDIF.
ENDIF.