[ aws . codeartifact ]

put-package-origin-configuration

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 .

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

See also: AWS API Documentation

See ‘aws help’ for descriptions of global parameters.

Synopsis

  put-package-origin-configuration
--domain <value>
[--domain-owner <value>]
--repository <value>
--format <value>
[--namespace <value>]
--package <value>
--restrictions <value>
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]

Options

--domain (string)

The name of the domain that contains the repository that contains the package.

--domain-owner (string)

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

--repository (string)

The name of the repository that contains the package.

--format (string)

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

Possible values:

  • npm

  • pypi

  • maven

  • nuget

--namespace (string)

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 is its groupId .

  • The namespace of an npm package is its scope .

  • Python and NuGet packages do not contain a corresponding component, packages of those formats do not have a namespace.

--package (string)

The name of the package to be updated.

--restrictions (structure)

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.

publish -> (string)

The package origin configuration that determines if new versions of the package can be published directly to the repository.

upstream -> (string)

The package origin configuration that determines if new versions of the package can be added to the repository from an external connection or upstream source.

Shorthand Syntax:

publish=string,upstream=string

JSON Syntax:

{
  "publish": "ALLOW"|"BLOCK",
  "upstream": "ALLOW"|"BLOCK"
}

--cli-input-json | --cli-input-yaml (string) Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command. The generated JSON skeleton is not stable between versions of the AWS CLI and there are no backwards compatibility guarantees in the JSON skeleton generated.

See ‘aws help’ for descriptions of global parameters.

Output

originConfiguration -> (structure)

A PackageOriginConfiguration object that describes the origin configuration set for the package. It contains a PackageOriginRestrictions object that describes how new versions of the package can be introduced to the repository.

restrictions -> (structure)

A PackageOriginRestrictions object that contains information about the upstream and publish package origin configuration for the package.

publish -> (string)

The package origin configuration that determines if new versions of the package can be published directly to the repository.

upstream -> (string)

The package origin configuration that determines if new versions of the package can be added to the repository from an external connection or upstream source.