/AWS1/IF_ART=>PUBLISHPACKAGEVERSION()¶
About PublishPackageVersion¶
Creates a new package version containing one or more assets (or files).
The unfinished flag can be used to keep the package version in the
Unfinished state until all of its assets have been uploaded (see Package version status in the CodeArtifact user guide). To set
the package version’s status to Published, omit the unfinished flag
when uploading the final asset, or set the status using UpdatePackageVersionStatus. Once a package version’s status is set to
Published, it cannot change back to Unfinished.
Only generic packages can be published using this API. For more information, see Using generic packages in the CodeArtifact User Guide.
Method Signature¶
METHODS /AWS1/IF_ART~PUBLISHPACKAGEVERSION
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_PACKAGE TYPE /AWS1/ARTPACKAGENAME OPTIONAL
!IV_PACKAGEVERSION TYPE /AWS1/ARTPACKAGEVERSION OPTIONAL
!IV_ASSETCONTENT TYPE /AWS1/ARTASSET OPTIONAL
!IV_ASSETNAME TYPE /AWS1/ARTASSETNAME OPTIONAL
!IV_ASSETSHA256 TYPE /AWS1/ARTSHA256 OPTIONAL
!IV_UNFINISHED TYPE /AWS1/ARTBOOLEANOPTIONAL OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_artpubpackagevrsrslt
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 repository that contains the package version to publish.
iv_repository TYPE /AWS1/ARTREPOSITORYNAME /AWS1/ARTREPOSITORYNAME¶
The name of the repository that the package version will be published to.
iv_format TYPE /AWS1/ARTPACKAGEFORMAT /AWS1/ARTPACKAGEFORMAT¶
A format that specifies the type of the package version with the requested asset file.
The only supported value is
generic.
iv_package TYPE /AWS1/ARTPACKAGENAME /AWS1/ARTPACKAGENAME¶
The name of the package version to publish.
iv_packageversion TYPE /AWS1/ARTPACKAGEVERSION /AWS1/ARTPACKAGEVERSION¶
The package version to publish (for example,
3.5.2).
iv_assetcontent TYPE /AWS1/ARTASSET /AWS1/ARTASSET¶
The content of the asset to publish.
iv_assetname TYPE /AWS1/ARTASSETNAME /AWS1/ARTASSETNAME¶
The name of the asset to publish. Asset names can include Unicode letters and numbers, and the following special characters:
~ ! @ ^ & ( ) -_ + [ ] { } ; , .
iv_assetsha256 TYPE /AWS1/ARTSHA256 /AWS1/ARTSHA256¶
The SHA256 hash of the
assetContentto publish. This value must be calculated by the caller and provided with the request (see Publishing a generic package in the CodeArtifact User Guide).This value is used as an integrity check to verify that the
assetContenthas not changed after it was originally sent.
Optional arguments:¶
iv_domainowner TYPE /AWS1/ARTACCOUNTID /AWS1/ARTACCOUNTID¶
The 12-digit account number of the AWS account that owns the domain. It does not include dashes or spaces.
iv_namespace TYPE /AWS1/ARTPACKAGENAMESPACE /AWS1/ARTPACKAGENAMESPACE¶
The namespace of the package version to publish.
iv_unfinished TYPE /AWS1/ARTBOOLEANOPTIONAL /AWS1/ARTBOOLEANOPTIONAL¶
Specifies whether the package version should remain in the
unfinishedstate. If omitted, the package version status will be set toPublished(see Package version status in the CodeArtifact User Guide).Valid values:
unfinished
RETURNING¶
oo_output TYPE REF TO /aws1/cl_artpubpackagevrsrslt /AWS1/CL_ARTPUBPACKAGEVRSRSLT¶
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->publishpackageversion(
iv_assetcontent = '5347567362473873563239796247513D'
iv_assetname = |string|
iv_assetsha256 = |string|
iv_domain = |string|
iv_domainowner = |string|
iv_format = |string|
iv_namespace = |string|
iv_package = |string|
iv_packageversion = |string|
iv_repository = |string|
iv_unfinished = ABAP_TRUE
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_packageformat = lo_result->get_format( ).
lv_packagenamespace = lo_result->get_namespace( ).
lv_packagename = lo_result->get_package( ).
lv_packageversion = lo_result->get_version( ).
lv_packageversionrevision = lo_result->get_versionrevision( ).
lv_packageversionstatus = lo_result->get_status( ).
lo_assetsummary = lo_result->get_asset( ).
IF lo_assetsummary IS NOT INITIAL.
lv_assetname = lo_assetsummary->get_name( ).
lv_longoptional = lo_assetsummary->get_size( ).
LOOP AT lo_assetsummary->get_hashes( ) into ls_row.
lv_key = ls_row-key.
lo_value = ls_row-value.
IF lo_value IS NOT INITIAL.
lv_hashvalue = lo_value->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.