get_software_resources_v2
async
¶
get_software_resources_v2(
*,
config_overrides: Optional[AsyncSecurityHubClientConfig] = 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/async_security_hub.py
6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 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 | |