SearchInventory
Searches certificate inventory for organizations in AWS Certificate Manager (ACM) and returns one page of certificates, with the number that match. Filter combines typed predicates with And, Or, and Not. Omit it to search every certificate. Results are sorted by NotAfter, latest first, unless SortBy and SortOrder say otherwise. To get the next page, pass the NextToken from the response.
You must call this operation from the organization's management account or its delegated administrator account. Otherwise, the operation returns AccessDeniedException. Before the first PutInventoryConfiguration call, the management account gets ResourceNotFoundException, and a delegated administrator gets AccessDeniedException.
Request Syntax
{
"Filter": { ... },
"MaxResults": number,
"NextToken": "string",
"SortBy": "string",
"SortOrder": "string"
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
In the following list, the required parameters are described first.
- Filter
-
Which certificates to return. Omit it to return every certificate.
Type: InventoryFilterStatement object
Note: This object is a Union. Only one member of this object can be specified or returned.
Required: No
- MaxResults
-
The maximum number of certificates to return, 1 to 100. Defaults to 25.
Type: Integer
Valid Range: Minimum value of 1. Maximum value of 100.
Required: No
- NextToken
-
The
NextTokenfrom the previous response, to read the next page. Use the sameFilter,SortBy, andSortOrder. Otherwise, the operation returnsValidationException.Type: String
Length Constraints: Minimum length of 1. Maximum length of 2048.
Required: No
- SortBy
-
The field to sort by. Defaults to
NOT_AFTER.Type: String
Valid Values:
NOT_AFTER | NOT_BEFORE | USAGE_COUNT | SUBJECT | HIGHEST_FINDING_SEVERITYRequired: No
- SortOrder
-
The sort direction. Defaults to
DESCENDING.Type: String
Valid Values:
ASCENDING | DESCENDINGRequired: No
Response Syntax
{
"Certificates": [
{
"FindingCounts": {
"Critical": number,
"High": number,
"Informational": number,
"Low": number,
"Medium": number
},
"HighestFindingSeverity": "string",
"Identifier": "string",
"Identity": {
"HasAdditionalIdentifiers": boolean,
"Identifiers": [ "string" ],
"Subject": "string"
},
"MaterialType": "string",
"RelatedResourceCount": number,
"UsageCount": number,
"Validity": {
"NotAfter": number,
"NotBefore": number
},
"X509Details": {
"IssuanceType": "string",
"Issuer": "string",
"KeyAlgorithm": "string",
"KeySizeBits": number,
"NotAfter": number,
"NotBefore": number,
"SerialNumber": "string",
"SignatureAlgorithm": "string",
"SubjectAlternativeNames": [ "string" ]
}
}
],
"NextToken": "string",
"TotalCount": number,
"TotalCountRelation": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- Certificates
-
The certificates on this page, in the requested order.
Type: Array of InventoryCertificate objects
Array Members: Minimum number of 0 items. Maximum number of 100 items.
- TotalCount
-
How many certificates match the filter in total, not only on this page. Counted when each page is read, so it can change between pages if the inventory changes.
Type: Long
- TotalCountRelation
-
Whether
TotalCountis exact or a lower bound.Type: String
Valid Values:
EXACT | AT_LEAST - NextToken
-
Pass this value as
NextTokento read the next page. Absent on the last page.Type: String
Errors
For information about the errors that are common to all actions, see Common Error Types.
- AccessDeniedException
-
You do not have access required to perform this action.
HTTP Status Code: 400
- InternalServerException
-
The request processing has failed because of an unknown error, exception, or failure.
HTTP Status Code: 500
- ResourceNotFoundException
-
The specified certificate cannot be found in the caller's account or the caller's account cannot be found.
HTTP Status Code: 400
- ThrottlingException
-
The request was denied because it exceeded a quota.
- throttlingReasons
-
One or more reasons why the request was throttled.
HTTP Status Code: 400
- ValidationException
-
The supplied input failed to satisfy constraints of an AWS service.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: