Skip to content

Commit

Permalink
feat(client-codeartifact): This release adds Package groups to CodeAr…
Browse files Browse the repository at this point in the history
…tifact so you can more conveniently configure package origin controls for multiple packages.
  • Loading branch information
awstools committed Mar 21, 2024
1 parent 404fe3d commit 364630f
Show file tree
Hide file tree
Showing 27 changed files with 6,196 additions and 835 deletions.
155 changes: 149 additions & 6 deletions clients/client-codeartifact/README.md

Large diffs are not rendered by default.

305 changes: 299 additions & 6 deletions clients/client-codeartifact/src/Codeartifact.ts

Large diffs are not rendered by default.

123 changes: 117 additions & 6 deletions clients/client-codeartifact/src/CodeartifactClient.ts

Large diffs are not rendered by default.

151 changes: 151 additions & 0 deletions clients/client-codeartifact/src/commands/CreatePackageGroupCommand.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
// smithy-typescript generated code
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { CodeartifactClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CodeartifactClient";
import { commonParams } from "../endpoint/EndpointParameters";
import { CreatePackageGroupRequest, CreatePackageGroupResult } from "../models/models_0";
import { de_CreatePackageGroupCommand, se_CreatePackageGroupCommand } from "../protocols/Aws_restJson1";

/**
* @public
*/
export { __MetadataBearer, $Command };
/**
* @public
*
* The input for {@link CreatePackageGroupCommand}.
*/
export interface CreatePackageGroupCommandInput extends CreatePackageGroupRequest {}
/**
* @public
*
* The output of {@link CreatePackageGroupCommand}.
*/
export interface CreatePackageGroupCommandOutput extends CreatePackageGroupResult, __MetadataBearer {}

/**
* <p>
* 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>.
* </p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { CodeartifactClient, CreatePackageGroupCommand } from "@aws-sdk/client-codeartifact"; // ES Modules import
* // const { CodeartifactClient, CreatePackageGroupCommand } = require("@aws-sdk/client-codeartifact"); // CommonJS import
* const client = new CodeartifactClient(config);
* const input = { // CreatePackageGroupRequest
* domain: "STRING_VALUE", // required
* domainOwner: "STRING_VALUE",
* packageGroup: "STRING_VALUE", // required
* contactInfo: "STRING_VALUE",
* description: "STRING_VALUE",
* tags: [ // TagList
* { // Tag
* key: "STRING_VALUE", // required
* value: "STRING_VALUE", // required
* },
* ],
* };
* const command = new CreatePackageGroupCommand(input);
* const response = await client.send(command);
* // { // CreatePackageGroupResult
* // packageGroup: { // PackageGroupDescription
* // arn: "STRING_VALUE",
* // pattern: "STRING_VALUE",
* // domainName: "STRING_VALUE",
* // domainOwner: "STRING_VALUE",
* // createdTime: new Date("TIMESTAMP"),
* // contactInfo: "STRING_VALUE",
* // description: "STRING_VALUE",
* // originConfiguration: { // PackageGroupOriginConfiguration
* // restrictions: { // PackageGroupOriginRestrictions
* // "<keys>": { // PackageGroupOriginRestriction
* // mode: "ALLOW" || "ALLOW_SPECIFIC_REPOSITORIES" || "BLOCK" || "INHERIT",
* // effectiveMode: "ALLOW" || "ALLOW_SPECIFIC_REPOSITORIES" || "BLOCK" || "INHERIT",
* // inheritedFrom: { // PackageGroupReference
* // arn: "STRING_VALUE",
* // pattern: "STRING_VALUE",
* // },
* // repositoriesCount: Number("long"),
* // },
* // },
* // },
* // parent: {
* // arn: "STRING_VALUE",
* // pattern: "STRING_VALUE",
* // },
* // },
* // };
*
* ```
*
* @param CreatePackageGroupCommandInput - {@link CreatePackageGroupCommandInput}
* @returns {@link CreatePackageGroupCommandOutput}
* @see {@link CreatePackageGroupCommandInput} for command's `input` shape.
* @see {@link CreatePackageGroupCommandOutput} for command's `response` shape.
* @see {@link CodeartifactClientResolvedConfig | config} for CodeartifactClient's `config` shape.
*
* @throws {@link AccessDeniedException} (client fault)
* <p>
* The operation did not succeed because of an unauthorized access attempt.
* </p>
*
* @throws {@link ConflictException} (client fault)
* <p>
* The operation did not succeed because prerequisites are not met.
* </p>
*
* @throws {@link InternalServerException} (server fault)
* <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>
* The operation did not succeed because the resource requested is not found in the service.
* </p>
*
* @throws {@link ServiceQuotaExceededException} (client fault)
* <p>
* The operation did not succeed because it would have exceeded a service limit for your account.
* </p>
*
* @throws {@link ThrottlingException} (client fault)
* <p>
* The operation did not succeed because too many requests are sent to the service.
* </p>
*
* @throws {@link ValidationException} (client fault)
* <p>
* The operation did not succeed because a parameter in the request was sent with an invalid value.
* </p>
*
* @throws {@link CodeartifactServiceException}
* <p>Base exception class for all service exceptions from Codeartifact service.</p>
*
* @public
*/
export class CreatePackageGroupCommand extends $Command
.classBuilder<
CreatePackageGroupCommandInput,
CreatePackageGroupCommandOutput,
CodeartifactClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>()
.ep({
...commonParams,
})
.m(function (this: any, Command: any, cs: any, config: CodeartifactClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
})
.s("CodeArtifactControlPlaneService", "CreatePackageGroup", {})
.n("CodeartifactClient", "CreatePackageGroupCommand")
.f(void 0, void 0)
.ser(se_CreatePackageGroupCommand)
.de(de_CreatePackageGroupCommand)
.build() {}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface DeletePackageCommandOutput extends DeletePackageResult, __Metad

/**
* <p>Deletes a package and all associated package versions. A deleted package cannot be restored. To delete one or more package versions, use the
* <a href="https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_DeletePackageVersions.html">DeletePackageVersions</a> API.</p>
* <a href="https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_DeletePackageVersions.html">DeletePackageVersions</a> API.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
145 changes: 145 additions & 0 deletions clients/client-codeartifact/src/commands/DeletePackageGroupCommand.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
// smithy-typescript generated code
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { CodeartifactClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CodeartifactClient";
import { commonParams } from "../endpoint/EndpointParameters";
import { DeletePackageGroupRequest, DeletePackageGroupResult } from "../models/models_0";
import { de_DeletePackageGroupCommand, se_DeletePackageGroupCommand } from "../protocols/Aws_restJson1";

/**
* @public
*/
export { __MetadataBearer, $Command };
/**
* @public
*
* The input for {@link DeletePackageGroupCommand}.
*/
export interface DeletePackageGroupCommandInput extends DeletePackageGroupRequest {}
/**
* @public
*
* The output of {@link DeletePackageGroupCommand}.
*/
export interface DeletePackageGroupCommandOutput extends DeletePackageGroupResult, __MetadataBearer {}

/**
* <p>Deletes a package group.
* Deleting a package group does not delete packages or package versions associated with the package group.
* When a package group is deleted, the direct child package groups will become children of the package
* group's direct parent package group. Therefore, if any of the child groups are inheriting any settings
* from the parent, those settings could change.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { CodeartifactClient, DeletePackageGroupCommand } from "@aws-sdk/client-codeartifact"; // ES Modules import
* // const { CodeartifactClient, DeletePackageGroupCommand } = require("@aws-sdk/client-codeartifact"); // CommonJS import
* const client = new CodeartifactClient(config);
* const input = { // DeletePackageGroupRequest
* domain: "STRING_VALUE", // required
* domainOwner: "STRING_VALUE",
* packageGroup: "STRING_VALUE", // required
* };
* const command = new DeletePackageGroupCommand(input);
* const response = await client.send(command);
* // { // DeletePackageGroupResult
* // packageGroup: { // PackageGroupDescription
* // arn: "STRING_VALUE",
* // pattern: "STRING_VALUE",
* // domainName: "STRING_VALUE",
* // domainOwner: "STRING_VALUE",
* // createdTime: new Date("TIMESTAMP"),
* // contactInfo: "STRING_VALUE",
* // description: "STRING_VALUE",
* // originConfiguration: { // PackageGroupOriginConfiguration
* // restrictions: { // PackageGroupOriginRestrictions
* // "<keys>": { // PackageGroupOriginRestriction
* // mode: "ALLOW" || "ALLOW_SPECIFIC_REPOSITORIES" || "BLOCK" || "INHERIT",
* // effectiveMode: "ALLOW" || "ALLOW_SPECIFIC_REPOSITORIES" || "BLOCK" || "INHERIT",
* // inheritedFrom: { // PackageGroupReference
* // arn: "STRING_VALUE",
* // pattern: "STRING_VALUE",
* // },
* // repositoriesCount: Number("long"),
* // },
* // },
* // },
* // parent: {
* // arn: "STRING_VALUE",
* // pattern: "STRING_VALUE",
* // },
* // },
* // };
*
* ```
*
* @param DeletePackageGroupCommandInput - {@link DeletePackageGroupCommandInput}
* @returns {@link DeletePackageGroupCommandOutput}
* @see {@link DeletePackageGroupCommandInput} for command's `input` shape.
* @see {@link DeletePackageGroupCommandOutput} for command's `response` shape.
* @see {@link CodeartifactClientResolvedConfig | config} for CodeartifactClient's `config` shape.
*
* @throws {@link AccessDeniedException} (client fault)
* <p>
* The operation did not succeed because of an unauthorized access attempt.
* </p>
*
* @throws {@link ConflictException} (client fault)
* <p>
* The operation did not succeed because prerequisites are not met.
* </p>
*
* @throws {@link InternalServerException} (server fault)
* <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>
* The operation did not succeed because the resource requested is not found in the service.
* </p>
*
* @throws {@link ServiceQuotaExceededException} (client fault)
* <p>
* The operation did not succeed because it would have exceeded a service limit for your account.
* </p>
*
* @throws {@link ThrottlingException} (client fault)
* <p>
* The operation did not succeed because too many requests are sent to the service.
* </p>
*
* @throws {@link ValidationException} (client fault)
* <p>
* The operation did not succeed because a parameter in the request was sent with an invalid value.
* </p>
*
* @throws {@link CodeartifactServiceException}
* <p>Base exception class for all service exceptions from Codeartifact service.</p>
*
* @public
*/
export class DeletePackageGroupCommand extends $Command
.classBuilder<
DeletePackageGroupCommandInput,
DeletePackageGroupCommandOutput,
CodeartifactClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>()
.ep({
...commonParams,
})
.m(function (this: any, Command: any, cs: any, config: CodeartifactClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
})
.s("CodeArtifactControlPlaneService", "DeletePackageGroup", {})
.n("CodeartifactClient", "DeletePackageGroupCommand")
.f(void 0, void 0)
.ser(se_DeletePackageGroupCommand)
.de(de_DeletePackageGroupCommand)
.build() {}
Loading

0 comments on commit 364630f

Please sign in to comment.