Skip to content

Commit 5d00c7e

Browse files
author
awstools
committed
feat(client-macie2): This release adds support for managing the status of automated sensitive data discovery for individual accounts in an organization, and determining whether individual S3 buckets are included in the scope of the analyses.
1 parent 33a5089 commit 5d00c7e

24 files changed

+1362
-279
lines changed

clients/client-macie2/README.md

+16
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,14 @@ BatchGetCustomDataIdentifiers
218218

219219
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/macie2/command/BatchGetCustomDataIdentifiersCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-macie2/Interface/BatchGetCustomDataIdentifiersCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-macie2/Interface/BatchGetCustomDataIdentifiersCommandOutput/)
220220

221+
</details>
222+
<details>
223+
<summary>
224+
BatchUpdateAutomatedDiscoveryAccounts
225+
</summary>
226+
227+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/macie2/command/BatchUpdateAutomatedDiscoveryAccountsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-macie2/Interface/BatchUpdateAutomatedDiscoveryAccountsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-macie2/Interface/BatchUpdateAutomatedDiscoveryAccountsCommandOutput/)
228+
221229
</details>
222230
<details>
223231
<summary>
@@ -586,6 +594,14 @@ ListAllowLists
586594

587595
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/macie2/command/ListAllowListsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-macie2/Interface/ListAllowListsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-macie2/Interface/ListAllowListsCommandOutput/)
588596

597+
</details>
598+
<details>
599+
<summary>
600+
ListAutomatedDiscoveryAccounts
601+
</summary>
602+
603+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/macie2/command/ListAutomatedDiscoveryAccountsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-macie2/Interface/ListAutomatedDiscoveryAccountsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-macie2/Interface/ListAutomatedDiscoveryAccountsCommandOutput/)
604+
589605
</details>
590606
<details>
591607
<summary>

clients/client-macie2/src/Macie2.ts

+48
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ import {
1212
BatchGetCustomDataIdentifiersCommandInput,
1313
BatchGetCustomDataIdentifiersCommandOutput,
1414
} from "./commands/BatchGetCustomDataIdentifiersCommand";
15+
import {
16+
BatchUpdateAutomatedDiscoveryAccountsCommand,
17+
BatchUpdateAutomatedDiscoveryAccountsCommandInput,
18+
BatchUpdateAutomatedDiscoveryAccountsCommandOutput,
19+
} from "./commands/BatchUpdateAutomatedDiscoveryAccountsCommand";
1520
import {
1621
CreateAllowListCommand,
1722
CreateAllowListCommandInput,
@@ -230,6 +235,11 @@ import {
230235
ListAllowListsCommandInput,
231236
ListAllowListsCommandOutput,
232237
} from "./commands/ListAllowListsCommand";
238+
import {
239+
ListAutomatedDiscoveryAccountsCommand,
240+
ListAutomatedDiscoveryAccountsCommandInput,
241+
ListAutomatedDiscoveryAccountsCommandOutput,
242+
} from "./commands/ListAutomatedDiscoveryAccountsCommand";
233243
import {
234244
ListClassificationJobsCommand,
235245
ListClassificationJobsCommandInput,
@@ -382,6 +392,7 @@ import { Macie2Client, Macie2ClientConfig } from "./Macie2Client";
382392
const commands = {
383393
AcceptInvitationCommand,
384394
BatchGetCustomDataIdentifiersCommand,
395+
BatchUpdateAutomatedDiscoveryAccountsCommand,
385396
CreateAllowListCommand,
386397
CreateClassificationJobCommand,
387398
CreateCustomDataIdentifierCommand,
@@ -428,6 +439,7 @@ const commands = {
428439
GetUsageStatisticsCommand,
429440
GetUsageTotalsCommand,
430441
ListAllowListsCommand,
442+
ListAutomatedDiscoveryAccountsCommand,
431443
ListClassificationJobsCommand,
432444
ListClassificationScopesCommand,
433445
ListCustomDataIdentifiersCommand,
@@ -497,6 +509,24 @@ export interface Macie2 {
497509
cb: (err: any, data?: BatchGetCustomDataIdentifiersCommandOutput) => void
498510
): void;
499511

512+
/**
513+
* @see {@link BatchUpdateAutomatedDiscoveryAccountsCommand}
514+
*/
515+
batchUpdateAutomatedDiscoveryAccounts(): Promise<BatchUpdateAutomatedDiscoveryAccountsCommandOutput>;
516+
batchUpdateAutomatedDiscoveryAccounts(
517+
args: BatchUpdateAutomatedDiscoveryAccountsCommandInput,
518+
options?: __HttpHandlerOptions
519+
): Promise<BatchUpdateAutomatedDiscoveryAccountsCommandOutput>;
520+
batchUpdateAutomatedDiscoveryAccounts(
521+
args: BatchUpdateAutomatedDiscoveryAccountsCommandInput,
522+
cb: (err: any, data?: BatchUpdateAutomatedDiscoveryAccountsCommandOutput) => void
523+
): void;
524+
batchUpdateAutomatedDiscoveryAccounts(
525+
args: BatchUpdateAutomatedDiscoveryAccountsCommandInput,
526+
options: __HttpHandlerOptions,
527+
cb: (err: any, data?: BatchUpdateAutomatedDiscoveryAccountsCommandOutput) => void
528+
): void;
529+
500530
/**
501531
* @see {@link CreateAllowListCommand}
502532
*/
@@ -1238,6 +1268,24 @@ export interface Macie2 {
12381268
cb: (err: any, data?: ListAllowListsCommandOutput) => void
12391269
): void;
12401270

1271+
/**
1272+
* @see {@link ListAutomatedDiscoveryAccountsCommand}
1273+
*/
1274+
listAutomatedDiscoveryAccounts(): Promise<ListAutomatedDiscoveryAccountsCommandOutput>;
1275+
listAutomatedDiscoveryAccounts(
1276+
args: ListAutomatedDiscoveryAccountsCommandInput,
1277+
options?: __HttpHandlerOptions
1278+
): Promise<ListAutomatedDiscoveryAccountsCommandOutput>;
1279+
listAutomatedDiscoveryAccounts(
1280+
args: ListAutomatedDiscoveryAccountsCommandInput,
1281+
cb: (err: any, data?: ListAutomatedDiscoveryAccountsCommandOutput) => void
1282+
): void;
1283+
listAutomatedDiscoveryAccounts(
1284+
args: ListAutomatedDiscoveryAccountsCommandInput,
1285+
options: __HttpHandlerOptions,
1286+
cb: (err: any, data?: ListAutomatedDiscoveryAccountsCommandOutput) => void
1287+
): void;
1288+
12411289
/**
12421290
* @see {@link ListClassificationJobsCommand}
12431291
*/

clients/client-macie2/src/Macie2Client.ts

+12
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ import {
5858
BatchGetCustomDataIdentifiersCommandInput,
5959
BatchGetCustomDataIdentifiersCommandOutput,
6060
} from "./commands/BatchGetCustomDataIdentifiersCommand";
61+
import {
62+
BatchUpdateAutomatedDiscoveryAccountsCommandInput,
63+
BatchUpdateAutomatedDiscoveryAccountsCommandOutput,
64+
} from "./commands/BatchUpdateAutomatedDiscoveryAccountsCommand";
6165
import { CreateAllowListCommandInput, CreateAllowListCommandOutput } from "./commands/CreateAllowListCommand";
6266
import {
6367
CreateClassificationJobCommandInput,
@@ -179,6 +183,10 @@ import {
179183
import { GetUsageStatisticsCommandInput, GetUsageStatisticsCommandOutput } from "./commands/GetUsageStatisticsCommand";
180184
import { GetUsageTotalsCommandInput, GetUsageTotalsCommandOutput } from "./commands/GetUsageTotalsCommand";
181185
import { ListAllowListsCommandInput, ListAllowListsCommandOutput } from "./commands/ListAllowListsCommand";
186+
import {
187+
ListAutomatedDiscoveryAccountsCommandInput,
188+
ListAutomatedDiscoveryAccountsCommandOutput,
189+
} from "./commands/ListAutomatedDiscoveryAccountsCommand";
182190
import {
183191
ListClassificationJobsCommandInput,
184192
ListClassificationJobsCommandOutput,
@@ -296,6 +304,7 @@ export { __Client };
296304
export type ServiceInputTypes =
297305
| AcceptInvitationCommandInput
298306
| BatchGetCustomDataIdentifiersCommandInput
307+
| BatchUpdateAutomatedDiscoveryAccountsCommandInput
299308
| CreateAllowListCommandInput
300309
| CreateClassificationJobCommandInput
301310
| CreateCustomDataIdentifierCommandInput
@@ -342,6 +351,7 @@ export type ServiceInputTypes =
342351
| GetUsageStatisticsCommandInput
343352
| GetUsageTotalsCommandInput
344353
| ListAllowListsCommandInput
354+
| ListAutomatedDiscoveryAccountsCommandInput
345355
| ListClassificationJobsCommandInput
346356
| ListClassificationScopesCommandInput
347357
| ListCustomDataIdentifiersCommandInput
@@ -380,6 +390,7 @@ export type ServiceInputTypes =
380390
export type ServiceOutputTypes =
381391
| AcceptInvitationCommandOutput
382392
| BatchGetCustomDataIdentifiersCommandOutput
393+
| BatchUpdateAutomatedDiscoveryAccountsCommandOutput
383394
| CreateAllowListCommandOutput
384395
| CreateClassificationJobCommandOutput
385396
| CreateCustomDataIdentifierCommandOutput
@@ -426,6 +437,7 @@ export type ServiceOutputTypes =
426437
| GetUsageStatisticsCommandOutput
427438
| GetUsageTotalsCommandOutput
428439
| ListAllowListsCommandOutput
440+
| ListAutomatedDiscoveryAccountsCommandOutput
429441
| ListClassificationJobsCommandOutput
430442
| ListClassificationScopesCommandOutput
431443
| ListCustomDataIdentifiersCommandOutput
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
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 { commonParams } from "../endpoint/EndpointParameters";
8+
import { Macie2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../Macie2Client";
9+
import {
10+
BatchUpdateAutomatedDiscoveryAccountsRequest,
11+
BatchUpdateAutomatedDiscoveryAccountsResponse,
12+
} from "../models/models_0";
13+
import {
14+
de_BatchUpdateAutomatedDiscoveryAccountsCommand,
15+
se_BatchUpdateAutomatedDiscoveryAccountsCommand,
16+
} from "../protocols/Aws_restJson1";
17+
18+
/**
19+
* @public
20+
*/
21+
export type { __MetadataBearer };
22+
export { $Command };
23+
/**
24+
* @public
25+
*
26+
* The input for {@link BatchUpdateAutomatedDiscoveryAccountsCommand}.
27+
*/
28+
export interface BatchUpdateAutomatedDiscoveryAccountsCommandInput
29+
extends BatchUpdateAutomatedDiscoveryAccountsRequest {}
30+
/**
31+
* @public
32+
*
33+
* The output of {@link BatchUpdateAutomatedDiscoveryAccountsCommand}.
34+
*/
35+
export interface BatchUpdateAutomatedDiscoveryAccountsCommandOutput
36+
extends BatchUpdateAutomatedDiscoveryAccountsResponse,
37+
__MetadataBearer {}
38+
39+
/**
40+
* <p>Changes the status of automated sensitive data discovery for one or more accounts.</p>
41+
* @example
42+
* Use a bare-bones client and the command you need to make an API call.
43+
* ```javascript
44+
* import { Macie2Client, BatchUpdateAutomatedDiscoveryAccountsCommand } from "@aws-sdk/client-macie2"; // ES Modules import
45+
* // const { Macie2Client, BatchUpdateAutomatedDiscoveryAccountsCommand } = require("@aws-sdk/client-macie2"); // CommonJS import
46+
* const client = new Macie2Client(config);
47+
* const input = { // BatchUpdateAutomatedDiscoveryAccountsRequest
48+
* accounts: [ // __listOfAutomatedDiscoveryAccountUpdate
49+
* { // AutomatedDiscoveryAccountUpdate
50+
* accountId: "STRING_VALUE",
51+
* status: "ENABLED" || "DISABLED",
52+
* },
53+
* ],
54+
* };
55+
* const command = new BatchUpdateAutomatedDiscoveryAccountsCommand(input);
56+
* const response = await client.send(command);
57+
* // { // BatchUpdateAutomatedDiscoveryAccountsResponse
58+
* // errors: [ // __listOfAutomatedDiscoveryAccountUpdateError
59+
* // { // AutomatedDiscoveryAccountUpdateError
60+
* // accountId: "STRING_VALUE",
61+
* // errorCode: "ACCOUNT_PAUSED" || "ACCOUNT_NOT_FOUND",
62+
* // },
63+
* // ],
64+
* // };
65+
*
66+
* ```
67+
*
68+
* @param BatchUpdateAutomatedDiscoveryAccountsCommandInput - {@link BatchUpdateAutomatedDiscoveryAccountsCommandInput}
69+
* @returns {@link BatchUpdateAutomatedDiscoveryAccountsCommandOutput}
70+
* @see {@link BatchUpdateAutomatedDiscoveryAccountsCommandInput} for command's `input` shape.
71+
* @see {@link BatchUpdateAutomatedDiscoveryAccountsCommandOutput} for command's `response` shape.
72+
* @see {@link Macie2ClientResolvedConfig | config} for Macie2Client's `config` shape.
73+
*
74+
* @throws {@link AccessDeniedException} (client fault)
75+
* <p>Provides information about an error that occurred due to insufficient access to a specified resource.</p>
76+
*
77+
* @throws {@link ConflictException} (client fault)
78+
* <p>Provides information about an error that occurred due to a versioning conflict for a specified resource.</p>
79+
*
80+
* @throws {@link InternalServerException} (server fault)
81+
* <p>Provides information about an error that occurred due to an unknown internal server error, exception, or failure.</p>
82+
*
83+
* @throws {@link ThrottlingException} (client fault)
84+
* <p>Provides information about an error that occurred because too many requests were sent during a certain amount of time.</p>
85+
*
86+
* @throws {@link ValidationException} (client fault)
87+
* <p>Provides information about an error that occurred due to a syntax error in a request.</p>
88+
*
89+
* @throws {@link Macie2ServiceException}
90+
* <p>Base exception class for all service exceptions from Macie2 service.</p>
91+
*
92+
* @public
93+
*/
94+
export class BatchUpdateAutomatedDiscoveryAccountsCommand extends $Command
95+
.classBuilder<
96+
BatchUpdateAutomatedDiscoveryAccountsCommandInput,
97+
BatchUpdateAutomatedDiscoveryAccountsCommandOutput,
98+
Macie2ClientResolvedConfig,
99+
ServiceInputTypes,
100+
ServiceOutputTypes
101+
>()
102+
.ep({
103+
...commonParams,
104+
})
105+
.m(function (this: any, Command: any, cs: any, config: Macie2ClientResolvedConfig, o: any) {
106+
return [
107+
getSerdePlugin(config, this.serialize, this.deserialize),
108+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
109+
];
110+
})
111+
.s("Macie2", "BatchUpdateAutomatedDiscoveryAccounts", {})
112+
.n("Macie2Client", "BatchUpdateAutomatedDiscoveryAccountsCommand")
113+
.f(void 0, void 0)
114+
.ser(se_BatchUpdateAutomatedDiscoveryAccountsCommand)
115+
.de(de_BatchUpdateAutomatedDiscoveryAccountsCommand)
116+
.build() {}

clients/client-macie2/src/commands/DescribeBucketsCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export interface DescribeBucketsCommandOutput extends DescribeBucketsResponse, _
6565
* // { // BucketMetadata
6666
* // accountId: "STRING_VALUE",
6767
* // allowsUnencryptedObjectUploads: "TRUE" || "FALSE" || "UNKNOWN",
68+
* // automatedDiscoveryMonitoringStatus: "MONITORED" || "NOT_MONITORED",
6869
* // bucketArn: "STRING_VALUE",
6970
* // bucketCreatedAt: new Date("TIMESTAMP"),
7071
* // bucketName: "STRING_VALUE",

clients/client-macie2/src/commands/GetAutomatedDiscoveryConfigurationCommand.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export interface GetAutomatedDiscoveryConfigurationCommandOutput
3636
__MetadataBearer {}
3737

3838
/**
39-
* <p>Retrieves the configuration settings and status of automated sensitive data discovery for an account.</p>
39+
* <p>Retrieves the configuration settings and status of automated sensitive data discovery for an organization or standalone account.</p>
4040
* @example
4141
* Use a bare-bones client and the command you need to make an API call.
4242
* ```javascript
@@ -47,6 +47,7 @@ export interface GetAutomatedDiscoveryConfigurationCommandOutput
4747
* const command = new GetAutomatedDiscoveryConfigurationCommand(input);
4848
* const response = await client.send(command);
4949
* // { // GetAutomatedDiscoveryConfigurationResponse
50+
* // autoEnableOrganizationMembers: "ALL" || "NEW" || "NONE",
5051
* // classificationScopeId: "STRING_VALUE",
5152
* // disabledAt: new Date("TIMESTAMP"),
5253
* // firstEnabledAt: new Date("TIMESTAMP"),

0 commit comments

Comments
 (0)