GetJobDocumentCommand

Gets a job document.

Requires permission to access the GetJobDocument  action.

Example Syntax

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

import { IoTClient, GetJobDocumentCommand } from "@aws-sdk/client-iot"; // ES Modules import
// const { IoTClient, GetJobDocumentCommand } = require("@aws-sdk/client-iot"); // CommonJS import
const client = new IoTClient(config);
const input = { // GetJobDocumentRequest
  jobId: "STRING_VALUE", // required
  beforeSubstitution: true || false,
};
const command = new GetJobDocumentCommand(input);
const response = await client.send(command);
// { // GetJobDocumentResponse
//   document: "STRING_VALUE",
// };

GetJobDocumentCommand Input

See GetJobDocumentCommandInput for more details

Parameter
Type
Description
jobId
Required
string | undefined

The unique identifier you assigned to this job when it was created.

beforeSubstitution
boolean | undefined

Provides a view of the job document before and after the substitution parameters have been resolved with their exact values.

GetJobDocumentCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
document
string | undefined

The job document content.

Throws

Name
Fault
Details
InvalidRequestException
client

The request is not valid.

ResourceNotFoundException
client

The specified resource does not exist.

ServiceUnavailableException
server

The service is temporarily unavailable.

ThrottlingException
client

The rate exceeds the limit.

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