/AWS1/IF_DMG=>CREATEINSTANCEPROFILE()¶
About CreateInstanceProfile¶
Creates the instance profile using the specified parameters.
Method Signature¶
METHODS /AWS1/IF_DMG~CREATEINSTANCEPROFILE
IMPORTING
!IV_AVAILABILITYZONE TYPE /AWS1/DMGSTRING OPTIONAL
!IV_KMSKEYARN TYPE /AWS1/DMGSTRING OPTIONAL
!IV_PUBLICLYACCESSIBLE TYPE /AWS1/DMGBOOLEANOPTIONAL OPTIONAL
!IT_TAGS TYPE /AWS1/CL_DMGTAG=>TT_TAGLIST OPTIONAL
!IV_NETWORKTYPE TYPE /AWS1/DMGSTRING OPTIONAL
!IV_INSTANCEPROFILENAME TYPE /AWS1/DMGSTRING OPTIONAL
!IV_DESCRIPTION TYPE /AWS1/DMGSTRING OPTIONAL
!IV_SUBNETGROUPIDENTIFIER TYPE /AWS1/DMGSTRING OPTIONAL
!IT_VPCSECURITYGROUPS TYPE /AWS1/CL_DMGSTRINGLIST_W=>TT_STRINGLIST OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_dmgcreateinstpflrsp
RAISING
/AWS1/CX_DMGACCESSDENIEDFAULT
/AWS1/CX_DMGFAILEDDEPENDENCY00
/AWS1/CX_DMGINVRESRCSTATEFAULT
/AWS1/CX_DMGKMSKEYNOTACCIBLE00
/AWS1/CX_DMGRESRCALRDYEXFAULT
/AWS1/CX_DMGRESRCNOTFOUNDFAULT
/AWS1/CX_DMGRESRCQUOTAEXCDFA00
/AWS1/CX_DMGS3ACCDENIEDFAULT
/AWS1/CX_DMGS3RESRCNOTFNDFAULT
/AWS1/CX_DMGCLIENTEXC
/AWS1/CX_DMGSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Optional arguments:¶
iv_availabilityzone TYPE /AWS1/DMGSTRING /AWS1/DMGSTRING¶
The Availability Zone where the instance profile will be created. The default value is a random, system-chosen Availability Zone in the Amazon Web Services Region where your data provider is created, for examplem
us-east-1d.
iv_kmskeyarn TYPE /AWS1/DMGSTRING /AWS1/DMGSTRING¶
The Amazon Resource Name (ARN) of the KMS key that is used to encrypt the connection parameters for the instance profile.
If you don't specify a value for the
KmsKeyArnparameter, then DMS uses an Amazon Web Services owned encryption key to encrypt your resources.
iv_publiclyaccessible TYPE /AWS1/DMGBOOLEANOPTIONAL /AWS1/DMGBOOLEANOPTIONAL¶
Specifies the accessibility options for the instance profile. A value of
truerepresents an instance profile with a public IP address. A value offalserepresents an instance profile with a private IP address. The default value istrue.
it_tags TYPE /AWS1/CL_DMGTAG=>TT_TAGLIST TT_TAGLIST¶
One or more tags to be assigned to the instance profile.
iv_networktype TYPE /AWS1/DMGSTRING /AWS1/DMGSTRING¶
Specifies the network type for the instance profile. A value of
IPV4represents an instance profile with IPv4 network type and only supports IPv4 addressing. A value ofIPV6represents an instance profile with IPv6 network type and only supports IPv6 addressing. A value ofDUALrepresents an instance profile with dual network type that supports IPv4 and IPv6 addressing.
iv_instanceprofilename TYPE /AWS1/DMGSTRING /AWS1/DMGSTRING¶
A user-friendly name for the instance profile.
iv_description TYPE /AWS1/DMGSTRING /AWS1/DMGSTRING¶
A user-friendly description of the instance profile.
iv_subnetgroupidentifier TYPE /AWS1/DMGSTRING /AWS1/DMGSTRING¶
A subnet group to associate with the instance profile.
it_vpcsecuritygroups TYPE /AWS1/CL_DMGSTRINGLIST_W=>TT_STRINGLIST TT_STRINGLIST¶
Specifies the VPC security group names to be used with the instance profile. The VPC security group must work with the VPC containing the instance profile.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_dmgcreateinstpflrsp /AWS1/CL_DMGCREATEINSTPFLRSP¶
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->createinstanceprofile(
it_tags = VALUE /aws1/cl_dmgtag=>tt_taglist(
(
new /aws1/cl_dmgtag(
iv_key = |string|
iv_resourcearn = |string|
iv_value = |string|
)
)
)
it_vpcsecuritygroups = VALUE /aws1/cl_dmgstringlist_w=>tt_stringlist(
( new /aws1/cl_dmgstringlist_w( |string| ) )
)
iv_availabilityzone = |string|
iv_description = |string|
iv_instanceprofilename = |string|
iv_kmskeyarn = |string|
iv_networktype = |string|
iv_publiclyaccessible = ABAP_TRUE
iv_subnetgroupidentifier = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_instanceprofile = lo_result->get_instanceprofile( ).
IF lo_instanceprofile IS NOT INITIAL.
lv_string = lo_instanceprofile->get_instanceprofilearn( ).
lv_string = lo_instanceprofile->get_availabilityzone( ).
lv_string = lo_instanceprofile->get_kmskeyarn( ).
lv_booleanoptional = lo_instanceprofile->get_publiclyaccessible( ).
lv_string = lo_instanceprofile->get_networktype( ).
lv_string = lo_instanceprofile->get_instanceprofilename( ).
lv_string = lo_instanceprofile->get_description( ).
lv_iso8601datetime = lo_instanceprofile->get_instprofilecreationtime( ).
lv_string = lo_instanceprofile->get_subnetgroupidentifier( ).
LOOP AT lo_instanceprofile->get_vpcsecuritygroups( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
Create Instance Profile¶
Creates the instance profile using the specified parameters.
DATA(lo_result) = lo_client->createinstanceprofile(
it_tags = VALUE /aws1/cl_dmgtag=>tt_taglist(
(
new /aws1/cl_dmgtag(
iv_key = |access|
iv_value = |authorizedusers|
)
)
)
iv_description = |Description|
iv_instanceprofilename = |my-instance-profile|
iv_kmskeyarn = |arn:aws:kms:us-east-1:012345678901:key/01234567-89ab-cdef-0123-456789abcdef|
iv_networktype = |DUAL|
iv_publiclyaccessible = ABAP_TRUE
iv_subnetgroupidentifier = |my-subnet-group|
).