get_software_resources_v2
¶
get_software_resources_v2(
*,
config_overrides: Optional[SecurityHubClientConfig] = None,
package_name: Optional[NonEmptyString] = None,
package_type: Optional[NonEmptyString] = None,
package_version: Optional[NonEmptyString] = None,
filters: Optional[SoftwareFilters] = None,
scopes: Optional[SoftwareScopes] = None,
sort_criteria: Optional[SortCriteria] = None,
next_token: Optional[NextToken] = None,
max_results: Optional[MaxResults] = None,
) -> GetSoftwareResourcesV2Response
Returns a list of resources that contain a specific software package. You identify the package with PackageName and PackageType. To narrow the results to one version of the package, include PackageVersion.
You can use the Scopes parameter to define the data boundary for the query. Currently, Scopes supports AwsOrganizations. With AwsOrganizations, you can 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 further refine results based on resource attributes, such as ResourceType or Region.
This operation returns paginated results. To retrieve additional results, use the NextToken value from the previous response.
Parameters:
-
package_name(Optional[NonEmptyString], default:None) –The name of the software package, for example
openssl. This value must match thePackageNamereturned byGetSoftwareV2. -
package_type(Optional[NonEmptyString], default:None) –The type of the software package, for example
operating-system,application, orlibrary. This value must match thePackageTypereturned byGetSoftwareV2. -
package_version(Optional[NonEmptyString], default:None) –The version of the software package, for example
3.0.8. If you omit this value, the response includes resources that contain any version of the package. -
filters(Optional[SoftwareFilters], default:None) –Filters the returned resources based on a set of criteria. You can nest composite filters up to three levels deep.
-
scopes(Optional[SoftwareScopes], default:None) –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
AccessDeniedException.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
Scopes.AwsOrganizations. If multiple entries are specified, the entries are combined using OR logic. -
sort_criteria(Optional[SortCriteria], default:None) –The resource attribute used to sort the list of returned resources, for example
RegionorResourceType. You can specify one sort criterion. -
next_token(Optional[NextToken], default:None) –The token required for pagination. On your first call, set the value of this parameter to
NULL. For subsequent calls, to continue listing data, set the value of this parameter to the value returned in the previous response.A token expires one hour after it's issued. If you change the request parameters between calls, the token is no longer valid and the request fails with a
ValidationException. -
max_results(Optional[MaxResults], default:None) –The maximum number of results to return. Valid values are 1–100. The default is 100.
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
6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 | |