get_finding_statistics_v2
¶
get_finding_statistics_v2(
*,
config_overrides: Optional[SecurityHubClientConfig] = None,
group_by_rules: Optional[GroupByRules] = None,
scopes: Optional[FindingScopes] = None,
sort_order: Optional[SortOrder] = None,
max_statistic_results: Optional[MaxStatisticResults] = None,
) -> GetFindingStatisticsV2Response
Returns aggregated statistical data about findings.
You can use the Scopes parameter to define the data boundary for the query. Currently, Scopes supports AwsOrganizations, which lets you aggregate findings from your entire organization or from specific organizational units. Only the delegated administrator account can use Scopes.
GetFindingStatisticsV2 uses securityhub:GetAdhocInsightResults in the Action element of an IAM policy statement. You must have permission to perform the securityhub:GetAdhocInsightResults action.
Parameters:
-
group_by_rules(Optional[GroupByRules], default:None) –Specifies how security findings should be aggregated and organized in the statistical analysis. It can accept up to 5
groupByfields in a single call. -
scopes(Optional[FindingScopes], default:None) –Limits the results to findings from specific organizational units or from the delegated administrator's organization. Only the delegated administrator account can use this parameter. Other accounts receive an
AccessDeniedException.This parameter is optional. If you omit it, the delegated administrator sees statistics from all accounts across the entire organization. Other accounts see only statistics for their own findings.
You can specify up to 10 entries in
Scopes.AwsOrganizations. If multiple entries are specified, the entries are combined using OR logic. -
sort_order(Optional[SortOrder], default:None) –Orders the aggregation count in descending or ascending order. Descending order is the default.
-
max_statistic_results(Optional[MaxStatisticResults], default:None) –The maximum number of results to be returned.
Raises:
-
AccessDeniedException–You don't have permission to perform the action specified in the request.
-
ConflictException–The request causes conflict with the current state of the service resource.
-
InternalServerException–The request has failed due to an internal failure of the service.
-
OrganizationalUnitNotFoundException–The request failed because one or more organizational units specified in the request don't exist within the caller's organization.
-
OrganizationNotFoundException–The request failed because one or more organizations specified in the request don't exist or don't belong to the caller's organization.
-
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
4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 | |