/AWS1/IF_SCG=>CREATEPRODUCT()¶
About CreateProduct¶
Creates a product.
A delegated admin is authorized to invoke this command.
The user or role that performs this operation must have the
cloudformation:GetTemplate IAM policy permission. This policy permission is
required when using the ImportFromPhysicalId template source in the
information data section.
Method Signature¶
METHODS /AWS1/IF_SCG~CREATEPRODUCT
IMPORTING
!IV_ACCEPTLANGUAGE TYPE /AWS1/SCGACCEPTLANGUAGE OPTIONAL
!IV_NAME TYPE /AWS1/SCGPRODUCTVIEWNAME OPTIONAL
!IV_OWNER TYPE /AWS1/SCGPRODUCTVIEWOWNER OPTIONAL
!IV_DESCRIPTION TYPE /AWS1/SCGPRODUCTVIEWSHORTDESC OPTIONAL
!IV_DISTRIBUTOR TYPE /AWS1/SCGPRODUCTVIEWOWNER OPTIONAL
!IV_SUPPORTDESCRIPTION TYPE /AWS1/SCGSUPPORTDESCRIPTION OPTIONAL
!IV_SUPPORTEMAIL TYPE /AWS1/SCGSUPPORTEMAIL OPTIONAL
!IV_SUPPORTURL TYPE /AWS1/SCGSUPPORTURL OPTIONAL
!IV_PRODUCTTYPE TYPE /AWS1/SCGPRODUCTTYPE OPTIONAL
!IT_TAGS TYPE /AWS1/CL_SCGTAG=>TT_ADDTAGS OPTIONAL
!IO_PROVARTIFACTPARAMETERS TYPE REF TO /AWS1/CL_SCGPROVARTIFACTPRPS OPTIONAL
!IV_IDEMPOTENCYTOKEN TYPE /AWS1/SCGIDEMPOTENCYTOKEN OPTIONAL
!IO_SOURCECONNECTION TYPE REF TO /AWS1/CL_SCGSOURCECONNECTION OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_scgcreateproductout
RAISING
/AWS1/CX_SCGINVALIDPARAMSEX
/AWS1/CX_SCGLIMITEXCEEDEDEX
/AWS1/CX_SCGTAGOPTIONNOTMIGR00
/AWS1/CX_SCGCLIENTEXC
/AWS1/CX_SCGSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_name TYPE /AWS1/SCGPRODUCTVIEWNAME /AWS1/SCGPRODUCTVIEWNAME¶
The name of the product.
iv_owner TYPE /AWS1/SCGPRODUCTVIEWOWNER /AWS1/SCGPRODUCTVIEWOWNER¶
The owner of the product.
iv_producttype TYPE /AWS1/SCGPRODUCTTYPE /AWS1/SCGPRODUCTTYPE¶
The type of product.
iv_idempotencytoken TYPE /AWS1/SCGIDEMPOTENCYTOKEN /AWS1/SCGIDEMPOTENCYTOKEN¶
A unique identifier that you provide to ensure idempotency. If multiple requests differ only by the idempotency token, the same response is returned for each repeated request.
Optional arguments:¶
iv_acceptlanguage TYPE /AWS1/SCGACCEPTLANGUAGE /AWS1/SCGACCEPTLANGUAGE¶
The language code.
jp- Japanese
zh- Chinese
iv_description TYPE /AWS1/SCGPRODUCTVIEWSHORTDESC /AWS1/SCGPRODUCTVIEWSHORTDESC¶
The description of the product.
iv_distributor TYPE /AWS1/SCGPRODUCTVIEWOWNER /AWS1/SCGPRODUCTVIEWOWNER¶
The distributor of the product.
iv_supportdescription TYPE /AWS1/SCGSUPPORTDESCRIPTION /AWS1/SCGSUPPORTDESCRIPTION¶
The support information about the product.
iv_supportemail TYPE /AWS1/SCGSUPPORTEMAIL /AWS1/SCGSUPPORTEMAIL¶
The contact email for product support.
iv_supporturl TYPE /AWS1/SCGSUPPORTURL /AWS1/SCGSUPPORTURL¶
The contact URL for product support.
^https?:\/\/// is the pattern used to validate SupportUrl.
it_tags TYPE /AWS1/CL_SCGTAG=>TT_ADDTAGS TT_ADDTAGS¶
One or more tags.
io_provartifactparameters TYPE REF TO /AWS1/CL_SCGPROVARTIFACTPRPS /AWS1/CL_SCGPROVARTIFACTPRPS¶
The configuration of the provisioning artifact.
io_sourceconnection TYPE REF TO /AWS1/CL_SCGSOURCECONNECTION /AWS1/CL_SCGSOURCECONNECTION¶
Specifies connection details for the created product and syncs the product to the connection source artifact. This automatically manages the product's artifacts based on changes to the source. The
SourceConnectionparameter consists of the following sub-fields.
Type
ConnectionParamters
RETURNING¶
oo_output TYPE REF TO /aws1/cl_scgcreateproductout /AWS1/CL_SCGCREATEPRODUCTOUT¶
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->createproduct(
io_provartifactparameters = new /aws1/cl_scgprovartifactprps(
it_info = VALUE /aws1/cl_scgprovartifactinfo_w=>tt_provisioningartifactinfo(
(
VALUE /aws1/cl_scgprovartifactinfo_w=>ts_provartifactinfo_maprow(
key = |string|
value = new /aws1/cl_scgprovartifactinfo_w( |string| )
)
)
)
iv_description = |string|
iv_disabletemplatevalidation = ABAP_TRUE
iv_name = |string|
iv_type = |string|
)
io_sourceconnection = new /aws1/cl_scgsourceconnection(
io_connectionparameters = new /aws1/cl_scgsourceconnparams(
io_codestar = new /aws1/cl_scgcodestarparameters(
iv_artifactpath = |string|
iv_branch = |string|
iv_connectionarn = |string|
iv_repository = |string|
)
)
iv_type = |string|
)
it_tags = VALUE /aws1/cl_scgtag=>tt_addtags(
(
new /aws1/cl_scgtag(
iv_key = |string|
iv_value = |string|
)
)
)
iv_acceptlanguage = |string|
iv_description = |string|
iv_distributor = |string|
iv_idempotencytoken = |string|
iv_name = |string|
iv_owner = |string|
iv_producttype = |string|
iv_supportdescription = |string|
iv_supportemail = |string|
iv_supporturl = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_productviewdetail = lo_result->get_productviewdetail( ).
IF lo_productviewdetail IS NOT INITIAL.
lo_productviewsummary = lo_productviewdetail->get_productviewsummary( ).
IF lo_productviewsummary IS NOT INITIAL.
lv_id = lo_productviewsummary->get_id( ).
lv_id = lo_productviewsummary->get_productid( ).
lv_productviewname = lo_productviewsummary->get_name( ).
lv_productviewowner = lo_productviewsummary->get_owner( ).
lv_productviewshortdescrip = lo_productviewsummary->get_shortdescription( ).
lv_producttype = lo_productviewsummary->get_type( ).
lv_productviewdistributor = lo_productviewsummary->get_distributor( ).
lv_hasdefaultpath = lo_productviewsummary->get_hasdefaultpath( ).
lv_supportemail = lo_productviewsummary->get_supportemail( ).
lv_supportdescription = lo_productviewsummary->get_supportdescription( ).
lv_supporturl = lo_productviewsummary->get_supporturl( ).
ENDIF.
lv_status = lo_productviewdetail->get_status( ).
lv_resourcearn = lo_productviewdetail->get_productarn( ).
lv_createdtime = lo_productviewdetail->get_createdtime( ).
lo_sourceconnectiondetail = lo_productviewdetail->get_sourceconnection( ).
IF lo_sourceconnectiondetail IS NOT INITIAL.
lv_sourcetype = lo_sourceconnectiondetail->get_type( ).
lo_sourceconnectionparamet = lo_sourceconnectiondetail->get_connectionparameters( ).
IF lo_sourceconnectionparamet IS NOT INITIAL.
lo_codestarparameters = lo_sourceconnectionparamet->get_codestar( ).
IF lo_codestarparameters IS NOT INITIAL.
lv_codestarconnectionarn = lo_codestarparameters->get_connectionarn( ).
lv_repository = lo_codestarparameters->get_repository( ).
lv_repositorybranch = lo_codestarparameters->get_branch( ).
lv_repositoryartifactpath = lo_codestarparameters->get_artifactpath( ).
ENDIF.
ENDIF.
lo_lastsync = lo_sourceconnectiondetail->get_lastsync( ).
IF lo_lastsync IS NOT INITIAL.
lv_lastsynctime = lo_lastsync->get_lastsynctime( ).
lv_lastsyncstatus = lo_lastsync->get_lastsyncstatus( ).
lv_lastsyncstatusmessage = lo_lastsync->get_lastsyncstatusmessage( ).
lv_lastsuccessfulsynctime = lo_lastsync->get_lastsuccessfulsynctime( ).
lv_id = lo_lastsync->get_lastsuccfulsyncprovart00( ).
ENDIF.
ENDIF.
ENDIF.
lo_provisioningartifactdet = lo_result->get_provartifactdetail( ).
IF lo_provisioningartifactdet IS NOT INITIAL.
lv_id = lo_provisioningartifactdet->get_id( ).
lv_provisioningartifactnam = lo_provisioningartifactdet->get_name( ).
lv_provisioningartifactnam = lo_provisioningartifactdet->get_description( ).
lv_provisioningartifacttyp = lo_provisioningartifactdet->get_type( ).
lv_creationtime = lo_provisioningartifactdet->get_createdtime( ).
lv_provisioningartifactact = lo_provisioningartifactdet->get_active( ).
lv_provisioningartifactgui = lo_provisioningartifactdet->get_guidance( ).
lv_sourcerevision = lo_provisioningartifactdet->get_sourcerevision( ).
ENDIF.
LOOP AT lo_result->get_tags( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_tagkey = lo_row_1->get_key( ).
lv_tagvalue = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.