/AWS1/IF_PRN=>CREATECOMPONENT()¶
About CreateComponent¶
Create an Proton component. A component is an infrastructure extension for a service instance.
For more information about components, see Proton components in the Proton User Guide.
Method Signature¶
METHODS /AWS1/IF_PRN~CREATECOMPONENT
IMPORTING
!IV_NAME TYPE /AWS1/PRNRESOURCENAME OPTIONAL
!IV_DESCRIPTION TYPE /AWS1/PRNDESCRIPTION OPTIONAL
!IV_SERVICENAME TYPE /AWS1/PRNRESOURCENAME OPTIONAL
!IV_SERVICEINSTANCENAME TYPE /AWS1/PRNRESOURCENAME OPTIONAL
!IV_ENVIRONMENTNAME TYPE /AWS1/PRNRESOURCENAME OPTIONAL
!IV_TEMPLATEFILE TYPE /AWS1/PRNTEMPLATEFILECONTENTS OPTIONAL
!IV_MANIFEST TYPE /AWS1/PRNTMPLMANIFESTCONTENTS OPTIONAL
!IV_SERVICESPEC TYPE /AWS1/PRNSPECCONTENTS OPTIONAL
!IT_TAGS TYPE /AWS1/CL_PRNTAG=>TT_TAGLIST OPTIONAL
!IV_CLIENTTOKEN TYPE /AWS1/PRNCLIENTTOKEN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_prncreatecomponentout
RAISING
/AWS1/CX_PRNACCESSDENIEDEX
/AWS1/CX_PRNCONFLICTEXCEPTION
/AWS1/CX_PRNINTERNALSERVEREX
/AWS1/CX_PRNRESOURCENOTFOUNDEX
/AWS1/CX_PRNSERVICEQUOTAEXCDEX
/AWS1/CX_PRNTHROTTLINGEX
/AWS1/CX_PRNVALIDATIONEX
/AWS1/CX_PRNCLIENTEXC
/AWS1/CX_PRNSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_name TYPE /AWS1/PRNRESOURCENAME /AWS1/PRNRESOURCENAME¶
The customer-provided name of the component.
iv_templatefile TYPE /AWS1/PRNTEMPLATEFILECONTENTS /AWS1/PRNTEMPLATEFILECONTENTS¶
A path to the Infrastructure as Code (IaC) file describing infrastructure that a custom component provisions.
Components support a single IaC file, even if you use Terraform as your template language.
iv_manifest TYPE /AWS1/PRNTMPLMANIFESTCONTENTS /AWS1/PRNTMPLMANIFESTCONTENTS¶
A path to a manifest file that lists the Infrastructure as Code (IaC) file, template language, and rendering engine for infrastructure that a custom component provisions.
Optional arguments:¶
iv_description TYPE /AWS1/PRNDESCRIPTION /AWS1/PRNDESCRIPTION¶
An optional customer-provided description of the component.
iv_servicename TYPE /AWS1/PRNRESOURCENAME /AWS1/PRNRESOURCENAME¶
The name of the service that
serviceInstanceNameis associated with. If you don't specify this, the component isn't attached to any service instance. Specify bothserviceInstanceNameandserviceNameor neither of them.
iv_serviceinstancename TYPE /AWS1/PRNRESOURCENAME /AWS1/PRNRESOURCENAME¶
The name of the service instance that you want to attach this component to. If you don't specify this, the component isn't attached to any service instance. Specify both
serviceInstanceNameandserviceNameor neither of them.
iv_environmentname TYPE /AWS1/PRNRESOURCENAME /AWS1/PRNRESOURCENAME¶
The name of the Proton environment that you want to associate this component with. You must specify this when you don't specify
serviceInstanceNameandserviceName.
iv_servicespec TYPE /AWS1/PRNSPECCONTENTS /AWS1/PRNSPECCONTENTS¶
The service spec that you want the component to use to access service inputs. Set this only when you attach the component to a service instance.
it_tags TYPE /AWS1/CL_PRNTAG=>TT_TAGLIST TT_TAGLIST¶
An optional list of metadata items that you can associate with the Proton component. A tag is a key-value pair.
For more information, see Proton resources and tagging in the Proton User Guide.
iv_clienttoken TYPE /AWS1/PRNCLIENTTOKEN /AWS1/PRNCLIENTTOKEN¶
The client token for the created component.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_prncreatecomponentout /AWS1/CL_PRNCREATECOMPONENTOUT¶
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->createcomponent(
it_tags = VALUE /aws1/cl_prntag=>tt_taglist(
(
new /aws1/cl_prntag(
iv_key = |string|
iv_value = |string|
)
)
)
iv_clienttoken = |string|
iv_description = |string|
iv_environmentname = |string|
iv_manifest = |string|
iv_name = |string|
iv_serviceinstancename = |string|
iv_servicename = |string|
iv_servicespec = |string|
iv_templatefile = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_component = lo_result->get_component( ).
IF lo_component IS NOT INITIAL.
lv_resourcename = lo_component->get_name( ).
lv_description = lo_component->get_description( ).
lv_componentarn = lo_component->get_arn( ).
lv_resourcename = lo_component->get_environmentname( ).
lv_resourcename = lo_component->get_servicename( ).
lv_resourcename = lo_component->get_serviceinstancename( ).
lv_timestamp = lo_component->get_createdat( ).
lv_timestamp = lo_component->get_lastmodifiedat( ).
lv_timestamp = lo_component->get_lastdeploymentattempte00( ).
lv_timestamp = lo_component->get_lastdeploymentsuccat( ).
lv_deploymentstatus = lo_component->get_deploymentstatus( ).
lv_statusmessage = lo_component->get_deploymentstatusmessage( ).
lv_speccontents = lo_component->get_servicespec( ).
lv_string = lo_component->get_lastclientrequesttoken( ).
lv_deploymentid = lo_component->get_lastattempteddeploymen00( ).
lv_deploymentid = lo_component->get_lastsuccdeploymentid( ).
ENDIF.
ENDIF.