- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
GetJobCommand
Returns a job for a branch of an Amplify app.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { AmplifyClient, GetJobCommand } from "@aws-sdk/client-amplify"; // ES Modules import
// const { AmplifyClient, GetJobCommand } = require("@aws-sdk/client-amplify"); // CommonJS import
const client = new AmplifyClient(config);
const input = { // GetJobRequest
appId: "STRING_VALUE", // required
branchName: "STRING_VALUE", // required
jobId: "STRING_VALUE", // required
};
const command = new GetJobCommand(input);
const response = await client.send(command);
// { // GetJobResult
// job: { // Job
// summary: { // JobSummary
// jobArn: "STRING_VALUE", // required
// jobId: "STRING_VALUE", // required
// commitId: "STRING_VALUE", // required
// commitMessage: "STRING_VALUE", // required
// commitTime: new Date("TIMESTAMP"), // required
// startTime: new Date("TIMESTAMP"), // required
// status: "CREATED" || "PENDING" || "PROVISIONING" || "RUNNING" || "FAILED" || "SUCCEED" || "CANCELLING" || "CANCELLED", // required
// endTime: new Date("TIMESTAMP"),
// jobType: "RELEASE" || "RETRY" || "MANUAL" || "WEB_HOOK", // required
// sourceUrl: "STRING_VALUE",
// sourceUrlType: "ZIP" || "BUCKET_PREFIX",
// },
// steps: [ // Steps // required
// { // Step
// stepName: "STRING_VALUE", // required
// startTime: new Date("TIMESTAMP"), // required
// status: "CREATED" || "PENDING" || "PROVISIONING" || "RUNNING" || "FAILED" || "SUCCEED" || "CANCELLING" || "CANCELLED", // required
// endTime: new Date("TIMESTAMP"), // required
// logUrl: "STRING_VALUE",
// artifactsUrl: "STRING_VALUE",
// testArtifactsUrl: "STRING_VALUE",
// testConfigUrl: "STRING_VALUE",
// screenshots: { // Screenshots
// "<keys>": "STRING_VALUE",
// },
// statusReason: "STRING_VALUE",
// context: "STRING_VALUE",
// },
// ],
// },
// };
GetJobCommand Input
See GetJobCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
appId Required | string | undefined | The unique ID for an Amplify app. |
branchName Required | string | undefined | The name of the branch to use for the job. |
jobId Required | string | undefined | The unique ID for the job. |
GetJobCommand Output
See GetJobCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
job Required | Job | undefined | Describes an execution job for an Amplify app. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
BadRequestException | client | A request contains unexpected data. |
InternalFailureException | server | The service failed to perform an operation due to an internal issue. |
LimitExceededException | client | A resource could not be created because service quotas were exceeded. |
NotFoundException | client | An entity was not found during an operation. |
UnauthorizedException | client | An operation failed due to a lack of access. |
AmplifyServiceException | Base exception class for all service exceptions from Amplify service. |