|
| 1 | +// smithy-typescript generated code |
| 2 | +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; |
| 3 | +import { getSerdePlugin } from "@smithy/middleware-serde"; |
| 4 | +import { Command as $Command } from "@smithy/smithy-client"; |
| 5 | +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; |
| 6 | + |
| 7 | +import { CodeartifactClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CodeartifactClient"; |
| 8 | +import { commonParams } from "../endpoint/EndpointParameters"; |
| 9 | +import { CreatePackageGroupRequest, CreatePackageGroupResult } from "../models/models_0"; |
| 10 | +import { de_CreatePackageGroupCommand, se_CreatePackageGroupCommand } from "../protocols/Aws_restJson1"; |
| 11 | + |
| 12 | +/** |
| 13 | + * @public |
| 14 | + */ |
| 15 | +export { __MetadataBearer, $Command }; |
| 16 | +/** |
| 17 | + * @public |
| 18 | + * |
| 19 | + * The input for {@link CreatePackageGroupCommand}. |
| 20 | + */ |
| 21 | +export interface CreatePackageGroupCommandInput extends CreatePackageGroupRequest {} |
| 22 | +/** |
| 23 | + * @public |
| 24 | + * |
| 25 | + * The output of {@link CreatePackageGroupCommand}. |
| 26 | + */ |
| 27 | +export interface CreatePackageGroupCommandOutput extends CreatePackageGroupResult, __MetadataBearer {} |
| 28 | + |
| 29 | +/** |
| 30 | + * <p> |
| 31 | + * Creates a package group. For more information about creating package groups, including example CLI commands, see <a href="https://docs.aws.amazon.com/codeartifact/latest/ug/create-package-group.html">Create a package group</a> in the <i>CodeArtifact User Guide</i>. |
| 32 | + * </p> |
| 33 | + * @example |
| 34 | + * Use a bare-bones client and the command you need to make an API call. |
| 35 | + * ```javascript |
| 36 | + * import { CodeartifactClient, CreatePackageGroupCommand } from "@aws-sdk/client-codeartifact"; // ES Modules import |
| 37 | + * // const { CodeartifactClient, CreatePackageGroupCommand } = require("@aws-sdk/client-codeartifact"); // CommonJS import |
| 38 | + * const client = new CodeartifactClient(config); |
| 39 | + * const input = { // CreatePackageGroupRequest |
| 40 | + * domain: "STRING_VALUE", // required |
| 41 | + * domainOwner: "STRING_VALUE", |
| 42 | + * packageGroup: "STRING_VALUE", // required |
| 43 | + * contactInfo: "STRING_VALUE", |
| 44 | + * description: "STRING_VALUE", |
| 45 | + * tags: [ // TagList |
| 46 | + * { // Tag |
| 47 | + * key: "STRING_VALUE", // required |
| 48 | + * value: "STRING_VALUE", // required |
| 49 | + * }, |
| 50 | + * ], |
| 51 | + * }; |
| 52 | + * const command = new CreatePackageGroupCommand(input); |
| 53 | + * const response = await client.send(command); |
| 54 | + * // { // CreatePackageGroupResult |
| 55 | + * // packageGroup: { // PackageGroupDescription |
| 56 | + * // arn: "STRING_VALUE", |
| 57 | + * // pattern: "STRING_VALUE", |
| 58 | + * // domainName: "STRING_VALUE", |
| 59 | + * // domainOwner: "STRING_VALUE", |
| 60 | + * // createdTime: new Date("TIMESTAMP"), |
| 61 | + * // contactInfo: "STRING_VALUE", |
| 62 | + * // description: "STRING_VALUE", |
| 63 | + * // originConfiguration: { // PackageGroupOriginConfiguration |
| 64 | + * // restrictions: { // PackageGroupOriginRestrictions |
| 65 | + * // "<keys>": { // PackageGroupOriginRestriction |
| 66 | + * // mode: "ALLOW" || "ALLOW_SPECIFIC_REPOSITORIES" || "BLOCK" || "INHERIT", |
| 67 | + * // effectiveMode: "ALLOW" || "ALLOW_SPECIFIC_REPOSITORIES" || "BLOCK" || "INHERIT", |
| 68 | + * // inheritedFrom: { // PackageGroupReference |
| 69 | + * // arn: "STRING_VALUE", |
| 70 | + * // pattern: "STRING_VALUE", |
| 71 | + * // }, |
| 72 | + * // repositoriesCount: Number("long"), |
| 73 | + * // }, |
| 74 | + * // }, |
| 75 | + * // }, |
| 76 | + * // parent: { |
| 77 | + * // arn: "STRING_VALUE", |
| 78 | + * // pattern: "STRING_VALUE", |
| 79 | + * // }, |
| 80 | + * // }, |
| 81 | + * // }; |
| 82 | + * |
| 83 | + * ``` |
| 84 | + * |
| 85 | + * @param CreatePackageGroupCommandInput - {@link CreatePackageGroupCommandInput} |
| 86 | + * @returns {@link CreatePackageGroupCommandOutput} |
| 87 | + * @see {@link CreatePackageGroupCommandInput} for command's `input` shape. |
| 88 | + * @see {@link CreatePackageGroupCommandOutput} for command's `response` shape. |
| 89 | + * @see {@link CodeartifactClientResolvedConfig | config} for CodeartifactClient's `config` shape. |
| 90 | + * |
| 91 | + * @throws {@link AccessDeniedException} (client fault) |
| 92 | + * <p> |
| 93 | + * The operation did not succeed because of an unauthorized access attempt. |
| 94 | + * </p> |
| 95 | + * |
| 96 | + * @throws {@link ConflictException} (client fault) |
| 97 | + * <p> |
| 98 | + * The operation did not succeed because prerequisites are not met. |
| 99 | + * </p> |
| 100 | + * |
| 101 | + * @throws {@link InternalServerException} (server fault) |
| 102 | + * <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p> |
| 103 | + * |
| 104 | + * @throws {@link ResourceNotFoundException} (client fault) |
| 105 | + * <p> |
| 106 | + * The operation did not succeed because the resource requested is not found in the service. |
| 107 | + * </p> |
| 108 | + * |
| 109 | + * @throws {@link ServiceQuotaExceededException} (client fault) |
| 110 | + * <p> |
| 111 | + * The operation did not succeed because it would have exceeded a service limit for your account. |
| 112 | + * </p> |
| 113 | + * |
| 114 | + * @throws {@link ThrottlingException} (client fault) |
| 115 | + * <p> |
| 116 | + * The operation did not succeed because too many requests are sent to the service. |
| 117 | + * </p> |
| 118 | + * |
| 119 | + * @throws {@link ValidationException} (client fault) |
| 120 | + * <p> |
| 121 | + * The operation did not succeed because a parameter in the request was sent with an invalid value. |
| 122 | + * </p> |
| 123 | + * |
| 124 | + * @throws {@link CodeartifactServiceException} |
| 125 | + * <p>Base exception class for all service exceptions from Codeartifact service.</p> |
| 126 | + * |
| 127 | + * @public |
| 128 | + */ |
| 129 | +export class CreatePackageGroupCommand extends $Command |
| 130 | + .classBuilder< |
| 131 | + CreatePackageGroupCommandInput, |
| 132 | + CreatePackageGroupCommandOutput, |
| 133 | + CodeartifactClientResolvedConfig, |
| 134 | + ServiceInputTypes, |
| 135 | + ServiceOutputTypes |
| 136 | + >() |
| 137 | + .ep({ |
| 138 | + ...commonParams, |
| 139 | + }) |
| 140 | + .m(function (this: any, Command: any, cs: any, config: CodeartifactClientResolvedConfig, o: any) { |
| 141 | + return [ |
| 142 | + getSerdePlugin(config, this.serialize, this.deserialize), |
| 143 | + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), |
| 144 | + ]; |
| 145 | + }) |
| 146 | + .s("CodeArtifactControlPlaneService", "CreatePackageGroup", {}) |
| 147 | + .n("CodeartifactClient", "CreatePackageGroupCommand") |
| 148 | + .f(void 0, void 0) |
| 149 | + .ser(se_CreatePackageGroupCommand) |
| 150 | + .de(de_CreatePackageGroupCommand) |
| 151 | + .build() {} |
0 commit comments