-
Notifications
You must be signed in to change notification settings - Fork 578
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client-guardduty): Amazon GuardDuty introduces a new Malware Pro…
…tection feature that triggers malware scan on selected EC2 instance resources, after the service detects a potentially malicious activity.
- Loading branch information
awstools
committed
Jul 26, 2022
1 parent
65ad083
commit f85fa66
Showing
11 changed files
with
4,429 additions
and
501 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
101 changes: 101 additions & 0 deletions
101
clients/client-guardduty/src/commands/DescribeMalwareScansCommand.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
// smithy-typescript generated code | ||
import { getSerdePlugin } from "@aws-sdk/middleware-serde"; | ||
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; | ||
import { Command as $Command } from "@aws-sdk/smithy-client"; | ||
import { | ||
FinalizeHandlerArguments, | ||
Handler, | ||
HandlerExecutionContext, | ||
HttpHandlerOptions as __HttpHandlerOptions, | ||
MetadataBearer as __MetadataBearer, | ||
MiddlewareStack, | ||
SerdeContext as __SerdeContext, | ||
} from "@aws-sdk/types"; | ||
|
||
import { GuardDutyClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GuardDutyClient"; | ||
import { | ||
DescribeMalwareScansRequest, | ||
DescribeMalwareScansRequestFilterSensitiveLog, | ||
DescribeMalwareScansResponse, | ||
DescribeMalwareScansResponseFilterSensitiveLog, | ||
} from "../models/models_0"; | ||
import { | ||
deserializeAws_restJson1DescribeMalwareScansCommand, | ||
serializeAws_restJson1DescribeMalwareScansCommand, | ||
} from "../protocols/Aws_restJson1"; | ||
|
||
export interface DescribeMalwareScansCommandInput extends DescribeMalwareScansRequest {} | ||
export interface DescribeMalwareScansCommandOutput extends DescribeMalwareScansResponse, __MetadataBearer {} | ||
|
||
/** | ||
* <p>Returns a list of malware scans.</p> | ||
* @example | ||
* Use a bare-bones client and the command you need to make an API call. | ||
* ```javascript | ||
* import { GuardDutyClient, DescribeMalwareScansCommand } from "@aws-sdk/client-guardduty"; // ES Modules import | ||
* // const { GuardDutyClient, DescribeMalwareScansCommand } = require("@aws-sdk/client-guardduty"); // CommonJS import | ||
* const client = new GuardDutyClient(config); | ||
* const command = new DescribeMalwareScansCommand(input); | ||
* const response = await client.send(command); | ||
* ``` | ||
* | ||
* @see {@link DescribeMalwareScansCommandInput} for command's `input` shape. | ||
* @see {@link DescribeMalwareScansCommandOutput} for command's `response` shape. | ||
* @see {@link GuardDutyClientResolvedConfig | config} for GuardDutyClient's `config` shape. | ||
* | ||
*/ | ||
export class DescribeMalwareScansCommand extends $Command< | ||
DescribeMalwareScansCommandInput, | ||
DescribeMalwareScansCommandOutput, | ||
GuardDutyClientResolvedConfig | ||
> { | ||
// Start section: command_properties | ||
// End section: command_properties | ||
|
||
constructor(readonly input: DescribeMalwareScansCommandInput) { | ||
// Start section: command_constructor | ||
super(); | ||
// End section: command_constructor | ||
} | ||
|
||
/** | ||
* @internal | ||
*/ | ||
resolveMiddleware( | ||
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, | ||
configuration: GuardDutyClientResolvedConfig, | ||
options?: __HttpHandlerOptions | ||
): Handler<DescribeMalwareScansCommandInput, DescribeMalwareScansCommandOutput> { | ||
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); | ||
|
||
const stack = clientStack.concat(this.middlewareStack); | ||
|
||
const { logger } = configuration; | ||
const clientName = "GuardDutyClient"; | ||
const commandName = "DescribeMalwareScansCommand"; | ||
const handlerExecutionContext: HandlerExecutionContext = { | ||
logger, | ||
clientName, | ||
commandName, | ||
inputFilterSensitiveLog: DescribeMalwareScansRequestFilterSensitiveLog, | ||
outputFilterSensitiveLog: DescribeMalwareScansResponseFilterSensitiveLog, | ||
}; | ||
const { requestHandler } = configuration; | ||
return stack.resolve( | ||
(request: FinalizeHandlerArguments<any>) => | ||
requestHandler.handle(request.request as __HttpRequest, options || {}), | ||
handlerExecutionContext | ||
); | ||
} | ||
|
||
private serialize(input: DescribeMalwareScansCommandInput, context: __SerdeContext): Promise<__HttpRequest> { | ||
return serializeAws_restJson1DescribeMalwareScansCommand(input, context); | ||
} | ||
|
||
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<DescribeMalwareScansCommandOutput> { | ||
return deserializeAws_restJson1DescribeMalwareScansCommand(output, context); | ||
} | ||
|
||
// Start section: command_body_extra | ||
// End section: command_body_extra | ||
} |
Oops, something went wrong.