/AWS1/IF_ART=>LISTPACKAGES()¶
About ListPackages¶
Returns a list of PackageSummary objects for packages in a repository that match the request parameters.
Method Signature¶
METHODS /AWS1/IF_ART~LISTPACKAGES
IMPORTING
!IV_DOMAIN TYPE /AWS1/ARTDOMAINNAME OPTIONAL
!IV_DOMAINOWNER TYPE /AWS1/ARTACCOUNTID OPTIONAL
!IV_REPOSITORY TYPE /AWS1/ARTREPOSITORYNAME OPTIONAL
!IV_FORMAT TYPE /AWS1/ARTPACKAGEFORMAT OPTIONAL
!IV_NAMESPACE TYPE /AWS1/ARTPACKAGENAMESPACE OPTIONAL
!IV_PACKAGEPREFIX TYPE /AWS1/ARTPACKAGENAME OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/ARTLISTPACKAGESMAXRSLTS OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/ARTPAGINATIONTOKEN OPTIONAL
!IV_PUBLISH TYPE /AWS1/ARTALLOWPUBLISH OPTIONAL
!IV_UPSTREAM TYPE /AWS1/ARTALLOWUPSTREAM OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_artlistpackagesresult
RAISING
/AWS1/CX_ARTACCESSDENIEDEX
/AWS1/CX_ARTINTERNALSERVEREX
/AWS1/CX_ARTRESOURCENOTFOUNDEX
/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 repository that contains the requested packages.
iv_repository TYPE /AWS1/ARTREPOSITORYNAME /AWS1/ARTREPOSITORYNAME¶
The name of the repository that contains the requested packages.
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_format TYPE /AWS1/ARTPACKAGEFORMAT /AWS1/ARTPACKAGEFORMAT¶
The format used to filter requested packages. Only packages from the provided format will be returned.
iv_namespace TYPE /AWS1/ARTPACKAGENAMESPACE /AWS1/ARTPACKAGENAMESPACE¶
The namespace prefix used to filter requested packages. Only packages with a namespace that starts with the provided string value are returned. Note that although this option is called
--namespaceand not--namespace-prefix, it has prefix-matching behavior.Each package format uses namespace as follows:
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.
iv_packageprefix TYPE /AWS1/ARTPACKAGENAME /AWS1/ARTPACKAGENAME¶
A prefix used to filter requested packages. Only packages with names that start with
packagePrefixare returned.
iv_maxresults TYPE /AWS1/ARTLISTPACKAGESMAXRSLTS /AWS1/ARTLISTPACKAGESMAXRSLTS¶
The maximum number of results to return per page.
iv_nexttoken TYPE /AWS1/ARTPAGINATIONTOKEN /AWS1/ARTPAGINATIONTOKEN¶
The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
iv_publish TYPE /AWS1/ARTALLOWPUBLISH /AWS1/ARTALLOWPUBLISH¶
The value of the
Publishpackage origin control restriction used to filter requested packages. Only packages with the provided restriction are returned. For more information, see PackageOriginRestrictions.
iv_upstream TYPE /AWS1/ARTALLOWUPSTREAM /AWS1/ARTALLOWUPSTREAM¶
The value of the
Upstreampackage origin control restriction used to filter requested packages. Only packages with the provided restriction are returned. For more information, see PackageOriginRestrictions.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_artlistpackagesresult /AWS1/CL_ARTLISTPACKAGESRESULT¶
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->listpackages(
iv_domain = |string|
iv_domainowner = |string|
iv_format = |string|
iv_maxresults = 123
iv_namespace = |string|
iv_nexttoken = |string|
iv_packageprefix = |string|
iv_publish = |string|
iv_repository = |string|
iv_upstream = |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_packages( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_packageformat = lo_row_1->get_format( ).
lv_packagenamespace = lo_row_1->get_namespace( ).
lv_packagename = lo_row_1->get_package( ).
lo_packageoriginconfigurat = lo_row_1->get_originconfiguration( ).
IF lo_packageoriginconfigurat IS NOT INITIAL.
lo_packageoriginrestrictio = lo_packageoriginconfigurat->get_restrictions( ).
IF lo_packageoriginrestrictio IS NOT INITIAL.
lv_allowpublish = lo_packageoriginrestrictio->get_publish( ).
lv_allowupstream = lo_packageoriginrestrictio->get_upstream( ).
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
lv_paginationtoken = lo_result->get_nexttoken( ).
ENDIF.