Skip to content

Commit

Permalink
feat(client-macie2): This release adds support for managing the statu…
Browse files Browse the repository at this point in the history
…s 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.
  • Loading branch information
awstools committed Jun 14, 2024
1 parent 33a5089 commit 5d00c7e
Show file tree
Hide file tree
Showing 24 changed files with 1,362 additions and 279 deletions.
16 changes: 16 additions & 0 deletions clients/client-macie2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,14 @@ BatchGetCustomDataIdentifiers

[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/)

</details>
<details>
<summary>
BatchUpdateAutomatedDiscoveryAccounts
</summary>

[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/)

</details>
<details>
<summary>
Expand Down Expand Up @@ -586,6 +594,14 @@ ListAllowLists

[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/)

</details>
<details>
<summary>
ListAutomatedDiscoveryAccounts
</summary>

[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/)

</details>
<details>
<summary>
Expand Down
48 changes: 48 additions & 0 deletions clients/client-macie2/src/Macie2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ import {
BatchGetCustomDataIdentifiersCommandInput,
BatchGetCustomDataIdentifiersCommandOutput,
} from "./commands/BatchGetCustomDataIdentifiersCommand";
import {
BatchUpdateAutomatedDiscoveryAccountsCommand,
BatchUpdateAutomatedDiscoveryAccountsCommandInput,
BatchUpdateAutomatedDiscoveryAccountsCommandOutput,
} from "./commands/BatchUpdateAutomatedDiscoveryAccountsCommand";
import {
CreateAllowListCommand,
CreateAllowListCommandInput,
Expand Down Expand Up @@ -230,6 +235,11 @@ import {
ListAllowListsCommandInput,
ListAllowListsCommandOutput,
} from "./commands/ListAllowListsCommand";
import {
ListAutomatedDiscoveryAccountsCommand,
ListAutomatedDiscoveryAccountsCommandInput,
ListAutomatedDiscoveryAccountsCommandOutput,
} from "./commands/ListAutomatedDiscoveryAccountsCommand";
import {
ListClassificationJobsCommand,
ListClassificationJobsCommandInput,
Expand Down Expand Up @@ -382,6 +392,7 @@ import { Macie2Client, Macie2ClientConfig } from "./Macie2Client";
const commands = {
AcceptInvitationCommand,
BatchGetCustomDataIdentifiersCommand,
BatchUpdateAutomatedDiscoveryAccountsCommand,
CreateAllowListCommand,
CreateClassificationJobCommand,
CreateCustomDataIdentifierCommand,
Expand Down Expand Up @@ -428,6 +439,7 @@ const commands = {
GetUsageStatisticsCommand,
GetUsageTotalsCommand,
ListAllowListsCommand,
ListAutomatedDiscoveryAccountsCommand,
ListClassificationJobsCommand,
ListClassificationScopesCommand,
ListCustomDataIdentifiersCommand,
Expand Down Expand Up @@ -497,6 +509,24 @@ export interface Macie2 {
cb: (err: any, data?: BatchGetCustomDataIdentifiersCommandOutput) => void
): void;

/**
* @see {@link BatchUpdateAutomatedDiscoveryAccountsCommand}
*/
batchUpdateAutomatedDiscoveryAccounts(): Promise<BatchUpdateAutomatedDiscoveryAccountsCommandOutput>;
batchUpdateAutomatedDiscoveryAccounts(
args: BatchUpdateAutomatedDiscoveryAccountsCommandInput,
options?: __HttpHandlerOptions
): Promise<BatchUpdateAutomatedDiscoveryAccountsCommandOutput>;
batchUpdateAutomatedDiscoveryAccounts(
args: BatchUpdateAutomatedDiscoveryAccountsCommandInput,
cb: (err: any, data?: BatchUpdateAutomatedDiscoveryAccountsCommandOutput) => void
): void;
batchUpdateAutomatedDiscoveryAccounts(
args: BatchUpdateAutomatedDiscoveryAccountsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: BatchUpdateAutomatedDiscoveryAccountsCommandOutput) => void
): void;

/**
* @see {@link CreateAllowListCommand}
*/
Expand Down Expand Up @@ -1238,6 +1268,24 @@ export interface Macie2 {
cb: (err: any, data?: ListAllowListsCommandOutput) => void
): void;

/**
* @see {@link ListAutomatedDiscoveryAccountsCommand}
*/
listAutomatedDiscoveryAccounts(): Promise<ListAutomatedDiscoveryAccountsCommandOutput>;
listAutomatedDiscoveryAccounts(
args: ListAutomatedDiscoveryAccountsCommandInput,
options?: __HttpHandlerOptions
): Promise<ListAutomatedDiscoveryAccountsCommandOutput>;
listAutomatedDiscoveryAccounts(
args: ListAutomatedDiscoveryAccountsCommandInput,
cb: (err: any, data?: ListAutomatedDiscoveryAccountsCommandOutput) => void
): void;
listAutomatedDiscoveryAccounts(
args: ListAutomatedDiscoveryAccountsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ListAutomatedDiscoveryAccountsCommandOutput) => void
): void;

/**
* @see {@link ListClassificationJobsCommand}
*/
Expand Down
12 changes: 12 additions & 0 deletions clients/client-macie2/src/Macie2Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ import {
BatchGetCustomDataIdentifiersCommandInput,
BatchGetCustomDataIdentifiersCommandOutput,
} from "./commands/BatchGetCustomDataIdentifiersCommand";
import {
BatchUpdateAutomatedDiscoveryAccountsCommandInput,
BatchUpdateAutomatedDiscoveryAccountsCommandOutput,
} from "./commands/BatchUpdateAutomatedDiscoveryAccountsCommand";
import { CreateAllowListCommandInput, CreateAllowListCommandOutput } from "./commands/CreateAllowListCommand";
import {
CreateClassificationJobCommandInput,
Expand Down Expand Up @@ -179,6 +183,10 @@ import {
import { GetUsageStatisticsCommandInput, GetUsageStatisticsCommandOutput } from "./commands/GetUsageStatisticsCommand";
import { GetUsageTotalsCommandInput, GetUsageTotalsCommandOutput } from "./commands/GetUsageTotalsCommand";
import { ListAllowListsCommandInput, ListAllowListsCommandOutput } from "./commands/ListAllowListsCommand";
import {
ListAutomatedDiscoveryAccountsCommandInput,
ListAutomatedDiscoveryAccountsCommandOutput,
} from "./commands/ListAutomatedDiscoveryAccountsCommand";
import {
ListClassificationJobsCommandInput,
ListClassificationJobsCommandOutput,
Expand Down Expand Up @@ -296,6 +304,7 @@ export { __Client };
export type ServiceInputTypes =
| AcceptInvitationCommandInput
| BatchGetCustomDataIdentifiersCommandInput
| BatchUpdateAutomatedDiscoveryAccountsCommandInput
| CreateAllowListCommandInput
| CreateClassificationJobCommandInput
| CreateCustomDataIdentifierCommandInput
Expand Down Expand Up @@ -342,6 +351,7 @@ export type ServiceInputTypes =
| GetUsageStatisticsCommandInput
| GetUsageTotalsCommandInput
| ListAllowListsCommandInput
| ListAutomatedDiscoveryAccountsCommandInput
| ListClassificationJobsCommandInput
| ListClassificationScopesCommandInput
| ListCustomDataIdentifiersCommandInput
Expand Down Expand Up @@ -380,6 +390,7 @@ export type ServiceInputTypes =
export type ServiceOutputTypes =
| AcceptInvitationCommandOutput
| BatchGetCustomDataIdentifiersCommandOutput
| BatchUpdateAutomatedDiscoveryAccountsCommandOutput
| CreateAllowListCommandOutput
| CreateClassificationJobCommandOutput
| CreateCustomDataIdentifierCommandOutput
Expand Down Expand Up @@ -426,6 +437,7 @@ export type ServiceOutputTypes =
| GetUsageStatisticsCommandOutput
| GetUsageTotalsCommandOutput
| ListAllowListsCommandOutput
| ListAutomatedDiscoveryAccountsCommandOutput
| ListClassificationJobsCommandOutput
| ListClassificationScopesCommandOutput
| ListCustomDataIdentifiersCommandOutput
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
// 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 { commonParams } from "../endpoint/EndpointParameters";
import { Macie2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../Macie2Client";
import {
BatchUpdateAutomatedDiscoveryAccountsRequest,
BatchUpdateAutomatedDiscoveryAccountsResponse,
} from "../models/models_0";
import {
de_BatchUpdateAutomatedDiscoveryAccountsCommand,
se_BatchUpdateAutomatedDiscoveryAccountsCommand,
} from "../protocols/Aws_restJson1";

/**
* @public
*/
export type { __MetadataBearer };
export { $Command };
/**
* @public
*
* The input for {@link BatchUpdateAutomatedDiscoveryAccountsCommand}.
*/
export interface BatchUpdateAutomatedDiscoveryAccountsCommandInput
extends BatchUpdateAutomatedDiscoveryAccountsRequest {}
/**
* @public
*
* The output of {@link BatchUpdateAutomatedDiscoveryAccountsCommand}.
*/
export interface BatchUpdateAutomatedDiscoveryAccountsCommandOutput
extends BatchUpdateAutomatedDiscoveryAccountsResponse,
__MetadataBearer {}

/**
* <p>Changes the status of automated sensitive data discovery for one or more accounts.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { Macie2Client, BatchUpdateAutomatedDiscoveryAccountsCommand } from "@aws-sdk/client-macie2"; // ES Modules import
* // const { Macie2Client, BatchUpdateAutomatedDiscoveryAccountsCommand } = require("@aws-sdk/client-macie2"); // CommonJS import
* const client = new Macie2Client(config);
* const input = { // BatchUpdateAutomatedDiscoveryAccountsRequest
* accounts: [ // __listOfAutomatedDiscoveryAccountUpdate
* { // AutomatedDiscoveryAccountUpdate
* accountId: "STRING_VALUE",
* status: "ENABLED" || "DISABLED",
* },
* ],
* };
* const command = new BatchUpdateAutomatedDiscoveryAccountsCommand(input);
* const response = await client.send(command);
* // { // BatchUpdateAutomatedDiscoveryAccountsResponse
* // errors: [ // __listOfAutomatedDiscoveryAccountUpdateError
* // { // AutomatedDiscoveryAccountUpdateError
* // accountId: "STRING_VALUE",
* // errorCode: "ACCOUNT_PAUSED" || "ACCOUNT_NOT_FOUND",
* // },
* // ],
* // };
*
* ```
*
* @param BatchUpdateAutomatedDiscoveryAccountsCommandInput - {@link BatchUpdateAutomatedDiscoveryAccountsCommandInput}
* @returns {@link BatchUpdateAutomatedDiscoveryAccountsCommandOutput}
* @see {@link BatchUpdateAutomatedDiscoveryAccountsCommandInput} for command's `input` shape.
* @see {@link BatchUpdateAutomatedDiscoveryAccountsCommandOutput} for command's `response` shape.
* @see {@link Macie2ClientResolvedConfig | config} for Macie2Client's `config` shape.
*
* @throws {@link AccessDeniedException} (client fault)
* <p>Provides information about an error that occurred due to insufficient access to a specified resource.</p>
*
* @throws {@link ConflictException} (client fault)
* <p>Provides information about an error that occurred due to a versioning conflict for a specified resource.</p>
*
* @throws {@link InternalServerException} (server fault)
* <p>Provides information about an error that occurred due to an unknown internal server error, exception, or failure.</p>
*
* @throws {@link ThrottlingException} (client fault)
* <p>Provides information about an error that occurred because too many requests were sent during a certain amount of time.</p>
*
* @throws {@link ValidationException} (client fault)
* <p>Provides information about an error that occurred due to a syntax error in a request.</p>
*
* @throws {@link Macie2ServiceException}
* <p>Base exception class for all service exceptions from Macie2 service.</p>
*
* @public
*/
export class BatchUpdateAutomatedDiscoveryAccountsCommand extends $Command
.classBuilder<
BatchUpdateAutomatedDiscoveryAccountsCommandInput,
BatchUpdateAutomatedDiscoveryAccountsCommandOutput,
Macie2ClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>()
.ep({
...commonParams,
})
.m(function (this: any, Command: any, cs: any, config: Macie2ClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
})
.s("Macie2", "BatchUpdateAutomatedDiscoveryAccounts", {})
.n("Macie2Client", "BatchUpdateAutomatedDiscoveryAccountsCommand")
.f(void 0, void 0)
.ser(se_BatchUpdateAutomatedDiscoveryAccountsCommand)
.de(de_BatchUpdateAutomatedDiscoveryAccountsCommand)
.build() {}
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export interface DescribeBucketsCommandOutput extends DescribeBucketsResponse, _
* // { // BucketMetadata
* // accountId: "STRING_VALUE",
* // allowsUnencryptedObjectUploads: "TRUE" || "FALSE" || "UNKNOWN",
* // automatedDiscoveryMonitoringStatus: "MONITORED" || "NOT_MONITORED",
* // bucketArn: "STRING_VALUE",
* // bucketCreatedAt: new Date("TIMESTAMP"),
* // bucketName: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export interface GetAutomatedDiscoveryConfigurationCommandOutput
__MetadataBearer {}

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

0 comments on commit 5d00c7e

Please sign in to comment.