Returns certificate counts from Certificate inventory for organizations, broken down by the requested aggregates. The certificate inventory is the set of certificates observed in the organization’s accounts. An aggregate groups the count by one property, such as Region or key algorithm. Every aggregate except EXPIRY_WINDOW is ranked: it lists groups largest first and omits empty groups.
The counts are precomputed, so the response and each aggregate result carry their own UpdatedAt, which can be earlier than the request. For a count under any other filter, use SearchInventory, whose TotalCount is computed at query time.
Each aggregate is computed on its own, so one aggregate can be FAILED while the others are COMPLETE. Before the first PutInventoryConfiguration call, and while ProvisioningStatus is ENABLING, the counts might not be computed yet. Until they are, CertificateCount is 0 and UpdatedAt is absent. Ranked aggregates are COMPLETE with an empty Groups list. EXPIRY_WINDOW is FAILED until the first daily EXPIRY_WINDOW computation has run. While Status is DISABLED, retained data is served until retention removes it.
The caller must be the organization’s management account or its delegated administrator. If the caller’s account is not in an organization, or the caller is neither of these accounts, the operation returns AccessDeniedException. The message names the unmet condition. GetInventoryInsights does not return ResourceNotFoundException. Before the first PutInventoryConfiguration call, only the management account can call it; a delegated administrator receives AccessDeniedException.
A repeated aggregate returns ValidationException. An entry that selects no aggregate, or more than one, also returns ValidationException.
See also: AWS API Documentation
get-inventory-insights
--requested-aggregates <value>
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
[--debug]
[--endpoint-url <value>]
[--no-verify-ssl]
[--no-paginate]
[--output <value>]
[--query <value>]
[--profile <value>]
[--region <value>]
[--version <value>]
[--color <value>]
[--no-sign-request]
[--ca-bundle <value>]
[--cli-read-timeout <value>]
[--cli-connect-timeout <value>]
[--cli-binary-format <value>]
[--no-cli-pager]
[--cli-auto-prompt]
[--no-cli-auto-prompt]
[--cli-error-format <value>]
[--help]
--requested-aggregates (list) [required]
The aggregates to return, 0 to 25 entries. CertificateCount is always returned and needs no entry, so an empty list returns CertificateCount with an empty Aggregates list. Each aggregate can appear at most once. A repeated aggregate, or an aggregate the service does not support, returns ValidationException.
Constraints:
- min:
0- max:
25(tagged union structure)
Selects one aggregate and carries its options. Only HighestFindingSeverity takes options. Each member returns the InventoryAggregateResult with the matching Aggregate:
- ExpiryWindow: EXPIRY_WINDOW
- IssuanceType: ISSUANCE_TYPE
- Region: REGION
- InUse: IN_USE
- KeyAlgorithm: KEY_ALGORITHM
- HighestFindingSeverity: HIGHEST_FINDING_SEVERITY
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:ExpiryWindow,IssuanceType,Region,InUse,KeyAlgorithm,HighestFindingSeverity.ExpiryWindow -> (structure)
Requests expiry-window groups.IssuanceType -> (structure)
Requests issuance-type groups.Region -> (structure)
Requests Region groups.InUse -> (structure)
Requests usage-presence groups.KeyAlgorithm -> (structure)
Requests key-algorithm groups.HighestFindingSeverity -> (structure)
Requests groups by the highest severity among each certificate’s open findings. Certificates whose findings have not been evaluated are counted in a NOT_EVALUATED group, so the groups sum to CertificateCount.
GroupBy -> (string)
Adds a second breakdown to the result. CERTIFICATE_TYPE returns the severity groups of each certificate type, in CertificateTypeGroups. These come from the same precomputed counts as Groups. The result is FAILED until the organization’s per-type counts have first been computed. If you omit it, the result has only the severity groups.
Possible values:
CERTIFICATE_TYPE
Shorthand Syntax:
ExpiryWindow={},IssuanceType={},Region={},InUse={},KeyAlgorithm={},HighestFindingSeverity={GroupBy=string} ...
JSON Syntax:
[
{
"ExpiryWindow": {
},
"IssuanceType": {
},
"Region": {
},
"InUse": {
},
"KeyAlgorithm": {
},
"HighestFindingSeverity": {
"GroupBy": "CERTIFICATE_TYPE"
}
}
...
]
--cli-input-json | --cli-input-yaml (string)
Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml.
--generate-cli-skeleton (string)
Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command. The generated JSON skeleton is not stable between versions of the AWS CLI and there are no backwards compatibility guarantees in the JSON skeleton generated.
--debug (boolean)
Turn on debug logging.
--endpoint-url (string)
Override command’s default URL with the given URL.
--no-verify-ssl (boolean)
By default, the AWS CLI uses SSL when communicating with AWS services. For each SSL connection, the AWS CLI will verify SSL certificates. This option overrides the default behavior of verifying SSL certificates.
--no-paginate (boolean)
Disable automatic pagination. If automatic pagination is disabled, the AWS CLI will only make one call, for the first page of results.
--output (string)
The formatting style for command output.
--query (string)
A JMESPath query to use in filtering the response data.
--profile (string)
Use a specific profile from your credential file.
--region (string)
The region to use. Overrides config/env settings.
--version (string)
Display the version of this tool.
--color (string)
Turn on/off color output.
--no-sign-request (boolean)
Do not sign requests. Credentials will not be loaded if this argument is provided.
--ca-bundle (string)
The CA certificate bundle to use when verifying SSL certificates. Overrides config/env settings.
--cli-read-timeout (int)
The maximum socket read time in seconds. If the value is set to 0, the socket read will be blocking and not timeout. The default value is 60 seconds.
--cli-connect-timeout (int)
The maximum socket connect time in seconds. If the value is set to 0, the socket connect will be blocking and not timeout. The default value is 60 seconds.
--cli-binary-format (string)
The formatting style to be used for binary blobs. The default format is base64. The base64 format expects binary blobs to be provided as a base64 encoded string. The raw-in-base64-out format preserves compatibility with AWS CLI V1 behavior and binary values must be passed literally. When providing contents from a file that map to a binary blob fileb:// will always be treated as binary and use the file contents directly regardless of the cli-binary-format setting. When using file:// the file contents will need to properly formatted for the configured cli-binary-format.
--no-cli-pager (boolean)
Disable cli pager for output.
--cli-auto-prompt (boolean)
Automatically prompt for CLI input parameters.
--no-cli-auto-prompt (boolean)
Disable automatically prompt for CLI input parameters.
--cli-error-format (string)
The formatting style for error output. By default, errors are displayed in enhanced format.
--help (boolean)
Display help for the command/subcommand.
CertificateCount -> (long)
The number of certificates in the organization’s inventory.
UpdatedAt -> (timestamp)
When CertificateCount was last recomputed, in UTC. Absent when the organization’s counts have not been computed yet.
Aggregates -> (list)
One result for each requested aggregate, in request order.
Constraints:
- min:
0- max:
25(structure)
One requested aggregate and its groups.
EXPIRY_WINDOW always returns its six fixed groups, including groups with a count of 0. They are ordered from expired to 91 or more days.
ISSUANCE_TYPE, REGION, IN_USE, KEY_ALGORITHM, and HIGHEST_FINDING_SEVERITY are ranked aggregates. A ranked aggregate omits groups with a count of 0. It orders groups by Count, descending, and then by Value, ascending. It returns at most 100 groups, and OtherCount carries the remainder.
Aggregate -> (string) [required]
The aggregate this result reports.
Possible values:
EXPIRY_WINDOWISSUANCE_TYPEREGIONIN_USEKEY_ALGORITHMHIGHEST_FINDING_SEVERITYStatus -> (string) [required]
COMPLETE results include Groups; FAILED results omit them.
Possible values:
COMPLETEFAILEDUpdatedAt -> (timestamp)
When this aggregate’s counts were last recomputed, in UTC. EXPIRY_WINDOW measures days remaining from this time. Absent when Status is FAILED, or when the organization’s counts have not been computed yet.Groups -> (list)
Present only when Status is COMPLETE. Can be empty for a ranked aggregate.
Constraints:
- min:
0- max:
100(structure)
A group in an aggregate result. For EXPIRY_WINDOW, Value is absent, and MinDays and MaxDays bound the window. The expired group has MaxDays -1 and no MinDays. The 91 or more group has MinDays 91 and no MaxDays. For ranked aggregates, MinDays and MaxDays are absent.
Value -> (string)
The group key for a ranked aggregate:
- ISSUANCE_TYPE: the IssuanceType value.
- REGION: the Region code.
- IN_USE: “true” or “false”.
- KEY_ALGORITHM: the InventoryKeyAlgorithm value.
- HIGHEST_FINDING_SEVERITY: the CertificateHealthSeverity value.
Absent for EXPIRY_WINDOW. Clients must accept values they do not know. 1 to 256 characters.
Constraints:
- min:
1- max:
256Count -> (long) [required]
The number of certificates in the group.MinDays -> (integer)
Inclusive lower bound, in whole days remaining. Absent on the expired EXPIRY_WINDOW group, which has MaxDays -1.MaxDays -> (integer)
Inclusive upper bound, in whole days remaining. On the expired EXPIRY_WINDOW group, it is -1. This means the certificate had already expired: its NotAfter is before the result’s UpdatedAt. That group has no MinDays. -1 is the only negative value. Absent on the 91 or more group.OtherCount -> (long)
The total count of certificates in ranked groups beyond the 100 returned. Absent when every group was returned.CertificateTypeGroups -> (list)
The severity groups of each certificate type. Present only on a COMPLETE HIGHEST_FINDING_SEVERITY result requested with GroupBy CERTIFICATE_TYPE. Groups still holds the severity groups of all certificate types. A certificate type with no certificates is omitted. The rest are ordered alphabetically by CertificateType value.
Constraints:
- min:
0- max:
100(structure)
The HIGHEST_FINDING_SEVERITY groups of one certificate type. They are ranked like the aggregate’s own groups. Groups with a count of 0 are omitted, and the rest are ordered by Count, descending, and then by Value, ascending. The NOT_EVALUATED group counts this type’s certificates whose findings have not been evaluated yet. This is CertificateCount minus the type’s evaluated groups, so the groups sum to CertificateCount.
CertificateType -> (string) [required]
The certificate type these groups count.
Possible values:
PUBLIC_TLSPRIVATE_TLSACMEIMPORTEDOTHERCertificateCount -> (long) [required]
The number of certificates of this type in the organization’s inventory, evaluated or not. It comes from the same precomputed counts as GetInventoryInsightsOutput.CertificateCount.Groups -> (list) [required]
The severity groups of this certificate type, with the CertificateHealthSeverity value as each group’s Value.
Constraints:
- min:
0- max:
100(structure)
A group in an aggregate result. For EXPIRY_WINDOW, Value is absent, and MinDays and MaxDays bound the window. The expired group has MaxDays -1 and no MinDays. The 91 or more group has MinDays 91 and no MaxDays. For ranked aggregates, MinDays and MaxDays are absent.
Value -> (string)
The group key for a ranked aggregate:
- ISSUANCE_TYPE: the IssuanceType value.
- REGION: the Region code.
- IN_USE: “true” or “false”.
- KEY_ALGORITHM: the InventoryKeyAlgorithm value.
- HIGHEST_FINDING_SEVERITY: the CertificateHealthSeverity value.
Absent for EXPIRY_WINDOW. Clients must accept values they do not know. 1 to 256 characters.
Constraints:
- min:
1- max:
256Count -> (long) [required]
The number of certificates in the group.MinDays -> (integer)
Inclusive lower bound, in whole days remaining. Absent on the expired EXPIRY_WINDOW group, which has MaxDays -1.MaxDays -> (integer)
Inclusive upper bound, in whole days remaining. On the expired EXPIRY_WINDOW group, it is -1. This means the certificate had already expired: its NotAfter is before the result’s UpdatedAt. That group has no MinDays. -1 is the only negative value. Absent on the 91 or more group.