Skip to content

Put Package Origin Configuration

codeartifact_put_package_origin_configuration R Documentation

Sets the package origin configuration for a package

Description

Sets the package origin configuration for a package.

The package origin configuration determines how new versions of a package can be added to a repository. You can allow or block direct publishing of new package versions, or ingestion and retaining of new package versions from an external connection or upstream source. For more information about package origin controls and configuration, see Editing package origin controls in the CodeArtifact User Guide.

put_package_origin_configuration can be called on a package that doesn't yet exist in the repository. When called on a package that does not exist, a package is created in the repository with no versions and the requested restrictions are set on the package. This can be used to preemptively block ingesting or retaining any versions from external connections or upstream repositories, or to block publishing any versions of the package into the repository before connecting any package managers or publishers to the repository.

Usage

codeartifact_put_package_origin_configuration(domain, domainOwner,
  repository, format, namespace, package, restrictions)

Arguments

domain

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

domainOwner

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

repository

[required] The name of the repository that contains the package.

format

[required] A format that specifies the type of the package to be updated.

namespace

The namespace of the package to be updated. The package component that specifies its namespace depends on its type. For example:

  • 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.

package

[required] The name of the package to be updated.

restrictions

[required] A PackageOriginRestrictions object that contains information about the upstream and publish package origin restrictions. The upstream restriction determines if new package versions can be ingested or retained from external connections or upstream repositories. The publish restriction determines if new package versions can be published directly to the repository.

You must include both the desired upstream and publish restrictions.

Value

A list with the following syntax:

list(
  originConfiguration = list(
    restrictions = list(
      publish = "ALLOW"|"BLOCK",
      upstream = "ALLOW"|"BLOCK"
    )
  )
)

Request syntax

svc$put_package_origin_configuration(
  domain = "string",
  domainOwner = "string",
  repository = "string",
  format = "npm"|"pypi"|"maven"|"nuget"|"generic"|"ruby"|"swift"|"cargo",
  namespace = "string",
  package = "string",
  restrictions = list(
    publish = "ALLOW"|"BLOCK",
    upstream = "ALLOW"|"BLOCK"
  )
)