get_remediations_v2
¶
get_remediations_v2(
*,
config_overrides: Optional[SecurityHubClientConfig] = None,
target_uid: Optional[RemediationStringUid] = None,
metadata_uid: Optional[RemediationStringUid] = None,
filters: Optional[RemediationFilters] = None,
show_guidance: Optional[Boolean] = None,
guidance_format: Optional[GuidanceFormat] = None,
max_results: Optional[MaxResults] = None,
next_token: Optional[NextToken] = None,
) -> GetRemediationsV2Response
Retrieves remediation targets for the account, or for all member accounts if the caller is the delegated administrator. Results are sorted by priority, highest first, and are paginated. Use TargetUid or MetadataUid to scope the request to a single target or finding.
Parameters:
-
target_uid(Optional[RemediationStringUid], default:None) –The unique identifier (ID) of an existing remediation target to return. Returns the single matching target. You can't use
TargetUidtogether withMetadataUidorFilters. -
metadata_uid(Optional[RemediationStringUid], default:None) –The unique identifier (ID) of the Security Hub exposure finding, found under the
metadata.uidfield of the finding. Returns the remediation targets associated with that finding. You can't useMetadataUidtogether withTargetUidorFilters. -
filters(Optional[RemediationFilters], default:None) –Filters remediation targets based on a set of criteria. You can't use
Filterstogether withTargetUidorMetadataUid. -
show_guidance(Optional[Boolean], default:None) –Specifies whether to show remediation target guidance.
-
guidance_format(Optional[GuidanceFormat], default:None) –The format of the remediation guidance examples to return. Valid values are
All,AwsCli,Cli,Python,Terraform,Cdk,CloudFormation,IaC, andTemplate. If you don't specify a value, all formats are returned. Applies only whenShowGuidanceistrue. -
max_results(Optional[MaxResults], default:None) –The maximum number of results to return. Valid range is 1-100. If you don't specify a value, the operation returns up to 25 results.
-
next_token(Optional[NextToken], default:None) –The token used to paginate the remediations target list returned. On your first call to
GetRemediationsV2, omit this parameter or set it toNULL. For subsequent calls, use theNextTokenvalue returned in the previous response to retrieve the next page of results.
Raises:
-
AccessDeniedException–You don't have permission to perform the action specified in the request.
-
InternalServerException–The request has failed due to an internal failure of the service.
-
ResourceNotFoundException–The request was rejected because we can't find the specified resource.
-
ThrottlingException–The limit on the number of requests per second was exceeded.
-
ValidationException–The request has failed validation because it's missing required fields or has invalid inputs.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_securityhub/_services/security_hub.py
5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 | |