|
| 1 | +// smithy-typescript generated code |
| 2 | +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; |
| 3 | +import { getSerdePlugin } from "@smithy/middleware-serde"; |
| 4 | +import { Command as $Command } from "@smithy/smithy-client"; |
| 5 | +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; |
| 6 | + |
| 7 | +import { EMRServerlessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EMRServerlessClient"; |
| 8 | +import { commonParams } from "../endpoint/EndpointParameters"; |
| 9 | +import { ListJobRunAttemptsRequest, ListJobRunAttemptsResponse } from "../models/models_0"; |
| 10 | +import { de_ListJobRunAttemptsCommand, se_ListJobRunAttemptsCommand } from "../protocols/Aws_restJson1"; |
| 11 | + |
| 12 | +/** |
| 13 | + * @public |
| 14 | + */ |
| 15 | +export { __MetadataBearer, $Command }; |
| 16 | +/** |
| 17 | + * @public |
| 18 | + * |
| 19 | + * The input for {@link ListJobRunAttemptsCommand}. |
| 20 | + */ |
| 21 | +export interface ListJobRunAttemptsCommandInput extends ListJobRunAttemptsRequest {} |
| 22 | +/** |
| 23 | + * @public |
| 24 | + * |
| 25 | + * The output of {@link ListJobRunAttemptsCommand}. |
| 26 | + */ |
| 27 | +export interface ListJobRunAttemptsCommandOutput extends ListJobRunAttemptsResponse, __MetadataBearer {} |
| 28 | + |
| 29 | +/** |
| 30 | + * <p>Lists all attempt of a job run.</p> |
| 31 | + * @example |
| 32 | + * Use a bare-bones client and the command you need to make an API call. |
| 33 | + * ```javascript |
| 34 | + * import { EMRServerlessClient, ListJobRunAttemptsCommand } from "@aws-sdk/client-emr-serverless"; // ES Modules import |
| 35 | + * // const { EMRServerlessClient, ListJobRunAttemptsCommand } = require("@aws-sdk/client-emr-serverless"); // CommonJS import |
| 36 | + * const client = new EMRServerlessClient(config); |
| 37 | + * const input = { // ListJobRunAttemptsRequest |
| 38 | + * applicationId: "STRING_VALUE", // required |
| 39 | + * jobRunId: "STRING_VALUE", // required |
| 40 | + * nextToken: "STRING_VALUE", |
| 41 | + * maxResults: Number("int"), |
| 42 | + * }; |
| 43 | + * const command = new ListJobRunAttemptsCommand(input); |
| 44 | + * const response = await client.send(command); |
| 45 | + * // { // ListJobRunAttemptsResponse |
| 46 | + * // jobRunAttempts: [ // JobRunAttempts // required |
| 47 | + * // { // JobRunAttemptSummary |
| 48 | + * // applicationId: "STRING_VALUE", // required |
| 49 | + * // id: "STRING_VALUE", // required |
| 50 | + * // name: "STRING_VALUE", |
| 51 | + * // mode: "STRING_VALUE", |
| 52 | + * // arn: "STRING_VALUE", // required |
| 53 | + * // createdBy: "STRING_VALUE", // required |
| 54 | + * // jobCreatedAt: new Date("TIMESTAMP"), // required |
| 55 | + * // createdAt: new Date("TIMESTAMP"), // required |
| 56 | + * // updatedAt: new Date("TIMESTAMP"), // required |
| 57 | + * // executionRole: "STRING_VALUE", // required |
| 58 | + * // state: "STRING_VALUE", // required |
| 59 | + * // stateDetails: "STRING_VALUE", // required |
| 60 | + * // releaseLabel: "STRING_VALUE", // required |
| 61 | + * // type: "STRING_VALUE", |
| 62 | + * // attempt: Number("int"), |
| 63 | + * // }, |
| 64 | + * // ], |
| 65 | + * // nextToken: "STRING_VALUE", |
| 66 | + * // }; |
| 67 | + * |
| 68 | + * ``` |
| 69 | + * |
| 70 | + * @param ListJobRunAttemptsCommandInput - {@link ListJobRunAttemptsCommandInput} |
| 71 | + * @returns {@link ListJobRunAttemptsCommandOutput} |
| 72 | + * @see {@link ListJobRunAttemptsCommandInput} for command's `input` shape. |
| 73 | + * @see {@link ListJobRunAttemptsCommandOutput} for command's `response` shape. |
| 74 | + * @see {@link EMRServerlessClientResolvedConfig | config} for EMRServerlessClient's `config` shape. |
| 75 | + * |
| 76 | + * @throws {@link InternalServerException} (server fault) |
| 77 | + * <p>Request processing failed because of an error or failure with the service.</p> |
| 78 | + * |
| 79 | + * @throws {@link ResourceNotFoundException} (client fault) |
| 80 | + * <p>The specified resource was not found.</p> |
| 81 | + * |
| 82 | + * @throws {@link ValidationException} (client fault) |
| 83 | + * <p>The input fails to satisfy the constraints specified by an Amazon Web Services |
| 84 | + * service.</p> |
| 85 | + * |
| 86 | + * @throws {@link EMRServerlessServiceException} |
| 87 | + * <p>Base exception class for all service exceptions from EMRServerless service.</p> |
| 88 | + * |
| 89 | + * @public |
| 90 | + */ |
| 91 | +export class ListJobRunAttemptsCommand extends $Command |
| 92 | + .classBuilder< |
| 93 | + ListJobRunAttemptsCommandInput, |
| 94 | + ListJobRunAttemptsCommandOutput, |
| 95 | + EMRServerlessClientResolvedConfig, |
| 96 | + ServiceInputTypes, |
| 97 | + ServiceOutputTypes |
| 98 | + >() |
| 99 | + .ep({ |
| 100 | + ...commonParams, |
| 101 | + }) |
| 102 | + .m(function (this: any, Command: any, cs: any, config: EMRServerlessClientResolvedConfig, o: any) { |
| 103 | + return [ |
| 104 | + getSerdePlugin(config, this.serialize, this.deserialize), |
| 105 | + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), |
| 106 | + ]; |
| 107 | + }) |
| 108 | + .s("AwsToledoWebService", "ListJobRunAttempts", {}) |
| 109 | + .n("EMRServerlessClient", "ListJobRunAttemptsCommand") |
| 110 | + .f(void 0, void 0) |
| 111 | + .ser(se_ListJobRunAttemptsCommand) |
| 112 | + .de(de_ListJobRunAttemptsCommand) |
| 113 | + .build() {} |
0 commit comments