import { Command as $Command } from "@smithy/smithy-client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { CodeartifactClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CodeartifactClient"; import type { PutPackageOriginConfigurationRequest, PutPackageOriginConfigurationResult } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link PutPackageOriginConfigurationCommand}. */ export interface PutPackageOriginConfigurationCommandInput extends PutPackageOriginConfigurationRequest { } /** * @public * * The output of {@link PutPackageOriginConfigurationCommand}. */ export interface PutPackageOriginConfigurationCommandOutput extends PutPackageOriginConfigurationResult, __MetadataBearer { } declare const PutPackageOriginConfigurationCommand_base: { new (input: PutPackageOriginConfigurationCommandInput): import("@smithy/smithy-client").CommandImpl; new (input: PutPackageOriginConfigurationCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

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.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CodeartifactClient, PutPackageOriginConfigurationCommand } from "@aws-sdk/client-codeartifact"; // ES Modules import * // const { CodeartifactClient, PutPackageOriginConfigurationCommand } = require("@aws-sdk/client-codeartifact"); // CommonJS import * // import type { CodeartifactClientConfig } from "@aws-sdk/client-codeartifact"; * const config = {}; // type is CodeartifactClientConfig * const client = new CodeartifactClient(config); * const input = { // PutPackageOriginConfigurationRequest * domain: "STRING_VALUE", // required * domainOwner: "STRING_VALUE", * repository: "STRING_VALUE", // required * format: "npm" || "pypi" || "maven" || "nuget" || "generic" || "ruby" || "swift" || "cargo", // required * namespace: "STRING_VALUE", * package: "STRING_VALUE", // required * restrictions: { // PackageOriginRestrictions * publish: "ALLOW" || "BLOCK", // required * upstream: "ALLOW" || "BLOCK", // required * }, * }; * const command = new PutPackageOriginConfigurationCommand(input); * const response = await client.send(command); * // { // PutPackageOriginConfigurationResult * // originConfiguration: { // PackageOriginConfiguration * // restrictions: { // PackageOriginRestrictions * // publish: "ALLOW" || "BLOCK", // required * // upstream: "ALLOW" || "BLOCK", // required * // }, * // }, * // }; * * ``` * * @param PutPackageOriginConfigurationCommandInput - {@link PutPackageOriginConfigurationCommandInput} * @returns {@link PutPackageOriginConfigurationCommandOutput} * @see {@link PutPackageOriginConfigurationCommandInput} for command's `input` shape. * @see {@link PutPackageOriginConfigurationCommandOutput} for command's `response` shape. * @see {@link CodeartifactClientResolvedConfig | config} for CodeartifactClient's `config` shape. * * @throws {@link AccessDeniedException} (client fault) *

* The operation did not succeed because of an unauthorized access attempt. *

* * @throws {@link InternalServerException} (server fault) *

The operation did not succeed because of an error that occurred inside CodeArtifact.

* * @throws {@link ResourceNotFoundException} (client fault) *

* The operation did not succeed because the resource requested is not found in the service. *

* * @throws {@link ThrottlingException} (client fault) *

* The operation did not succeed because too many requests are sent to the service. *

* * @throws {@link ValidationException} (client fault) *

* The operation did not succeed because a parameter in the request was sent with an invalid value. *

* * @throws {@link CodeartifactServiceException} *

Base exception class for all service exceptions from Codeartifact service.

* * * @public */ export declare class PutPackageOriginConfigurationCommand extends PutPackageOriginConfigurationCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: PutPackageOriginConfigurationRequest; output: PutPackageOriginConfigurationResult; }; sdk: { input: PutPackageOriginConfigurationCommandInput; output: PutPackageOriginConfigurationCommandOutput; }; }; }