Skip to content

Commit 5c0fbe3

Browse files
author
awstools
committed
feat(client-artifact): Add support for listing active customer agreements for the calling AWS Account.
1 parent 056dae2 commit 5c0fbe3

File tree

14 files changed

+779
-93
lines changed

14 files changed

+779
-93
lines changed

clients/client-artifact/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,14 @@ GetTermForReport
234234

235235
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/artifact/command/GetTermForReportCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-artifact/Interface/GetTermForReportCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-artifact/Interface/GetTermForReportCommandOutput/)
236236

237+
</details>
238+
<details>
239+
<summary>
240+
ListCustomerAgreements
241+
</summary>
242+
243+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/artifact/command/ListCustomerAgreementsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-artifact/Interface/ListCustomerAgreementsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-artifact/Interface/ListCustomerAgreementsCommandOutput/)
244+
237245
</details>
238246
<details>
239247
<summary>

clients/client-artifact/src/Artifact.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ import {
1919
GetTermForReportCommandInput,
2020
GetTermForReportCommandOutput,
2121
} from "./commands/GetTermForReportCommand";
22+
import {
23+
ListCustomerAgreementsCommand,
24+
ListCustomerAgreementsCommandInput,
25+
ListCustomerAgreementsCommandOutput,
26+
} from "./commands/ListCustomerAgreementsCommand";
2227
import { ListReportsCommand, ListReportsCommandInput, ListReportsCommandOutput } from "./commands/ListReportsCommand";
2328
import {
2429
PutAccountSettingsCommand,
@@ -31,6 +36,7 @@ const commands = {
3136
GetReportCommand,
3237
GetReportMetadataCommand,
3338
GetTermForReportCommand,
39+
ListCustomerAgreementsCommand,
3440
ListReportsCommand,
3541
PutAccountSettingsCommand,
3642
};
@@ -99,6 +105,24 @@ export interface Artifact {
99105
cb: (err: any, data?: GetTermForReportCommandOutput) => void
100106
): void;
101107

108+
/**
109+
* @see {@link ListCustomerAgreementsCommand}
110+
*/
111+
listCustomerAgreements(): Promise<ListCustomerAgreementsCommandOutput>;
112+
listCustomerAgreements(
113+
args: ListCustomerAgreementsCommandInput,
114+
options?: __HttpHandlerOptions
115+
): Promise<ListCustomerAgreementsCommandOutput>;
116+
listCustomerAgreements(
117+
args: ListCustomerAgreementsCommandInput,
118+
cb: (err: any, data?: ListCustomerAgreementsCommandOutput) => void
119+
): void;
120+
listCustomerAgreements(
121+
args: ListCustomerAgreementsCommandInput,
122+
options: __HttpHandlerOptions,
123+
cb: (err: any, data?: ListCustomerAgreementsCommandOutput) => void
124+
): void;
125+
102126
/**
103127
* @see {@link ListReportsCommand}
104128
*/

clients/client-artifact/src/ArtifactClient.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ import { GetAccountSettingsCommandInput, GetAccountSettingsCommandOutput } from
5757
import { GetReportCommandInput, GetReportCommandOutput } from "./commands/GetReportCommand";
5858
import { GetReportMetadataCommandInput, GetReportMetadataCommandOutput } from "./commands/GetReportMetadataCommand";
5959
import { GetTermForReportCommandInput, GetTermForReportCommandOutput } from "./commands/GetTermForReportCommand";
60+
import {
61+
ListCustomerAgreementsCommandInput,
62+
ListCustomerAgreementsCommandOutput,
63+
} from "./commands/ListCustomerAgreementsCommand";
6064
import { ListReportsCommandInput, ListReportsCommandOutput } from "./commands/ListReportsCommand";
6165
import { PutAccountSettingsCommandInput, PutAccountSettingsCommandOutput } from "./commands/PutAccountSettingsCommand";
6266
import {
@@ -78,6 +82,7 @@ export type ServiceInputTypes =
7882
| GetReportCommandInput
7983
| GetReportMetadataCommandInput
8084
| GetTermForReportCommandInput
85+
| ListCustomerAgreementsCommandInput
8186
| ListReportsCommandInput
8287
| PutAccountSettingsCommandInput;
8388

@@ -89,6 +94,7 @@ export type ServiceOutputTypes =
8994
| GetReportCommandOutput
9095
| GetReportMetadataCommandOutput
9196
| GetTermForReportCommandOutput
97+
| ListCustomerAgreementsCommandOutput
9298
| ListReportsCommandOutput
9399
| PutAccountSettingsCommandOutput;
94100

clients/client-artifact/src/commands/GetAccountSettingsCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export interface GetAccountSettingsCommandOutput extends GetAccountSettingsRespo
4040
* const response = await client.send(command);
4141
* // { // GetAccountSettingsResponse
4242
* // accountSettings: { // AccountSettings
43-
* // notificationSubscriptionStatus: "STRING_VALUE",
43+
* // notificationSubscriptionStatus: "SUBSCRIBED" || "NOT_SUBSCRIBED",
4444
* // },
4545
* // };
4646
*

clients/client-artifact/src/commands/GetReportMetadataCommand.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,17 @@ export interface GetReportMetadataCommandOutput extends GetReportMetadataRespons
5151
* // createdAt: new Date("TIMESTAMP"),
5252
* // lastModifiedAt: new Date("TIMESTAMP"),
5353
* // deletedAt: new Date("TIMESTAMP"),
54-
* // state: "STRING_VALUE",
54+
* // state: "PUBLISHED" || "UNPUBLISHED",
5555
* // arn: "STRING_VALUE",
5656
* // series: "STRING_VALUE",
5757
* // category: "STRING_VALUE",
5858
* // companyName: "STRING_VALUE",
5959
* // productName: "STRING_VALUE",
6060
* // termArn: "STRING_VALUE",
6161
* // version: Number("long"),
62-
* // acceptanceType: "STRING_VALUE",
62+
* // acceptanceType: "PASSTHROUGH" || "EXPLICIT",
6363
* // sequenceNumber: Number("long"),
64-
* // uploadState: "STRING_VALUE",
64+
* // uploadState: "PROCESSING" || "COMPLETE" || "FAILED" || "FAULT",
6565
* // statusMessage: "STRING_VALUE",
6666
* // },
6767
* // };
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
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 { ArtifactClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ArtifactClient";
8+
import { commonParams } from "../endpoint/EndpointParameters";
9+
import { ListCustomerAgreementsRequest, ListCustomerAgreementsResponse } from "../models/models_0";
10+
import { de_ListCustomerAgreementsCommand, se_ListCustomerAgreementsCommand } from "../protocols/Aws_restJson1";
11+
12+
/**
13+
* @public
14+
*/
15+
export type { __MetadataBearer };
16+
export { $Command };
17+
/**
18+
* @public
19+
*
20+
* The input for {@link ListCustomerAgreementsCommand}.
21+
*/
22+
export interface ListCustomerAgreementsCommandInput extends ListCustomerAgreementsRequest {}
23+
/**
24+
* @public
25+
*
26+
* The output of {@link ListCustomerAgreementsCommand}.
27+
*/
28+
export interface ListCustomerAgreementsCommandOutput extends ListCustomerAgreementsResponse, __MetadataBearer {}
29+
30+
/**
31+
* <p>List active customer-agreements applicable to calling identity.</p>
32+
* @example
33+
* Use a bare-bones client and the command you need to make an API call.
34+
* ```javascript
35+
* import { ArtifactClient, ListCustomerAgreementsCommand } from "@aws-sdk/client-artifact"; // ES Modules import
36+
* // const { ArtifactClient, ListCustomerAgreementsCommand } = require("@aws-sdk/client-artifact"); // CommonJS import
37+
* const client = new ArtifactClient(config);
38+
* const input = { // ListCustomerAgreementsRequest
39+
* maxResults: Number("int"),
40+
* nextToken: "STRING_VALUE",
41+
* };
42+
* const command = new ListCustomerAgreementsCommand(input);
43+
* const response = await client.send(command);
44+
* // { // ListCustomerAgreementsResponse
45+
* // customerAgreements: [ // CustomerAgreementList // required
46+
* // { // CustomerAgreementSummary
47+
* // name: "STRING_VALUE",
48+
* // arn: "STRING_VALUE",
49+
* // id: "STRING_VALUE",
50+
* // agreementArn: "STRING_VALUE",
51+
* // awsAccountId: "STRING_VALUE",
52+
* // organizationArn: "STRING_VALUE",
53+
* // effectiveStart: new Date("TIMESTAMP"),
54+
* // effectiveEnd: new Date("TIMESTAMP"),
55+
* // state: "ACTIVE" || "CUSTOMER_TERMINATED" || "AWS_TERMINATED",
56+
* // description: "STRING_VALUE",
57+
* // acceptanceTerms: [ // AgreementTerms
58+
* // "STRING_VALUE",
59+
* // ],
60+
* // terminateTerms: [
61+
* // "STRING_VALUE",
62+
* // ],
63+
* // type: "CUSTOM" || "DEFAULT" || "MODIFIED",
64+
* // },
65+
* // ],
66+
* // nextToken: "STRING_VALUE",
67+
* // };
68+
*
69+
* ```
70+
*
71+
* @param ListCustomerAgreementsCommandInput - {@link ListCustomerAgreementsCommandInput}
72+
* @returns {@link ListCustomerAgreementsCommandOutput}
73+
* @see {@link ListCustomerAgreementsCommandInput} for command's `input` shape.
74+
* @see {@link ListCustomerAgreementsCommandOutput} for command's `response` shape.
75+
* @see {@link ArtifactClientResolvedConfig | config} for ArtifactClient's `config` shape.
76+
*
77+
* @throws {@link AccessDeniedException} (client fault)
78+
* <p>User does not have sufficient access to perform this action.</p>
79+
*
80+
* @throws {@link InternalServerException} (server fault)
81+
* <p>An unknown server exception has occurred.</p>
82+
*
83+
* @throws {@link ThrottlingException} (client fault)
84+
* <p>Request was denied due to request throttling.</p>
85+
*
86+
* @throws {@link ValidationException} (client fault)
87+
* <p>Request fails to satisfy the constraints specified by an AWS service.</p>
88+
*
89+
* @throws {@link ArtifactServiceException}
90+
* <p>Base exception class for all service exceptions from Artifact service.</p>
91+
*
92+
* @public
93+
*/
94+
export class ListCustomerAgreementsCommand extends $Command
95+
.classBuilder<
96+
ListCustomerAgreementsCommandInput,
97+
ListCustomerAgreementsCommandOutput,
98+
ArtifactClientResolvedConfig,
99+
ServiceInputTypes,
100+
ServiceOutputTypes
101+
>()
102+
.ep(commonParams)
103+
.m(function (this: any, Command: any, cs: any, config: ArtifactClientResolvedConfig, o: any) {
104+
return [
105+
getSerdePlugin(config, this.serialize, this.deserialize),
106+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
107+
];
108+
})
109+
.s("Artifact", "ListCustomerAgreements", {})
110+
.n("ArtifactClient", "ListCustomerAgreementsCommand")
111+
.f(void 0, void 0)
112+
.ser(se_ListCustomerAgreementsCommand)
113+
.de(de_ListCustomerAgreementsCommand)
114+
.build() {
115+
/** @internal type navigation helper, not in runtime. */
116+
protected declare static __types: {
117+
api: {
118+
input: ListCustomerAgreementsRequest;
119+
output: ListCustomerAgreementsResponse;
120+
};
121+
sdk: {
122+
input: ListCustomerAgreementsCommandInput;
123+
output: ListCustomerAgreementsCommandOutput;
124+
};
125+
};
126+
}

clients/client-artifact/src/commands/ListReportsCommand.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ export interface ListReportsCommandOutput extends ListReportsResponse, __Metadat
4646
* // { // ReportSummary
4747
* // id: "STRING_VALUE",
4848
* // name: "STRING_VALUE",
49-
* // state: "STRING_VALUE",
49+
* // state: "PUBLISHED" || "UNPUBLISHED",
5050
* // arn: "STRING_VALUE",
5151
* // version: Number("long"),
52-
* // uploadState: "STRING_VALUE",
52+
* // uploadState: "PROCESSING" || "COMPLETE" || "FAILED" || "FAULT",
5353
* // description: "STRING_VALUE",
5454
* // periodStart: new Date("TIMESTAMP"),
5555
* // periodEnd: new Date("TIMESTAMP"),
@@ -58,7 +58,7 @@ export interface ListReportsCommandOutput extends ListReportsResponse, __Metadat
5858
* // companyName: "STRING_VALUE",
5959
* // productName: "STRING_VALUE",
6060
* // statusMessage: "STRING_VALUE",
61-
* // acceptanceType: "STRING_VALUE",
61+
* // acceptanceType: "PASSTHROUGH" || "EXPLICIT",
6262
* // },
6363
* // ],
6464
* // nextToken: "STRING_VALUE",

clients/client-artifact/src/commands/PutAccountSettingsCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ export interface PutAccountSettingsCommandOutput extends PutAccountSettingsRespo
3636
* // const { ArtifactClient, PutAccountSettingsCommand } = require("@aws-sdk/client-artifact"); // CommonJS import
3737
* const client = new ArtifactClient(config);
3838
* const input = { // PutAccountSettingsRequest
39-
* notificationSubscriptionStatus: "STRING_VALUE",
39+
* notificationSubscriptionStatus: "SUBSCRIBED" || "NOT_SUBSCRIBED",
4040
* };
4141
* const command = new PutAccountSettingsCommand(input);
4242
* const response = await client.send(command);
4343
* // { // PutAccountSettingsResponse
4444
* // accountSettings: { // AccountSettings
45-
* // notificationSubscriptionStatus: "STRING_VALUE",
45+
* // notificationSubscriptionStatus: "SUBSCRIBED" || "NOT_SUBSCRIBED",
4646
* // },
4747
* // };
4848
*

clients/client-artifact/src/commands/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ export * from "./GetAccountSettingsCommand";
33
export * from "./GetReportCommand";
44
export * from "./GetReportMetadataCommand";
55
export * from "./GetTermForReportCommand";
6+
export * from "./ListCustomerAgreementsCommand";
67
export * from "./ListReportsCommand";
78
export * from "./PutAccountSettingsCommand";

0 commit comments

Comments
 (0)