Skip to content

Publish Package Version

codeartifact_publish_package_version R Documentation

Creates a new package version containing one or more assets (or files)

Description

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.

Usage

codeartifact_publish_package_version(domain, domainOwner, repository,
  format, namespace, package, packageVersion, assetContent, assetName,
  assetSHA256, unfinished)

Arguments

domain

[required] The name of the domain that contains the repository that contains the package version to publish.

domainOwner

The 12-digit account number of the AWS account that owns the domain. It does not include dashes or spaces.

repository

[required] The name of the repository that the package version will be published to.

format

[required] A format that specifies the type of the package version with the requested asset file.

The only supported value is generic.

namespace

The namespace of the package version to publish.

package

[required] The name of the package version to publish.

packageVersion

[required] The package version to publish (for example, ⁠3.5.2⁠).

assetContent

[required] The content of the asset to publish.

assetName

[required] The name of the asset to publish. Asset names can include Unicode letters and numbers, and the following special characters: ⁠~ ! @ ^ & ( ) - ` _ + [ ] { } ; , . `⁠

[ ]: R:%20

assetSHA256

[required] The SHA256 hash of the assetContent to 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 assetContent has not changed after it was originally sent.

unfinished

Specifies whether the package version should remain in the unfinished state. If omitted, the package version status will be set to Published (see Package version status in the CodeArtifact User Guide).

Valid values: unfinished

Value

A list with the following syntax:

list(
  format = "npm"|"pypi"|"maven"|"nuget"|"generic"|"ruby"|"swift"|"cargo",
  namespace = "string",
  package = "string",
  version = "string",
  versionRevision = "string",
  status = "Published"|"Unfinished"|"Unlisted"|"Archived"|"Disposed"|"Deleted",
  asset = list(
    name = "string",
    size = 123,
    hashes = list(
      "string"
    )
  )
)

Request syntax

svc$publish_package_version(
  domain = "string",
  domainOwner = "string",
  repository = "string",
  format = "npm"|"pypi"|"maven"|"nuget"|"generic"|"ruby"|"swift"|"cargo",
  namespace = "string",
  package = "string",
  packageVersion = "string",
  assetContent = raw,
  assetName = "string",
  assetSHA256 = "string",
  unfinished = TRUE|FALSE
)