Get Resources V2
| securityhub_get_resources_v2 | R Documentation |
Returns a list of resources¶
Description¶
Returns a list of resources.
You can use the Scopes parameter to define the data boundary for the
query. Currently, Scopes supports AwsOrganizations, which lets you
retrieve resources from your entire organization or from specific
organizational units. Only the delegated administrator account can use
Scopes.
You can use the Filters parameter to refine results based on resource
attributes. You can use Scopes and Filters independently or
together. When both are provided, Scopes narrows the data set first,
and then Filters refines results within that scoped data set.
Usage¶
securityhub_get_resources_v2(Filters, Scopes, SortCriteria, NextToken,
MaxResults)
Arguments¶
Filters |
Filters resources based on a set of criteria. |
Scopes |
Limits 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 This parameter is optional. If you omit it, the delegated administrator sees resources from all accounts across the entire organization. Other accounts see only their own resources. You can specify up to 10 entries in
|
SortCriteria |
The resource attributes used to sort the list of returned resources. |
NextToken |
The token required for pagination. On your first call, set the
value of this parameter to |
MaxResults |
The maximum number of results to return. |
Value¶
A list with the following syntax:
list(
Resources = list(
list(
ResourceGuid = "string",
ResourceId = "string",
AccountId = "string",
Region = "string",
ResourceCategory = "Compute"|"Database"|"Storage"|"Code"|"AI/ML"|"Identity"|"Network"|"Other",
ResourceType = "string",
ResourceName = "string",
ResourceCreationTimeDt = "string",
ResourceDetailCaptureTimeDt = "string",
FindingsSummary = list(
list(
FindingType = "string",
ProductName = "string",
TotalFindings = 123,
Severities = list(
Other = 123,
Fatal = 123,
Critical = 123,
High = 123,
Medium = 123,
Low = 123,
Informational = 123,
Unknown = 123
)
)
),
ResourceTags = list(
list(
Key = "string",
Value = "string"
)
),
ResourceConfig = list()
)
),
NextToken = "string"
)
Request syntax¶
svc$get_resources_v2(
Filters = list(
CompositeFilters = list(
list(
StringFilters = list(
list(
FieldName = "ResourceGuid"|"ResourceId"|"AccountId"|"Region"|"ResourceCategory"|"ResourceType"|"ResourceName"|"FindingsSummary.FindingType"|"FindingsSummary.ProductName",
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",
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"
)
)
),
SortCriteria = list(
list(
Field = "string",
SortOrder = "asc"|"desc"
)
),
NextToken = "string",
MaxResults = 123
)