/AWS1/IF_PRN=>UPDATECOMPONENT()¶
About UpdateComponent¶
Update a component.
There are a few modes for updating a component. The deploymentType field defines the mode.
You can't update a component while its deployment status, or the deployment status of a service instance attached to it, is
IN_PROGRESS.
For more information about components, see Proton components in the Proton User Guide.
Method Signature¶
METHODS /AWS1/IF_PRN~UPDATECOMPONENT
IMPORTING
!IV_NAME TYPE /AWS1/PRNRESOURCENAME OPTIONAL
!IV_DEPLOYMENTTYPE TYPE /AWS1/PRNCOMPONENTDEPLOYMENT00 OPTIONAL
!IV_DESCRIPTION TYPE /AWS1/PRNDESCRIPTION OPTIONAL
!IV_SERVICENAME TYPE /AWS1/PRNRESOURCENAMEOREMPTY OPTIONAL
!IV_SERVICEINSTANCENAME TYPE /AWS1/PRNRESOURCENAMEOREMPTY OPTIONAL
!IV_SERVICESPEC TYPE /AWS1/PRNSPECCONTENTS OPTIONAL
!IV_TEMPLATEFILE TYPE /AWS1/PRNTEMPLATEFILECONTENTS OPTIONAL
!IV_CLIENTTOKEN TYPE /AWS1/PRNCLIENTTOKEN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_prnupdcomponentoutput
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 name of the component to update.
iv_deploymenttype TYPE /AWS1/PRNCOMPONENTDEPLOYMENT00 /AWS1/PRNCOMPONENTDEPLOYMENT00¶
The deployment type. It defines the mode for updating a component, as follows:
NONEIn this mode, a deployment doesn't occur. Only the requested metadata parameters are updated. You can only specify
descriptionin this mode.
CURRENT_VERSIONIn this mode, the component is deployed and updated with the new
serviceSpec,templateSource, and/ortypethat you provide. Only requested parameters are updated.
Optional arguments:¶
iv_description TYPE /AWS1/PRNDESCRIPTION /AWS1/PRNDESCRIPTION¶
An optional customer-provided description of the component.
iv_servicename TYPE /AWS1/PRNRESOURCENAMEOREMPTY /AWS1/PRNRESOURCENAMEOREMPTY¶
The name of the service that
serviceInstanceNameis associated with. Don't specify to keep the component's current service instance attachment. Specify an empty string to detach the component from the service instance it's attached to. Specify non-empty values for bothserviceInstanceNameandserviceNameor for neither of them.
iv_serviceinstancename TYPE /AWS1/PRNRESOURCENAMEOREMPTY /AWS1/PRNRESOURCENAMEOREMPTY¶
The name of the service instance that you want to attach this component to. Don't specify to keep the component's current service instance attachment. Specify an empty string to detach the component from the service instance it's attached to. Specify non-empty values for both
serviceInstanceNameandserviceNameor for neither of them.
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 the component is attached to a service instance.
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_clienttoken TYPE /AWS1/PRNCLIENTTOKEN /AWS1/PRNCLIENTTOKEN¶
The client token for the updated component.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_prnupdcomponentoutput /AWS1/CL_PRNUPDCOMPONENTOUTPUT¶
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->updatecomponent(
iv_clienttoken = |string|
iv_deploymenttype = |string|
iv_description = |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.