DescribeAuditFindingCommand

Gets information about a single audit finding. Properties include the reason for noncompliance, the severity of the issue, and the start time when the audit that returned the finding.

Requires permission to access the DescribeAuditFinding  action.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { IoTClient, DescribeAuditFindingCommand } from "@aws-sdk/client-iot"; // ES Modules import
// const { IoTClient, DescribeAuditFindingCommand } = require("@aws-sdk/client-iot"); // CommonJS import
const client = new IoTClient(config);
const input = { // DescribeAuditFindingRequest
  findingId: "STRING_VALUE", // required
};
const command = new DescribeAuditFindingCommand(input);
const response = await client.send(command);
// { // DescribeAuditFindingResponse
//   finding: { // AuditFinding
//     findingId: "STRING_VALUE",
//     taskId: "STRING_VALUE",
//     checkName: "STRING_VALUE",
//     taskStartTime: new Date("TIMESTAMP"),
//     findingTime: new Date("TIMESTAMP"),
//     severity: "CRITICAL" || "HIGH" || "MEDIUM" || "LOW",
//     nonCompliantResource: { // NonCompliantResource
//       resourceType: "DEVICE_CERTIFICATE" || "CA_CERTIFICATE" || "IOT_POLICY" || "COGNITO_IDENTITY_POOL" || "CLIENT_ID" || "ACCOUNT_SETTINGS" || "ROLE_ALIAS" || "IAM_ROLE" || "ISSUER_CERTIFICATE",
//       resourceIdentifier: { // ResourceIdentifier
//         deviceCertificateId: "STRING_VALUE",
//         caCertificateId: "STRING_VALUE",
//         cognitoIdentityPoolId: "STRING_VALUE",
//         clientId: "STRING_VALUE",
//         policyVersionIdentifier: { // PolicyVersionIdentifier
//           policyName: "STRING_VALUE",
//           policyVersionId: "STRING_VALUE",
//         },
//         account: "STRING_VALUE",
//         iamRoleArn: "STRING_VALUE",
//         roleAliasArn: "STRING_VALUE",
//         issuerCertificateIdentifier: { // IssuerCertificateIdentifier
//           issuerCertificateSubject: "STRING_VALUE",
//           issuerId: "STRING_VALUE",
//           issuerCertificateSerialNumber: "STRING_VALUE",
//         },
//         deviceCertificateArn: "STRING_VALUE",
//       },
//       additionalInfo: { // StringMap
//         "<keys>": "STRING_VALUE",
//       },
//     },
//     relatedResources: [ // RelatedResources
//       { // RelatedResource
//         resourceType: "DEVICE_CERTIFICATE" || "CA_CERTIFICATE" || "IOT_POLICY" || "COGNITO_IDENTITY_POOL" || "CLIENT_ID" || "ACCOUNT_SETTINGS" || "ROLE_ALIAS" || "IAM_ROLE" || "ISSUER_CERTIFICATE",
//         resourceIdentifier: {
//           deviceCertificateId: "STRING_VALUE",
//           caCertificateId: "STRING_VALUE",
//           cognitoIdentityPoolId: "STRING_VALUE",
//           clientId: "STRING_VALUE",
//           policyVersionIdentifier: {
//             policyName: "STRING_VALUE",
//             policyVersionId: "STRING_VALUE",
//           },
//           account: "STRING_VALUE",
//           iamRoleArn: "STRING_VALUE",
//           roleAliasArn: "STRING_VALUE",
//           issuerCertificateIdentifier: {
//             issuerCertificateSubject: "STRING_VALUE",
//             issuerId: "STRING_VALUE",
//             issuerCertificateSerialNumber: "STRING_VALUE",
//           },
//           deviceCertificateArn: "STRING_VALUE",
//         },
//         additionalInfo: {
//           "<keys>": "STRING_VALUE",
//         },
//       },
//     ],
//     reasonForNonCompliance: "STRING_VALUE",
//     reasonForNonComplianceCode: "STRING_VALUE",
//     isSuppressed: true || false,
//   },
// };

DescribeAuditFindingCommand Input

Parameter
Type
Description
findingId
Required
string | undefined

A unique identifier for a single audit finding. You can use this identifier to apply mitigation actions to the finding.

DescribeAuditFindingCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
finding
AuditFinding | undefined

The findings (results) of the audit.

Throws

Name
Fault
Details
InternalFailureException
server

An unexpected error has occurred.

InvalidRequestException
client

The request is not valid.

ResourceNotFoundException
client

The specified resource does not exist.

ThrottlingException
client

The rate exceeds the limit.

IoTServiceException
Base exception class for all service exceptions from IoT service.