/AWS1/IF_SHB=>CREATECONNECTOR()¶
About CreateConnector¶
Creates a cloud service provider management (CSPM) connector in Security Hub CSPM. A connector establishes a connection between Security Hub CSPM and a third-party cloud provider, enabling Security Hub CSPM to ingest security findings and resource data from the connected environment.
Method Signature¶
METHODS /AWS1/IF_SHB~CREATECONNECTOR
IMPORTING
!IV_NAME TYPE /AWS1/SHBNONEMPTYSTRING OPTIONAL
!IV_DESCRIPTION TYPE /AWS1/SHBNONEMPTYSTRING OPTIONAL
!IO_PROVIDER TYPE REF TO /AWS1/CL_SHBCSPMPROVIDERCONF OPTIONAL
!IT_TAGS TYPE /AWS1/CL_SHBTAGMAP_W=>TT_TAGMAP OPTIONAL
!IV_CLIENTTOKEN TYPE /AWS1/SHBCLIENTTOKEN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_shbcreatecnctrrsp
RAISING
/AWS1/CX_SHBACCESSDENIEDEX
/AWS1/CX_SHBCONFLICTEXCEPTION
/AWS1/CX_SHBINTERNALSERVEREX
/AWS1/CX_SHBINVALIDACCESSEX
/AWS1/CX_SHBRESOURCENOTFOUNDEX
/AWS1/CX_SHBSERVICEQUOTAEXCDEX
/AWS1/CX_SHBTHROTTLINGEX
/AWS1/CX_SHBVALIDATIONEX
/AWS1/CX_SHBCLIENTEXC
/AWS1/CX_SHBSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_name TYPE /AWS1/SHBNONEMPTYSTRING /AWS1/SHBNONEMPTYSTRING¶
The name of the connector. Must be unique within the account.
io_provider TYPE REF TO /AWS1/CL_SHBCSPMPROVIDERCONF /AWS1/CL_SHBCSPMPROVIDERCONF¶
The configuration for the cloud provider to connect to. Currently supports Azure.
Optional arguments:¶
iv_description TYPE /AWS1/SHBNONEMPTYSTRING /AWS1/SHBNONEMPTYSTRING¶
The description of the connector.
it_tags TYPE /AWS1/CL_SHBTAGMAP_W=>TT_TAGMAP TT_TAGMAP¶
The tags to add to the connector resource.
iv_clienttoken TYPE /AWS1/SHBCLIENTTOKEN /AWS1/SHBCLIENTTOKEN¶
A unique identifier used to ensure idempotency of the request.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_shbcreatecnctrrsp /AWS1/CL_SHBCREATECNCTRRSP¶
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->createconnector(
io_provider = new /aws1/cl_shbcspmproviderconf(
io_azure = new /aws1/cl_shbazureproviderconf(
io_scopeconfiguration = new /aws1/cl_shbazurescopeconf(
it_scopevalues = VALUE /aws1/cl_shbscopevaluelist_w=>tt_scopevaluelist(
( new /aws1/cl_shbscopevaluelist_w( |string| ) )
)
iv_scopetype = |string|
)
it_azureregions = VALUE /aws1/cl_shbazureregionlist_w=>tt_azureregionlist(
( new /aws1/cl_shbazureregionlist_w( |string| ) )
)
iv_awsconfigconnectorarn = |string|
)
)
it_tags = VALUE /aws1/cl_shbtagmap_w=>tt_tagmap(
(
VALUE /aws1/cl_shbtagmap_w=>ts_tagmap_maprow(
key = |string|
value = new /aws1/cl_shbtagmap_w( |string| )
)
)
)
iv_clienttoken = |string|
iv_description = |string|
iv_name = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_nonemptystring = lo_result->get_connectorarn( ).
lv_nonemptystring = lo_result->get_connectorid( ).
lv_cspmconnectorstatus = lo_result->get_connectorstatus( ).
lv_cspmenablementstatus = lo_result->get_enablementstatus( ).
ENDIF.
To create a CSPM connector¶
This operation creates a CSPM connector to connect Security Hub to an Azure environment.
DATA(lo_result) = lo_client->createconnector(
io_provider = new /aws1/cl_shbcspmproviderconf(
io_azure = new /aws1/cl_shbazureproviderconf(
io_scopeconfiguration = new /aws1/cl_shbazurescopeconf( iv_scopetype = |TENANT| )
it_azureregions = VALUE /aws1/cl_shbazureregionlist_w=>tt_azureregionlist(
( new /aws1/cl_shbazureregionlist_w( |eastus| ) )
( new /aws1/cl_shbazureregionlist_w( |westus2| ) )
)
iv_awsconfigconnectorarn = |arn:aws:config:us-east-1:123456789012:connector/azure-connector-1234|
)
)
iv_description = |Connector for Azure tenant monitoring|
iv_name = |MyAzureConnector|
).