SecurityAgent / Client / resume_pentest_job
resume_pentest_job¶
- SecurityAgent.Client.resume_pentest_job(**kwargs)¶
Resumes a stopped or paused pentest job from its last saved checkpoint. The job keeps its pentest job identifier and continues as a new version, keeping the findings and progress from earlier runs. You can resume a job within 7 days of when it was created.
See also: AWS API Documentation
Request Syntax
response = client.resume_pentest_job( agentSpaceId='string', pentestJobId='string', actors=[ { 'identifier': 'string', 'uris': [ 'string', ], 'authentication': { 'providerType': 'SECRETS_MANAGER'|'AWS_LAMBDA'|'AWS_IAM_ROLE'|'AWS_INTERNAL', 'value': 'string' }, 'description': 'string', 'enableEmailMfa': True|False, 'mfaForwardingAddress': 'string' }, ], networkTrafficConfig={ 'rules': [ { 'effect': 'ALLOW'|'DENY', 'pattern': 'string', 'networkTrafficRuleType': 'URL' }, ], 'customHeaders': [ { 'name': 'string', 'value': 'string' }, ] }, vpcConfig={ 'vpcArn': 'string', 'securityGroupArns': [ 'string', ], 'subnetArns': [ 'string', ] }, maxTaskHours=123.0, copyConfigFromPentest=True|False )
- Parameters:
agentSpaceId (string) – The unique identifier of the agent space.
pentestJobId (string) – The unique identifier of the pentest job to resume.
actors (list) –
The actors to use for the resumed job. When specified, replaces the actors the job used before it stopped.
(dict) –
Represents an actor used during penetration testing. An actor defines a user or entity that interacts with the target application, including authentication credentials and target URIs.
identifier (string) –
The unique identifier for the actor.
uris (list) –
The list of URIs that the actor targets during testing.
(string) –
authentication (dict) –
The authentication configuration for the actor.
providerType (string) –
The type of authentication provider. Valid values include SECRETS_MANAGER, AWS_LAMBDA, AWS_IAM_ROLE, and AWS_INTERNAL.
value (string) –
The authentication value, such as a secret ARN, Lambda function ARN, or IAM role ARN, depending on the provider type.
description (string) –
A description of the actor.
enableEmailMfa (boolean) –
Whether email-based MFA is enabled for this actor.
mfaForwardingAddress (string) –
Server-generated email forwarding address for receiving MFA codes.
networkTrafficConfig (dict) –
The network traffic configuration to use for the resumed job. When specified, replaces the configuration the job used before it stopped.
rules (list) –
The list of network traffic rules that control which URLs are allowed or denied during testing.
(dict) –
A rule that controls network traffic during penetration testing by allowing or denying traffic to specific URL patterns.
effect (string) –
The effect of the rule. Valid values are ALLOW and DENY.
pattern (string) –
The URL pattern to match for the rule.
networkTrafficRuleType (string) –
The type of the network traffic rule. Currently, only URL is supported.
customHeaders (list) –
The list of custom HTTP headers to include in network traffic during testing.
(dict) –
A custom HTTP header to include in network traffic during penetration testing.
name (string) –
The name of the custom header.
value (string) –
The value of the custom header.
vpcConfig (dict) –
The VPC configuration to use for the resumed job. When specified, replaces the configuration the job used before it stopped.
vpcArn (string) –
The Amazon Resource Name (ARN) or ID of the VPC.
securityGroupArns (list) –
The Amazon Resource Names (ARNs) or IDs of the security groups for the VPC configuration.
(string) –
ARN or ID of a security group.
subnetArns (list) –
The Amazon Resource Names (ARNs) or IDs of the subnets for the VPC configuration.
(string) –
ARN or ID of a subnet.
maxTaskHours (float) – The maximum number of task hours for the resumed job. To resume a job that stopped because it reached its task hours limit, specify a higher value.
copyConfigFromPentest (boolean) – Specifies whether to copy the current actors, network traffic configuration, VPC configuration, and maximum task hours from the pentest to the resumed job. The job’s scope, such as its target endpoints, is never changed. Values you specify in this request take precedence over copied values.
- Return type:
dict
- Returns:
Response Syntax
{ 'title': 'string', 'status': 'IN_PROGRESS'|'STOPPING'|'STOPPED'|'PAUSING'|'PAUSED'|'FAILED'|'COMPLETED', 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1), 'pentestId': 'string', 'pentestJobId': 'string', 'version': 'string' }
Response Structure
(dict) –
Output for the ResumePentestJob operation.
title (string) –
The title of the pentest job.
status (string) –
The current status of the pentest job.
createdAt (datetime) –
The date and time the pentest job was created, in UTC format.
updatedAt (datetime) –
The date and time the pentest job was last updated, in UTC format.
pentestId (string) –
The unique identifier of the pentest.
pentestJobId (string) –
The unique identifier of the resumed pentest job.
version (string) –
The version of the pentest job that the resume started. The version increases each time the job is resumed.