/AWS1/IF_ART=>COPYPACKAGEVERSIONS()¶
About CopyPackageVersions¶
Copies package versions from one repository to another repository in the same domain.
You must specify versions or versionRevisions. You cannot specify both.
Method Signature¶
METHODS /AWS1/IF_ART~COPYPACKAGEVERSIONS
IMPORTING
!IV_DOMAIN TYPE /AWS1/ARTDOMAINNAME OPTIONAL
!IV_DOMAINOWNER TYPE /AWS1/ARTACCOUNTID OPTIONAL
!IV_SOURCEREPOSITORY TYPE /AWS1/ARTREPOSITORYNAME OPTIONAL
!IV_DESTINATIONREPOSITORY TYPE /AWS1/ARTREPOSITORYNAME OPTIONAL
!IV_FORMAT TYPE /AWS1/ARTPACKAGEFORMAT OPTIONAL
!IV_NAMESPACE TYPE /AWS1/ARTPACKAGENAMESPACE OPTIONAL
!IV_PACKAGE TYPE /AWS1/ARTPACKAGENAME OPTIONAL
!IT_VERSIONS TYPE /AWS1/CL_ARTPACKAGEVRSLIST_W=>TT_PACKAGEVERSIONLIST OPTIONAL
!IT_VERSIONREVISIONS TYPE /AWS1/CL_ARTPACKAGEVRSREVISI00=>TT_PACKAGEVERSIONREVISIONMAP OPTIONAL
!IV_ALLOWOVERWRITE TYPE /AWS1/ARTBOOLEANOPTIONAL OPTIONAL
!IV_INCLUDEFROMUPSTREAM TYPE /AWS1/ARTBOOLEANOPTIONAL OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_artcpypackagevrssrslt
RAISING
/AWS1/CX_ARTACCESSDENIEDEX
/AWS1/CX_ARTCONFLICTEXCEPTION
/AWS1/CX_ARTINTERNALSERVEREX
/AWS1/CX_ARTRESOURCENOTFOUNDEX
/AWS1/CX_ARTSERVICEQUOTAEXCDEX
/AWS1/CX_ARTTHROTTLINGEX
/AWS1/CX_ARTVALIDATIONEX
/AWS1/CX_ARTCLIENTEXC
/AWS1/CX_ARTSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_domain TYPE /AWS1/ARTDOMAINNAME /AWS1/ARTDOMAINNAME¶
The name of the domain that contains the source and destination repositories.
iv_sourcerepository TYPE /AWS1/ARTREPOSITORYNAME /AWS1/ARTREPOSITORYNAME¶
The name of the repository that contains the package versions to be copied.
iv_destinationrepository TYPE /AWS1/ARTREPOSITORYNAME /AWS1/ARTREPOSITORYNAME¶
The name of the repository into which package versions are copied.
iv_format TYPE /AWS1/ARTPACKAGEFORMAT /AWS1/ARTPACKAGEFORMAT¶
The format of the package versions to be copied.
iv_package TYPE /AWS1/ARTPACKAGENAME /AWS1/ARTPACKAGENAME¶
The name of the package that contains the versions to be copied.
Optional arguments:¶
iv_domainowner TYPE /AWS1/ARTACCOUNTID /AWS1/ARTACCOUNTID¶
The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.
iv_namespace TYPE /AWS1/ARTPACKAGENAMESPACE /AWS1/ARTPACKAGENAMESPACE¶
The namespace of the package versions to be copied. The package component that specifies its namespace depends on its type. For example:
The namespace is required when copying package versions of the following formats:
Maven
Swift
generic
The namespace of a Maven package version is its
groupId.The namespace of an npm or Swift package version is its
scope.The namespace of a generic package is its
namespace.Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace.
it_versions TYPE /AWS1/CL_ARTPACKAGEVRSLIST_W=>TT_PACKAGEVERSIONLIST TT_PACKAGEVERSIONLIST¶
The versions of the package to be copied.
You must specify
versionsorversionRevisions. You cannot specify both.
it_versionrevisions TYPE /AWS1/CL_ARTPACKAGEVRSREVISI00=>TT_PACKAGEVERSIONREVISIONMAP TT_PACKAGEVERSIONREVISIONMAP¶
A list of key-value pairs. The keys are package versions and the values are package version revisions. A
CopyPackageVersionoperation succeeds if the specified versions in the source repository match the specified package version revision.You must specify
versionsorversionRevisions. You cannot specify both.
iv_allowoverwrite TYPE /AWS1/ARTBOOLEANOPTIONAL /AWS1/ARTBOOLEANOPTIONAL¶
Set to true to overwrite a package version that already exists in the destination repository. If set to false and the package version already exists in the destination repository, the package version is returned in the
failedVersionsfield of the response with anALREADY_EXISTSerror code.
iv_includefromupstream TYPE /AWS1/ARTBOOLEANOPTIONAL /AWS1/ARTBOOLEANOPTIONAL¶
Set to true to copy packages from repositories that are upstream from the source repository to the destination repository. The default setting is false. For more information, see Working with upstream repositories.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_artcpypackagevrssrslt /AWS1/CL_ARTCPYPACKAGEVRSSRSLT¶
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->copypackageversions(
it_versionrevisions = VALUE /aws1/cl_artpackagevrsrevisi00=>tt_packageversionrevisionmap(
(
VALUE /aws1/cl_artpackagevrsrevisi00=>ts_packagevrsrevision00_maprow(
value = new /aws1/cl_artpackagevrsrevisi00( |string| )
key = |string|
)
)
)
it_versions = VALUE /aws1/cl_artpackagevrslist_w=>tt_packageversionlist(
( new /aws1/cl_artpackagevrslist_w( |string| ) )
)
iv_allowoverwrite = ABAP_TRUE
iv_destinationrepository = |string|
iv_domain = |string|
iv_domainowner = |string|
iv_format = |string|
iv_includefromupstream = ABAP_TRUE
iv_namespace = |string|
iv_package = |string|
iv_sourcerepository = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
LOOP AT lo_result->get_successfulversions( ) into ls_row.
lv_key = ls_row-key.
lo_value = ls_row-value.
IF lo_value IS NOT INITIAL.
lv_string = lo_value->get_revision( ).
lv_packageversionstatus = lo_value->get_status( ).
ENDIF.
ENDLOOP.
LOOP AT lo_result->get_failedversions( ) into ls_row_1.
lv_key = ls_row_1-key.
lo_value_1 = ls_row_1-value.
IF lo_value_1 IS NOT INITIAL.
lv_packageversionerrorcode = lo_value_1->get_errorcode( ).
lv_errormessage = lo_value_1->get_errormessage( ).
ENDIF.
ENDLOOP.
ENDIF.