Skip to content

start_malware_scan

Operation

start_malware_scan

start_malware_scan(request: StartMalwareScanInput | StartMalwareScanInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[StartMalwareScanInputDict]) -> StartMalwareScanOutput

Initiates the malware scan. Invoking this API will automatically create the Service-linked role in the corresponding account if the resourceArn belongs to an EC2 instance.

When the malware scan starts, you can use the associated scan ID to track the status of the scan. For more information, see ListMalwareScans and GetMalwareScan.

When you use this API, the Amazon Web Services service terms for GuardDuty Malware Protection apply. For more information, see Amazon Web Services service terms for GuardDuty Malware Protection.

Parameters:

Name Type Description Default
request StartMalwareScanInput | StartMalwareScanInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[StartMalwareScanInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
StartMalwareScanOutput

An instance of StartMalwareScanOutput.

start_malware_scan async

start_malware_scan(request: StartMalwareScanInput | StartMalwareScanInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[StartMalwareScanInputDict]) -> StartMalwareScanOutput

Initiates the malware scan. Invoking this API will automatically create the Service-linked role in the corresponding account if the resourceArn belongs to an EC2 instance.

When the malware scan starts, you can use the associated scan ID to track the status of the scan. For more information, see ListMalwareScans and GetMalwareScan.

When you use this API, the Amazon Web Services service terms for GuardDuty Malware Protection apply. For more information, see Amazon Web Services service terms for GuardDuty Malware Protection.

Parameters:

Name Type Description Default
request StartMalwareScanInput | StartMalwareScanInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[StartMalwareScanInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
StartMalwareScanOutput

An instance of StartMalwareScanOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

StartMalwareScanInputDict

Bases: TypedDict

Dictionary form of StartMalwareScanInput.

Attributes

client_token instance-attribute
client_token: str | None

The idempotency token for the create request.

This field is autopopulated if not provided.

resource_arn instance-attribute
resource_arn: Required[str]

Amazon Resource Name (ARN) of the resource for which you invoked the API.

scan_configuration instance-attribute

Contains information about the configuration to be used for the malware scan.

StartMalwareScanInput dataclass

Bases: _SerdeShape

Dataclass for StartMalwareScanInput structure.

Attributes

client_token class-attribute instance-attribute
client_token: str | None = ...

The idempotency token for the create request.

This field is autopopulated if not provided.

resource_arn class-attribute instance-attribute
resource_arn: str | None = ...

Amazon Resource Name (ARN) of the resource for which you invoked the API.

scan_configuration class-attribute instance-attribute
scan_configuration: StartMalwareScanConfiguration | None = ...

Contains information about the configuration to be used for the malware scan.

Output

StartMalwareScanOutput dataclass

Bases: _SerdeShape

Dataclass for StartMalwareScanOutput structure.

Attributes

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

scan_id class-attribute instance-attribute
scan_id: str | None = ...

A unique identifier that gets generated when you invoke the API without any error. Each malware scan has a corresponding scan ID. Using this scan ID, you can monitor the status of your malware scan.