Skip to content

Commit 364630f

Browse files
author
awstools
committed
feat(client-codeartifact): This release adds Package groups to CodeArtifact so you can more conveniently configure package origin controls for multiple packages.
1 parent 404fe3d commit 364630f

27 files changed

+6196
-835
lines changed

clients/client-codeartifact/README.md

Lines changed: 149 additions & 6 deletions
Large diffs are not rendered by default.

clients/client-codeartifact/src/Codeartifact.ts

Lines changed: 299 additions & 6 deletions
Large diffs are not rendered by default.

clients/client-codeartifact/src/CodeartifactClient.ts

Lines changed: 117 additions & 6 deletions
Large diffs are not rendered by default.
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
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() {}

clients/client-codeartifact/src/commands/DeletePackageCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export interface DeletePackageCommandOutput extends DeletePackageResult, __Metad
2828

2929
/**
3030
* <p>Deletes a package and all associated package versions. A deleted package cannot be restored. To delete one or more package versions, use the
31-
* <a href="https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_DeletePackageVersions.html">DeletePackageVersions</a> API.</p>
31+
* <a href="https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_DeletePackageVersions.html">DeletePackageVersions</a> API.</p>
3232
* @example
3333
* Use a bare-bones client and the command you need to make an API call.
3434
* ```javascript
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
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 { DeletePackageGroupRequest, DeletePackageGroupResult } from "../models/models_0";
10+
import { de_DeletePackageGroupCommand, se_DeletePackageGroupCommand } from "../protocols/Aws_restJson1";
11+
12+
/**
13+
* @public
14+
*/
15+
export { __MetadataBearer, $Command };
16+
/**
17+
* @public
18+
*
19+
* The input for {@link DeletePackageGroupCommand}.
20+
*/
21+
export interface DeletePackageGroupCommandInput extends DeletePackageGroupRequest {}
22+
/**
23+
* @public
24+
*
25+
* The output of {@link DeletePackageGroupCommand}.
26+
*/
27+
export interface DeletePackageGroupCommandOutput extends DeletePackageGroupResult, __MetadataBearer {}
28+
29+
/**
30+
* <p>Deletes a package group.
31+
* Deleting a package group does not delete packages or package versions associated with the package group.
32+
* When a package group is deleted, the direct child package groups will become children of the package
33+
* group's direct parent package group. Therefore, if any of the child groups are inheriting any settings
34+
* from the parent, those settings could change.</p>
35+
* @example
36+
* Use a bare-bones client and the command you need to make an API call.
37+
* ```javascript
38+
* import { CodeartifactClient, DeletePackageGroupCommand } from "@aws-sdk/client-codeartifact"; // ES Modules import
39+
* // const { CodeartifactClient, DeletePackageGroupCommand } = require("@aws-sdk/client-codeartifact"); // CommonJS import
40+
* const client = new CodeartifactClient(config);
41+
* const input = { // DeletePackageGroupRequest
42+
* domain: "STRING_VALUE", // required
43+
* domainOwner: "STRING_VALUE",
44+
* packageGroup: "STRING_VALUE", // required
45+
* };
46+
* const command = new DeletePackageGroupCommand(input);
47+
* const response = await client.send(command);
48+
* // { // DeletePackageGroupResult
49+
* // packageGroup: { // PackageGroupDescription
50+
* // arn: "STRING_VALUE",
51+
* // pattern: "STRING_VALUE",
52+
* // domainName: "STRING_VALUE",
53+
* // domainOwner: "STRING_VALUE",
54+
* // createdTime: new Date("TIMESTAMP"),
55+
* // contactInfo: "STRING_VALUE",
56+
* // description: "STRING_VALUE",
57+
* // originConfiguration: { // PackageGroupOriginConfiguration
58+
* // restrictions: { // PackageGroupOriginRestrictions
59+
* // "<keys>": { // PackageGroupOriginRestriction
60+
* // mode: "ALLOW" || "ALLOW_SPECIFIC_REPOSITORIES" || "BLOCK" || "INHERIT",
61+
* // effectiveMode: "ALLOW" || "ALLOW_SPECIFIC_REPOSITORIES" || "BLOCK" || "INHERIT",
62+
* // inheritedFrom: { // PackageGroupReference
63+
* // arn: "STRING_VALUE",
64+
* // pattern: "STRING_VALUE",
65+
* // },
66+
* // repositoriesCount: Number("long"),
67+
* // },
68+
* // },
69+
* // },
70+
* // parent: {
71+
* // arn: "STRING_VALUE",
72+
* // pattern: "STRING_VALUE",
73+
* // },
74+
* // },
75+
* // };
76+
*
77+
* ```
78+
*
79+
* @param DeletePackageGroupCommandInput - {@link DeletePackageGroupCommandInput}
80+
* @returns {@link DeletePackageGroupCommandOutput}
81+
* @see {@link DeletePackageGroupCommandInput} for command's `input` shape.
82+
* @see {@link DeletePackageGroupCommandOutput} for command's `response` shape.
83+
* @see {@link CodeartifactClientResolvedConfig | config} for CodeartifactClient's `config` shape.
84+
*
85+
* @throws {@link AccessDeniedException} (client fault)
86+
* <p>
87+
* The operation did not succeed because of an unauthorized access attempt.
88+
* </p>
89+
*
90+
* @throws {@link ConflictException} (client fault)
91+
* <p>
92+
* The operation did not succeed because prerequisites are not met.
93+
* </p>
94+
*
95+
* @throws {@link InternalServerException} (server fault)
96+
* <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
97+
*
98+
* @throws {@link ResourceNotFoundException} (client fault)
99+
* <p>
100+
* The operation did not succeed because the resource requested is not found in the service.
101+
* </p>
102+
*
103+
* @throws {@link ServiceQuotaExceededException} (client fault)
104+
* <p>
105+
* The operation did not succeed because it would have exceeded a service limit for your account.
106+
* </p>
107+
*
108+
* @throws {@link ThrottlingException} (client fault)
109+
* <p>
110+
* The operation did not succeed because too many requests are sent to the service.
111+
* </p>
112+
*
113+
* @throws {@link ValidationException} (client fault)
114+
* <p>
115+
* The operation did not succeed because a parameter in the request was sent with an invalid value.
116+
* </p>
117+
*
118+
* @throws {@link CodeartifactServiceException}
119+
* <p>Base exception class for all service exceptions from Codeartifact service.</p>
120+
*
121+
* @public
122+
*/
123+
export class DeletePackageGroupCommand extends $Command
124+
.classBuilder<
125+
DeletePackageGroupCommandInput,
126+
DeletePackageGroupCommandOutput,
127+
CodeartifactClientResolvedConfig,
128+
ServiceInputTypes,
129+
ServiceOutputTypes
130+
>()
131+
.ep({
132+
...commonParams,
133+
})
134+
.m(function (this: any, Command: any, cs: any, config: CodeartifactClientResolvedConfig, o: any) {
135+
return [
136+
getSerdePlugin(config, this.serialize, this.deserialize),
137+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
138+
];
139+
})
140+
.s("CodeArtifactControlPlaneService", "DeletePackageGroup", {})
141+
.n("CodeartifactClient", "DeletePackageGroupCommand")
142+
.f(void 0, void 0)
143+
.ser(se_DeletePackageGroupCommand)
144+
.de(de_DeletePackageGroupCommand)
145+
.build() {}

0 commit comments

Comments
 (0)