Skip to content

/AWS1/CL_EC2=>ASSOCIATESUBNETCIDRBLOCK()

About AssociateSubnetCidrBlock

Associates a CIDR block with your subnet. You can only associate a single IPv6 CIDR block with your subnet.

Method Signature

IMPORTING

Required arguments:

iv_subnetid TYPE /AWS1/EC2SUBNETID /AWS1/EC2SUBNETID

The ID of your subnet.

Optional arguments:

iv_ipv6ipampoolid TYPE /AWS1/EC2IPAMPOOLID /AWS1/EC2IPAMPOOLID

An IPv6 IPAM pool ID.

iv_ipv6netmasklength TYPE /AWS1/EC2NETMASKLENGTH /AWS1/EC2NETMASKLENGTH

An IPv6 netmask length.

iv_ipv6cidrblock TYPE /AWS1/EC2STRING /AWS1/EC2STRING

The IPv6 CIDR block for your subnet.

RETURNING

oo_output TYPE REF TO /aws1/cl_ec2asscsnetcidrblkrs /AWS1/CL_EC2ASSCSNETCIDRBLKRS

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~associatesubnetcidrblock(
  iv_ipv6cidrblock = |string|
  iv_ipv6ipampoolid = |string|
  iv_ipv6netmasklength = 123
  iv_subnetid = |string|
).

This is an example of reading all possible response values

lv_subnetcidrassociationid = lo_subnetipv6cidrblockasso->get_associationid( ).
lv_string = lo_subnetipv6cidrblockasso->get_ipv6cidrblock( ).
lv_subnetcidrblockstatecod = lo_subnetcidrblockstate->get_state( ).
lv_string = lo_subnetcidrblockstate->get_statusmessage( ).
lv_ipv6addressattribute = lo_subnetipv6cidrblockasso->get_ipv6addressattribute( ).
lv_ipsource = lo_subnetipv6cidrblockasso->get_ipsource( ).
lv_string = lo_result->get_subnetid( ).