Skip to content

/AWS1/CL_QST=>UPDATEIPRESTRICTION()

About UpdateIpRestriction

Updates the content and status of IP rules. Traffic from a source is allowed when the source satisfies either the IpRestrictionRule, VpcIdRestrictionRule, or VpcEndpointIdRestrictionRule. To use this operation, you must provide the entire map of rules. You can use the DescribeIpRestriction operation to get the current rule map.

Method Signature

IMPORTING

Required arguments:

iv_awsaccountid TYPE /AWS1/QSTAWSACCOUNTID /AWS1/QSTAWSACCOUNTID

The ID of the Amazon Web Services account that contains the IP rules.

Optional arguments:

it_iprestrictionrulemap TYPE /AWS1/CL_QSTIPRESTRICTIONRLM00=>TT_IPRESTRICTIONRULEMAP TT_IPRESTRICTIONRULEMAP

A map that describes the updated IP rules with CIDR ranges and descriptions.

it_vpcidrestrictionrulemap TYPE /AWS1/CL_QSTVPCIDRESTRICTION00=>TT_VPCIDRESTRICTIONRULEMAP TT_VPCIDRESTRICTIONRULEMAP

A map of VPC IDs and their corresponding rules. When you configure this parameter, traffic from all VPC endpoints that are present in the specified VPC is allowed.

it_vpcendptidrestrictionrl00 TYPE /AWS1/CL_QSTVPCENDPTIDRESTRI00=>TT_VPCENDPTIDRESTRICTIONRLMAP TT_VPCENDPTIDRESTRICTIONRLMAP

A map of allowed VPC endpoint IDs and their corresponding rule descriptions.

iv_enabled TYPE /AWS1/QSTNULLABLEBOOLEAN /AWS1/QSTNULLABLEBOOLEAN

A value that specifies whether IP rules are turned on.

RETURNING

oo_output TYPE REF TO /aws1/cl_qstupiprestrictionrsp /AWS1/CL_QSTUPIPRESTRICTIONRSP

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_qst~updateiprestriction(
  it_iprestrictionrulemap = VALUE /aws1/cl_qstiprestrictionrlm00=>tt_iprestrictionrulemap(
    (
      VALUE /aws1/cl_qstiprestrictionrlm00=>ts_iprestrictionrulemap_maprow(
        key = |string|
        value = new /aws1/cl_qstiprestrictionrlm00( |string| )
      )
    )
  )
  it_vpcendptidrestrictionrl00 = VALUE /aws1/cl_qstvpcendptidrestri00=>tt_vpcendptidrestrictionrlmap(
    (
      VALUE /aws1/cl_qstvpcendptidrestri00=>ts_vpcendptidrestrict00_maprow(
        value = new /aws1/cl_qstvpcendptidrestri00( |string| )
        key = |string|
      )
    )
  )
  it_vpcidrestrictionrulemap = VALUE /aws1/cl_qstvpcidrestriction00=>tt_vpcidrestrictionrulemap(
    (
      VALUE /aws1/cl_qstvpcidrestriction00=>ts_vpcidrestrictionrl00_maprow(
        value = new /aws1/cl_qstvpcidrestriction00( |string| )
        key = |string|
      )
    )
  )
  iv_awsaccountid = |string|
  iv_enabled = ABAP_TRUE
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_awsaccountid = lo_result->get_awsaccountid( ).
  lv_string = lo_result->get_requestid( ).
  lv_statuscode = lo_result->get_status( ).
ENDIF.