|
| 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() {} |
0 commit comments