get_software_statistics_v2
¶
get_software_statistics_v2(
*,
config_overrides: Optional[SecurityHubClientConfig] = None,
group_by_rules: Optional[SoftwareGroupByRules] = None,
scopes: Optional[SoftwareScopes] = None,
sort_order: Optional[SortOrder] = None,
max_statistic_results: Optional[MaxStatisticResults] = None,
) -> GetSoftwareStatisticsV2Response
Retrieves aggregated counts of software packages installed on your resources, grouped by a field that you specify. For example, you can return the most common package types or the accounts with the most installed packages.
Each count is the number of package-to-resource pairs that match the grouping value. A package installed on three resources contributes three to the count.
You can use the Scopes parameter to define the data boundary for the query. Currently, Scopes supports AwsOrganizations. With AwsOrganizations, you can aggregate software from your entire organization or from specific organizational units. Only the delegated administrator account can use Scopes.
This operation doesn't paginate. Use MaxStatisticResults to control how many grouping values are returned.
Parameters:
-
group_by_rules(Optional[SoftwareGroupByRules], default:None) –How software statistics should be aggregated and organized in the response.
-
scopes(Optional[SoftwareScopes], default:None) –Limits the results to software on resources 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 software on their own resources.
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) –Sorts aggregated statistics by count. The default is descending, which returns the values with the highest counts first.
-
max_statistic_results(Optional[MaxStatisticResults], default:None) –The maximum number of grouping values to return. Valid values are 1–400. The default is 400.
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.
-
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
6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 | |