Retrieves statistical information about Amazon Web Services resources and their associated security findings¶
Description¶
Retrieves statistical information about Amazon Web Services resources and their associated security findings.
You can use the Scopes parameter to define the data boundary for the query. Currently, Scopes supports AwsOrganizations, which lets you aggregate resources from your entire organization or from specific organizational units. Only the delegated administrator account can use Scopes.
If you set GroupByField to ResourceSubCategory, ResourceInfo.AIDetails.HostResourceType, or ResourceInfo.AIDetails.CanonicalId, you must include a ResourceCategory string filter with comparison set to EQUALS and value AI/ML in the corresponding ResourceGroupByRule.
Usage¶
Arguments¶
-
GroupByRules[required] How resource statistics should be aggregated and organized in the response.
-
ScopesLimits the results to 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 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. -
SortOrderSorts aggregated statistics.
-
MaxStatisticResultsThe maximum number of results to be returned.
Value¶
A list with the following syntax:
list(
GroupByResults = list(
list(
GroupByField = "string",
GroupByValues = list(
list(
FieldValue = "string",
Count = 123
)
)
)
)
)
Request syntax¶
svc$get_resources_statistics_v2(
GroupByRules = list(
list(
GroupByField = "AccountId"|"AccountName"|"Region"|"ResourceProvider"|"ResourceOwnerAccountId"|"ResourceOwnerOrgId"|"ResourceCloudPartition"|"ResourceRegion"|"ResourceCategory"|"ResourceType"|"ResourceName"|"FindingsSummary.FindingType"|"ResourceSubCategory"|"DiscoveryType"|"ResourceInfo.AIDetails.HostResourceType"|"ResourceInfo.AIDetails.CanonicalId",
Filters = list(
CompositeFilters = list(
list(
StringFilters = list(
list(
FieldName = "ResourceGuid"|"ResourceId"|"AccountId"|"AccountName"|"Region"|"ResourceProvider"|"ResourceOwnerAccountId"|"ResourceOwnerOrgId"|"ResourceCloudPartition"|"ResourceRegion"|"ResourceCategory"|"ResourceType"|"ResourceName"|"FindingsSummary.FindingType"|"FindingsSummary.ProductName"|"ResourceSubCategory"|"DiscoveryType"|"ResourceInfo.AIDetails.HostResourceGuid"|"ResourceInfo.AIDetails.HostResourceType"|"ResourceInfo.AIDetails.CanonicalId",
Filter = list(
Value = "string",
Comparison = "EQUALS"|"PREFIX"|"NOT_EQUALS"|"PREFIX_NOT_EQUALS"|"CONTAINS"|"NOT_CONTAINS"|"CONTAINS_WORD"
)
)
),
DateFilters = list(
list(
FieldName = "ResourceDetailCaptureTime"|"ResourceCreationTime",
Filter = list(
Start = "string",
End = "string",
DateRange = list(
Value = 123,
Unit = "DAYS",
Comparison = "WITHIN"|"OLDER_THAN"
)
)
)
),
NumberFilters = list(
list(
FieldName = "FindingsSummary.TotalFindings"|"FindingsSummary.Severities.Other"|"FindingsSummary.Severities.Fatal"|"FindingsSummary.Severities.Critical"|"FindingsSummary.Severities.High"|"FindingsSummary.Severities.Medium"|"FindingsSummary.Severities.Low"|"FindingsSummary.Severities.Informational"|"FindingsSummary.Severities.Unknown"|"ResourceInfo.AIDetails.SelfHostedAIModelResourceCount"|"ResourceInfo.AIDetails.SelfHostedAIAgentResourceCount"|"ResourceInfo.AIDetails.SelfHostedAIModelServingResourceCount"|"ResourceInfo.AIDetails.SelfHostedAIExternalEndpointResourceCount"|"ResourceInfo.AIDetails.SelfHostedAIDevelopmentResourceCount"|"ResourceInfo.AIDetails.SelfHostedAIAgentFrameworkResourceCount"|"ResourceInfo.AIDetails.SelfHostedAIAgentToolsAndIdentityResourceCount"|"ResourceInfo.AIDetails.SelfHostedTotalAIResourceCount",
Filter = list(
Gte = 123.0,
Lte = 123.0,
Eq = 123.0,
Gt = 123.0,
Lt = 123.0
)
)
),
MapFilters = list(
list(
FieldName = "ResourceTags",
Filter = list(
Key = "string",
Value = "string",
Comparison = "EQUALS"|"NOT_EQUALS"|"CONTAINS"|"NOT_CONTAINS"
)
)
),
NestedCompositeFilters = list(),
Operator = "AND"|"OR"
)
),
CompositeOperator = "AND"|"OR"
)
)
),
Scopes = list(
AwsOrganizations = list(
list(
OrganizationId = "string",
OrganizationalUnitId = "string"
)
)
),
SortOrder = "asc"|"desc",
MaxStatisticResults = 123
)