@aws-sdk/client-codecatalyst 3.451.0 → 3.452.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +64 -1
- package/dist-cjs/CodeCatalyst.js +10 -0
- package/dist-cjs/CodeCatalystClient.js +1 -1
- package/dist-cjs/commands/GetWorkflowCommand.js +50 -0
- package/dist-cjs/commands/GetWorkflowRunCommand.js +50 -0
- package/dist-cjs/commands/ListWorkflowRunsCommand.js +50 -0
- package/dist-cjs/commands/ListWorkflowsCommand.js +50 -0
- package/dist-cjs/commands/StartWorkflowRunCommand.js +50 -0
- package/dist-cjs/commands/index.js +5 -0
- package/dist-cjs/models/models_0.js +25 -1
- package/dist-cjs/pagination/ListWorkflowRunsPaginator.js +29 -0
- package/dist-cjs/pagination/ListWorkflowsPaginator.js +29 -0
- package/dist-cjs/pagination/index.js +2 -0
- package/dist-cjs/protocols/Aws_restJson1.js +441 -5
- package/dist-es/CodeCatalyst.js +10 -0
- package/dist-es/CodeCatalystClient.js +1 -1
- package/dist-es/commands/GetWorkflowCommand.js +46 -0
- package/dist-es/commands/GetWorkflowRunCommand.js +46 -0
- package/dist-es/commands/ListWorkflowRunsCommand.js +46 -0
- package/dist-es/commands/ListWorkflowsCommand.js +46 -0
- package/dist-es/commands/StartWorkflowRunCommand.js +46 -0
- package/dist-es/commands/index.js +5 -0
- package/dist-es/models/models_0.js +24 -0
- package/dist-es/pagination/ListWorkflowRunsPaginator.js +25 -0
- package/dist-es/pagination/ListWorkflowsPaginator.js +25 -0
- package/dist-es/pagination/index.js +2 -0
- package/dist-es/protocols/Aws_restJson1.js +429 -3
- package/dist-types/CodeCatalyst.d.ts +59 -1
- package/dist-types/CodeCatalystClient.d.ts +31 -3
- package/dist-types/commands/GetWorkflowCommand.d.ts +107 -0
- package/dist-types/commands/GetWorkflowRunCommand.d.ts +105 -0
- package/dist-types/commands/ListDevEnvironmentsCommand.d.ts +1 -1
- package/dist-types/commands/ListEventLogsCommand.d.ts +10 -1
- package/dist-types/commands/ListWorkflowRunsCommand.d.ts +114 -0
- package/dist-types/commands/ListWorkflowsCommand.d.ts +114 -0
- package/dist-types/commands/StartWorkflowRunCommand.d.ts +99 -0
- package/dist-types/commands/index.d.ts +5 -0
- package/dist-types/index.d.ts +24 -1
- package/dist-types/models/models_0.d.ts +712 -222
- package/dist-types/pagination/ListWorkflowRunsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListWorkflowsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +2 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +45 -0
- package/dist-types/ts3.4/CodeCatalyst.d.ts +85 -0
- package/dist-types/ts3.4/CodeCatalystClient.d.ts +30 -0
- package/dist-types/ts3.4/commands/GetWorkflowCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/GetWorkflowRunCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/ListWorkflowRunsCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/ListWorkflowsCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/StartWorkflowRunCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/index.d.ts +5 -0
- package/dist-types/ts3.4/models/models_0.d.ts +190 -61
- package/dist-types/ts3.4/pagination/ListWorkflowRunsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListWorkflowsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +2 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +60 -0
- package/package.json +4 -2
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.de_VerifySessionCommand = exports.de_UpdateSpaceCommand = exports.de_UpdateProjectCommand = exports.de_UpdateDevEnvironmentCommand = exports.de_StopDevEnvironmentSessionCommand = exports.de_StopDevEnvironmentCommand = exports.de_StartDevEnvironmentSessionCommand = exports.de_StartDevEnvironmentCommand = exports.de_ListSpacesCommand = exports.de_ListSourceRepositoryBranchesCommand = exports.de_ListSourceRepositoriesCommand = exports.de_ListProjectsCommand = exports.de_ListEventLogsCommand = exports.de_ListDevEnvironmentSessionsCommand = exports.de_ListDevEnvironmentsCommand = exports.de_ListAccessTokensCommand = void 0;
|
|
3
|
+
exports.de_GetProjectCommand = exports.de_GetDevEnvironmentCommand = exports.de_DeleteSpaceCommand = exports.de_DeleteSourceRepositoryCommand = exports.de_DeleteProjectCommand = exports.de_DeleteDevEnvironmentCommand = exports.de_DeleteAccessTokenCommand = exports.de_CreateSourceRepositoryBranchCommand = exports.de_CreateSourceRepositoryCommand = exports.de_CreateProjectCommand = exports.de_CreateDevEnvironmentCommand = exports.de_CreateAccessTokenCommand = exports.se_VerifySessionCommand = exports.se_UpdateSpaceCommand = exports.se_UpdateProjectCommand = exports.se_UpdateDevEnvironmentCommand = exports.se_StopDevEnvironmentSessionCommand = exports.se_StopDevEnvironmentCommand = exports.se_StartWorkflowRunCommand = exports.se_StartDevEnvironmentSessionCommand = exports.se_StartDevEnvironmentCommand = exports.se_ListWorkflowsCommand = exports.se_ListWorkflowRunsCommand = exports.se_ListSpacesCommand = exports.se_ListSourceRepositoryBranchesCommand = exports.se_ListSourceRepositoriesCommand = exports.se_ListProjectsCommand = exports.se_ListEventLogsCommand = exports.se_ListDevEnvironmentSessionsCommand = exports.se_ListDevEnvironmentsCommand = exports.se_ListAccessTokensCommand = exports.se_GetWorkflowRunCommand = exports.se_GetWorkflowCommand = exports.se_GetUserDetailsCommand = exports.se_GetSubscriptionCommand = exports.se_GetSpaceCommand = exports.se_GetSourceRepositoryCloneUrlsCommand = exports.se_GetSourceRepositoryCommand = exports.se_GetProjectCommand = exports.se_GetDevEnvironmentCommand = exports.se_DeleteSpaceCommand = exports.se_DeleteSourceRepositoryCommand = exports.se_DeleteProjectCommand = exports.se_DeleteDevEnvironmentCommand = exports.se_DeleteAccessTokenCommand = exports.se_CreateSourceRepositoryBranchCommand = exports.se_CreateSourceRepositoryCommand = exports.se_CreateProjectCommand = exports.se_CreateDevEnvironmentCommand = exports.se_CreateAccessTokenCommand = void 0;
|
|
4
|
+
exports.de_VerifySessionCommand = exports.de_UpdateSpaceCommand = exports.de_UpdateProjectCommand = exports.de_UpdateDevEnvironmentCommand = exports.de_StopDevEnvironmentSessionCommand = exports.de_StopDevEnvironmentCommand = exports.de_StartWorkflowRunCommand = exports.de_StartDevEnvironmentSessionCommand = exports.de_StartDevEnvironmentCommand = exports.de_ListWorkflowsCommand = exports.de_ListWorkflowRunsCommand = exports.de_ListSpacesCommand = exports.de_ListSourceRepositoryBranchesCommand = exports.de_ListSourceRepositoriesCommand = exports.de_ListProjectsCommand = exports.de_ListEventLogsCommand = exports.de_ListDevEnvironmentSessionsCommand = exports.de_ListDevEnvironmentsCommand = exports.de_ListAccessTokensCommand = exports.de_GetWorkflowRunCommand = exports.de_GetWorkflowCommand = exports.de_GetUserDetailsCommand = exports.de_GetSubscriptionCommand = exports.de_GetSpaceCommand = exports.de_GetSourceRepositoryCloneUrlsCommand = exports.de_GetSourceRepositoryCommand = void 0;
|
|
5
5
|
const protocol_http_1 = require("@smithy/protocol-http");
|
|
6
6
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
+
const uuid_1 = require("uuid");
|
|
7
8
|
const CodeCatalystServiceException_1 = require("../models/CodeCatalystServiceException");
|
|
8
9
|
const models_0_1 = require("../models/models_0");
|
|
9
10
|
const se_CreateAccessTokenCommand = async (input, context) => {
|
|
@@ -357,6 +358,46 @@ const se_GetUserDetailsCommand = async (input, context) => {
|
|
|
357
358
|
});
|
|
358
359
|
};
|
|
359
360
|
exports.se_GetUserDetailsCommand = se_GetUserDetailsCommand;
|
|
361
|
+
const se_GetWorkflowCommand = async (input, context) => {
|
|
362
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
363
|
+
const headers = {};
|
|
364
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
365
|
+
"/v1/spaces/{spaceName}/projects/{projectName}/workflows/{id}";
|
|
366
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "spaceName", () => input.spaceName, "{spaceName}", false);
|
|
367
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
|
|
368
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "projectName", () => input.projectName, "{projectName}", false);
|
|
369
|
+
let body;
|
|
370
|
+
return new protocol_http_1.HttpRequest({
|
|
371
|
+
protocol,
|
|
372
|
+
hostname,
|
|
373
|
+
port,
|
|
374
|
+
method: "GET",
|
|
375
|
+
headers,
|
|
376
|
+
path: resolvedPath,
|
|
377
|
+
body,
|
|
378
|
+
});
|
|
379
|
+
};
|
|
380
|
+
exports.se_GetWorkflowCommand = se_GetWorkflowCommand;
|
|
381
|
+
const se_GetWorkflowRunCommand = async (input, context) => {
|
|
382
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
383
|
+
const headers = {};
|
|
384
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
385
|
+
"/v1/spaces/{spaceName}/projects/{projectName}/workflowRuns/{id}";
|
|
386
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "spaceName", () => input.spaceName, "{spaceName}", false);
|
|
387
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
|
|
388
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "projectName", () => input.projectName, "{projectName}", false);
|
|
389
|
+
let body;
|
|
390
|
+
return new protocol_http_1.HttpRequest({
|
|
391
|
+
protocol,
|
|
392
|
+
hostname,
|
|
393
|
+
port,
|
|
394
|
+
method: "GET",
|
|
395
|
+
headers,
|
|
396
|
+
path: resolvedPath,
|
|
397
|
+
body,
|
|
398
|
+
});
|
|
399
|
+
};
|
|
400
|
+
exports.se_GetWorkflowRunCommand = se_GetWorkflowRunCommand;
|
|
360
401
|
const se_ListAccessTokensCommand = async (input, context) => {
|
|
361
402
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
362
403
|
const headers = {
|
|
@@ -384,15 +425,14 @@ const se_ListDevEnvironmentsCommand = async (input, context) => {
|
|
|
384
425
|
const headers = {
|
|
385
426
|
"content-type": "application/json",
|
|
386
427
|
};
|
|
387
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
388
|
-
"/v1/spaces/{spaceName}/projects/{projectName}/devEnvironments";
|
|
428
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/spaces/{spaceName}/devEnvironments";
|
|
389
429
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "spaceName", () => input.spaceName, "{spaceName}", false);
|
|
390
|
-
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "projectName", () => input.projectName, "{projectName}", false);
|
|
391
430
|
let body;
|
|
392
431
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
393
432
|
filters: (_) => (0, smithy_client_1._json)(_),
|
|
394
433
|
maxResults: [],
|
|
395
434
|
nextToken: [],
|
|
435
|
+
projectName: [],
|
|
396
436
|
}));
|
|
397
437
|
return new protocol_http_1.HttpRequest({
|
|
398
438
|
protocol,
|
|
@@ -553,6 +593,65 @@ const se_ListSpacesCommand = async (input, context) => {
|
|
|
553
593
|
});
|
|
554
594
|
};
|
|
555
595
|
exports.se_ListSpacesCommand = se_ListSpacesCommand;
|
|
596
|
+
const se_ListWorkflowRunsCommand = async (input, context) => {
|
|
597
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
598
|
+
const headers = {
|
|
599
|
+
"content-type": "application/json",
|
|
600
|
+
};
|
|
601
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
602
|
+
"/v1/spaces/{spaceName}/projects/{projectName}/workflowRuns";
|
|
603
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "spaceName", () => input.spaceName, "{spaceName}", false);
|
|
604
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "projectName", () => input.projectName, "{projectName}", false);
|
|
605
|
+
const query = (0, smithy_client_1.map)({
|
|
606
|
+
workflowId: [, input.workflowId],
|
|
607
|
+
nextToken: [, input.nextToken],
|
|
608
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
609
|
+
});
|
|
610
|
+
let body;
|
|
611
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
612
|
+
sortBy: (_) => (0, smithy_client_1._json)(_),
|
|
613
|
+
}));
|
|
614
|
+
return new protocol_http_1.HttpRequest({
|
|
615
|
+
protocol,
|
|
616
|
+
hostname,
|
|
617
|
+
port,
|
|
618
|
+
method: "POST",
|
|
619
|
+
headers,
|
|
620
|
+
path: resolvedPath,
|
|
621
|
+
query,
|
|
622
|
+
body,
|
|
623
|
+
});
|
|
624
|
+
};
|
|
625
|
+
exports.se_ListWorkflowRunsCommand = se_ListWorkflowRunsCommand;
|
|
626
|
+
const se_ListWorkflowsCommand = async (input, context) => {
|
|
627
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
628
|
+
const headers = {
|
|
629
|
+
"content-type": "application/json",
|
|
630
|
+
};
|
|
631
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
632
|
+
"/v1/spaces/{spaceName}/projects/{projectName}/workflows";
|
|
633
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "spaceName", () => input.spaceName, "{spaceName}", false);
|
|
634
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "projectName", () => input.projectName, "{projectName}", false);
|
|
635
|
+
const query = (0, smithy_client_1.map)({
|
|
636
|
+
nextToken: [, input.nextToken],
|
|
637
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
638
|
+
});
|
|
639
|
+
let body;
|
|
640
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
641
|
+
sortBy: (_) => (0, smithy_client_1._json)(_),
|
|
642
|
+
}));
|
|
643
|
+
return new protocol_http_1.HttpRequest({
|
|
644
|
+
protocol,
|
|
645
|
+
hostname,
|
|
646
|
+
port,
|
|
647
|
+
method: "POST",
|
|
648
|
+
headers,
|
|
649
|
+
path: resolvedPath,
|
|
650
|
+
query,
|
|
651
|
+
body,
|
|
652
|
+
});
|
|
653
|
+
};
|
|
654
|
+
exports.se_ListWorkflowsCommand = se_ListWorkflowsCommand;
|
|
556
655
|
const se_StartDevEnvironmentCommand = async (input, context) => {
|
|
557
656
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
558
657
|
const headers = {
|
|
@@ -605,6 +704,34 @@ const se_StartDevEnvironmentSessionCommand = async (input, context) => {
|
|
|
605
704
|
});
|
|
606
705
|
};
|
|
607
706
|
exports.se_StartDevEnvironmentSessionCommand = se_StartDevEnvironmentSessionCommand;
|
|
707
|
+
const se_StartWorkflowRunCommand = async (input, context) => {
|
|
708
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
709
|
+
const headers = {
|
|
710
|
+
"content-type": "application/json",
|
|
711
|
+
};
|
|
712
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
713
|
+
"/v1/spaces/{spaceName}/projects/{projectName}/workflowRuns";
|
|
714
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "spaceName", () => input.spaceName, "{spaceName}", false);
|
|
715
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "projectName", () => input.projectName, "{projectName}", false);
|
|
716
|
+
const query = (0, smithy_client_1.map)({
|
|
717
|
+
workflowId: [, (0, smithy_client_1.expectNonNull)(input.workflowId, `workflowId`)],
|
|
718
|
+
});
|
|
719
|
+
let body;
|
|
720
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
721
|
+
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
722
|
+
}));
|
|
723
|
+
return new protocol_http_1.HttpRequest({
|
|
724
|
+
protocol,
|
|
725
|
+
hostname,
|
|
726
|
+
port,
|
|
727
|
+
method: "PUT",
|
|
728
|
+
headers,
|
|
729
|
+
path: resolvedPath,
|
|
730
|
+
query,
|
|
731
|
+
body,
|
|
732
|
+
});
|
|
733
|
+
};
|
|
734
|
+
exports.se_StartWorkflowRunCommand = se_StartWorkflowRunCommand;
|
|
608
735
|
const se_StopDevEnvironmentCommand = async (input, context) => {
|
|
609
736
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
610
737
|
const headers = {};
|
|
@@ -1617,6 +1744,122 @@ const de_GetUserDetailsCommandError = async (output, context) => {
|
|
|
1617
1744
|
});
|
|
1618
1745
|
}
|
|
1619
1746
|
};
|
|
1747
|
+
const de_GetWorkflowCommand = async (output, context) => {
|
|
1748
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1749
|
+
return de_GetWorkflowCommandError(output, context);
|
|
1750
|
+
}
|
|
1751
|
+
const contents = (0, smithy_client_1.map)({
|
|
1752
|
+
$metadata: deserializeMetadata(output),
|
|
1753
|
+
});
|
|
1754
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1755
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1756
|
+
createdTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1757
|
+
definition: smithy_client_1._json,
|
|
1758
|
+
id: smithy_client_1.expectString,
|
|
1759
|
+
lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1760
|
+
name: smithy_client_1.expectString,
|
|
1761
|
+
projectName: smithy_client_1.expectString,
|
|
1762
|
+
runMode: smithy_client_1.expectString,
|
|
1763
|
+
sourceBranchName: smithy_client_1.expectString,
|
|
1764
|
+
sourceRepositoryName: smithy_client_1.expectString,
|
|
1765
|
+
spaceName: smithy_client_1.expectString,
|
|
1766
|
+
status: smithy_client_1.expectString,
|
|
1767
|
+
});
|
|
1768
|
+
Object.assign(contents, doc);
|
|
1769
|
+
return contents;
|
|
1770
|
+
};
|
|
1771
|
+
exports.de_GetWorkflowCommand = de_GetWorkflowCommand;
|
|
1772
|
+
const de_GetWorkflowCommandError = async (output, context) => {
|
|
1773
|
+
const parsedOutput = {
|
|
1774
|
+
...output,
|
|
1775
|
+
body: await parseErrorBody(output.body, context),
|
|
1776
|
+
};
|
|
1777
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1778
|
+
switch (errorCode) {
|
|
1779
|
+
case "AccessDeniedException":
|
|
1780
|
+
case "com.amazonaws.codecatalyst#AccessDeniedException":
|
|
1781
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1782
|
+
case "ConflictException":
|
|
1783
|
+
case "com.amazonaws.codecatalyst#ConflictException":
|
|
1784
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1785
|
+
case "ResourceNotFoundException":
|
|
1786
|
+
case "com.amazonaws.codecatalyst#ResourceNotFoundException":
|
|
1787
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1788
|
+
case "ServiceQuotaExceededException":
|
|
1789
|
+
case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
|
|
1790
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
1791
|
+
case "ThrottlingException":
|
|
1792
|
+
case "com.amazonaws.codecatalyst#ThrottlingException":
|
|
1793
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1794
|
+
case "ValidationException":
|
|
1795
|
+
case "com.amazonaws.codecatalyst#ValidationException":
|
|
1796
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1797
|
+
default:
|
|
1798
|
+
const parsedBody = parsedOutput.body;
|
|
1799
|
+
return throwDefaultError({
|
|
1800
|
+
output,
|
|
1801
|
+
parsedBody,
|
|
1802
|
+
errorCode,
|
|
1803
|
+
});
|
|
1804
|
+
}
|
|
1805
|
+
};
|
|
1806
|
+
const de_GetWorkflowRunCommand = async (output, context) => {
|
|
1807
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1808
|
+
return de_GetWorkflowRunCommandError(output, context);
|
|
1809
|
+
}
|
|
1810
|
+
const contents = (0, smithy_client_1.map)({
|
|
1811
|
+
$metadata: deserializeMetadata(output),
|
|
1812
|
+
});
|
|
1813
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1814
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1815
|
+
endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1816
|
+
id: smithy_client_1.expectString,
|
|
1817
|
+
lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1818
|
+
projectName: smithy_client_1.expectString,
|
|
1819
|
+
spaceName: smithy_client_1.expectString,
|
|
1820
|
+
startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1821
|
+
status: smithy_client_1.expectString,
|
|
1822
|
+
statusReasons: smithy_client_1._json,
|
|
1823
|
+
workflowId: smithy_client_1.expectString,
|
|
1824
|
+
});
|
|
1825
|
+
Object.assign(contents, doc);
|
|
1826
|
+
return contents;
|
|
1827
|
+
};
|
|
1828
|
+
exports.de_GetWorkflowRunCommand = de_GetWorkflowRunCommand;
|
|
1829
|
+
const de_GetWorkflowRunCommandError = async (output, context) => {
|
|
1830
|
+
const parsedOutput = {
|
|
1831
|
+
...output,
|
|
1832
|
+
body: await parseErrorBody(output.body, context),
|
|
1833
|
+
};
|
|
1834
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1835
|
+
switch (errorCode) {
|
|
1836
|
+
case "AccessDeniedException":
|
|
1837
|
+
case "com.amazonaws.codecatalyst#AccessDeniedException":
|
|
1838
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1839
|
+
case "ConflictException":
|
|
1840
|
+
case "com.amazonaws.codecatalyst#ConflictException":
|
|
1841
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1842
|
+
case "ResourceNotFoundException":
|
|
1843
|
+
case "com.amazonaws.codecatalyst#ResourceNotFoundException":
|
|
1844
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1845
|
+
case "ServiceQuotaExceededException":
|
|
1846
|
+
case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
|
|
1847
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
1848
|
+
case "ThrottlingException":
|
|
1849
|
+
case "com.amazonaws.codecatalyst#ThrottlingException":
|
|
1850
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1851
|
+
case "ValidationException":
|
|
1852
|
+
case "com.amazonaws.codecatalyst#ValidationException":
|
|
1853
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1854
|
+
default:
|
|
1855
|
+
const parsedBody = parsedOutput.body;
|
|
1856
|
+
return throwDefaultError({
|
|
1857
|
+
output,
|
|
1858
|
+
parsedBody,
|
|
1859
|
+
errorCode,
|
|
1860
|
+
});
|
|
1861
|
+
}
|
|
1862
|
+
};
|
|
1620
1863
|
const de_ListAccessTokensCommand = async (output, context) => {
|
|
1621
1864
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1622
1865
|
return de_ListAccessTokensCommandError(output, context);
|
|
@@ -2017,6 +2260,106 @@ const de_ListSpacesCommandError = async (output, context) => {
|
|
|
2017
2260
|
});
|
|
2018
2261
|
}
|
|
2019
2262
|
};
|
|
2263
|
+
const de_ListWorkflowRunsCommand = async (output, context) => {
|
|
2264
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2265
|
+
return de_ListWorkflowRunsCommandError(output, context);
|
|
2266
|
+
}
|
|
2267
|
+
const contents = (0, smithy_client_1.map)({
|
|
2268
|
+
$metadata: deserializeMetadata(output),
|
|
2269
|
+
});
|
|
2270
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2271
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
2272
|
+
items: (_) => de_WorkflowRunSummaries(_, context),
|
|
2273
|
+
nextToken: smithy_client_1.expectString,
|
|
2274
|
+
});
|
|
2275
|
+
Object.assign(contents, doc);
|
|
2276
|
+
return contents;
|
|
2277
|
+
};
|
|
2278
|
+
exports.de_ListWorkflowRunsCommand = de_ListWorkflowRunsCommand;
|
|
2279
|
+
const de_ListWorkflowRunsCommandError = async (output, context) => {
|
|
2280
|
+
const parsedOutput = {
|
|
2281
|
+
...output,
|
|
2282
|
+
body: await parseErrorBody(output.body, context),
|
|
2283
|
+
};
|
|
2284
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2285
|
+
switch (errorCode) {
|
|
2286
|
+
case "AccessDeniedException":
|
|
2287
|
+
case "com.amazonaws.codecatalyst#AccessDeniedException":
|
|
2288
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2289
|
+
case "ConflictException":
|
|
2290
|
+
case "com.amazonaws.codecatalyst#ConflictException":
|
|
2291
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
2292
|
+
case "ResourceNotFoundException":
|
|
2293
|
+
case "com.amazonaws.codecatalyst#ResourceNotFoundException":
|
|
2294
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2295
|
+
case "ServiceQuotaExceededException":
|
|
2296
|
+
case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
|
|
2297
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
2298
|
+
case "ThrottlingException":
|
|
2299
|
+
case "com.amazonaws.codecatalyst#ThrottlingException":
|
|
2300
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2301
|
+
case "ValidationException":
|
|
2302
|
+
case "com.amazonaws.codecatalyst#ValidationException":
|
|
2303
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2304
|
+
default:
|
|
2305
|
+
const parsedBody = parsedOutput.body;
|
|
2306
|
+
return throwDefaultError({
|
|
2307
|
+
output,
|
|
2308
|
+
parsedBody,
|
|
2309
|
+
errorCode,
|
|
2310
|
+
});
|
|
2311
|
+
}
|
|
2312
|
+
};
|
|
2313
|
+
const de_ListWorkflowsCommand = async (output, context) => {
|
|
2314
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2315
|
+
return de_ListWorkflowsCommandError(output, context);
|
|
2316
|
+
}
|
|
2317
|
+
const contents = (0, smithy_client_1.map)({
|
|
2318
|
+
$metadata: deserializeMetadata(output),
|
|
2319
|
+
});
|
|
2320
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2321
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
2322
|
+
items: (_) => de_WorkflowSummaries(_, context),
|
|
2323
|
+
nextToken: smithy_client_1.expectString,
|
|
2324
|
+
});
|
|
2325
|
+
Object.assign(contents, doc);
|
|
2326
|
+
return contents;
|
|
2327
|
+
};
|
|
2328
|
+
exports.de_ListWorkflowsCommand = de_ListWorkflowsCommand;
|
|
2329
|
+
const de_ListWorkflowsCommandError = async (output, context) => {
|
|
2330
|
+
const parsedOutput = {
|
|
2331
|
+
...output,
|
|
2332
|
+
body: await parseErrorBody(output.body, context),
|
|
2333
|
+
};
|
|
2334
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2335
|
+
switch (errorCode) {
|
|
2336
|
+
case "AccessDeniedException":
|
|
2337
|
+
case "com.amazonaws.codecatalyst#AccessDeniedException":
|
|
2338
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2339
|
+
case "ConflictException":
|
|
2340
|
+
case "com.amazonaws.codecatalyst#ConflictException":
|
|
2341
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
2342
|
+
case "ResourceNotFoundException":
|
|
2343
|
+
case "com.amazonaws.codecatalyst#ResourceNotFoundException":
|
|
2344
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2345
|
+
case "ServiceQuotaExceededException":
|
|
2346
|
+
case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
|
|
2347
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
2348
|
+
case "ThrottlingException":
|
|
2349
|
+
case "com.amazonaws.codecatalyst#ThrottlingException":
|
|
2350
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2351
|
+
case "ValidationException":
|
|
2352
|
+
case "com.amazonaws.codecatalyst#ValidationException":
|
|
2353
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2354
|
+
default:
|
|
2355
|
+
const parsedBody = parsedOutput.body;
|
|
2356
|
+
return throwDefaultError({
|
|
2357
|
+
output,
|
|
2358
|
+
parsedBody,
|
|
2359
|
+
errorCode,
|
|
2360
|
+
});
|
|
2361
|
+
}
|
|
2362
|
+
};
|
|
2020
2363
|
const de_StartDevEnvironmentCommand = async (output, context) => {
|
|
2021
2364
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2022
2365
|
return de_StartDevEnvironmentCommandError(output, context);
|
|
@@ -2122,6 +2465,58 @@ const de_StartDevEnvironmentSessionCommandError = async (output, context) => {
|
|
|
2122
2465
|
});
|
|
2123
2466
|
}
|
|
2124
2467
|
};
|
|
2468
|
+
const de_StartWorkflowRunCommand = async (output, context) => {
|
|
2469
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2470
|
+
return de_StartWorkflowRunCommandError(output, context);
|
|
2471
|
+
}
|
|
2472
|
+
const contents = (0, smithy_client_1.map)({
|
|
2473
|
+
$metadata: deserializeMetadata(output),
|
|
2474
|
+
});
|
|
2475
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2476
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
2477
|
+
id: smithy_client_1.expectString,
|
|
2478
|
+
projectName: smithy_client_1.expectString,
|
|
2479
|
+
spaceName: smithy_client_1.expectString,
|
|
2480
|
+
workflowId: smithy_client_1.expectString,
|
|
2481
|
+
});
|
|
2482
|
+
Object.assign(contents, doc);
|
|
2483
|
+
return contents;
|
|
2484
|
+
};
|
|
2485
|
+
exports.de_StartWorkflowRunCommand = de_StartWorkflowRunCommand;
|
|
2486
|
+
const de_StartWorkflowRunCommandError = async (output, context) => {
|
|
2487
|
+
const parsedOutput = {
|
|
2488
|
+
...output,
|
|
2489
|
+
body: await parseErrorBody(output.body, context),
|
|
2490
|
+
};
|
|
2491
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2492
|
+
switch (errorCode) {
|
|
2493
|
+
case "AccessDeniedException":
|
|
2494
|
+
case "com.amazonaws.codecatalyst#AccessDeniedException":
|
|
2495
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2496
|
+
case "ConflictException":
|
|
2497
|
+
case "com.amazonaws.codecatalyst#ConflictException":
|
|
2498
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
2499
|
+
case "ResourceNotFoundException":
|
|
2500
|
+
case "com.amazonaws.codecatalyst#ResourceNotFoundException":
|
|
2501
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2502
|
+
case "ServiceQuotaExceededException":
|
|
2503
|
+
case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
|
|
2504
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
2505
|
+
case "ThrottlingException":
|
|
2506
|
+
case "com.amazonaws.codecatalyst#ThrottlingException":
|
|
2507
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2508
|
+
case "ValidationException":
|
|
2509
|
+
case "com.amazonaws.codecatalyst#ValidationException":
|
|
2510
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2511
|
+
default:
|
|
2512
|
+
const parsedBody = parsedOutput.body;
|
|
2513
|
+
return throwDefaultError({
|
|
2514
|
+
output,
|
|
2515
|
+
parsedBody,
|
|
2516
|
+
errorCode,
|
|
2517
|
+
});
|
|
2518
|
+
}
|
|
2519
|
+
};
|
|
2125
2520
|
const de_StopDevEnvironmentCommand = async (output, context) => {
|
|
2126
2521
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2127
2522
|
return de_StopDevEnvironmentCommandError(output, context);
|
|
@@ -2630,6 +3025,47 @@ const de_ListSourceRepositoryBranchesItems = (output, context) => {
|
|
|
2630
3025
|
});
|
|
2631
3026
|
return retVal;
|
|
2632
3027
|
};
|
|
3028
|
+
const de_WorkflowRunSummaries = (output, context) => {
|
|
3029
|
+
const retVal = (output || [])
|
|
3030
|
+
.filter((e) => e != null)
|
|
3031
|
+
.map((entry) => {
|
|
3032
|
+
return de_WorkflowRunSummary(entry, context);
|
|
3033
|
+
});
|
|
3034
|
+
return retVal;
|
|
3035
|
+
};
|
|
3036
|
+
const de_WorkflowRunSummary = (output, context) => {
|
|
3037
|
+
return (0, smithy_client_1.take)(output, {
|
|
3038
|
+
endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
3039
|
+
id: smithy_client_1.expectString,
|
|
3040
|
+
lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
3041
|
+
startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
3042
|
+
status: smithy_client_1.expectString,
|
|
3043
|
+
statusReasons: smithy_client_1._json,
|
|
3044
|
+
workflowId: smithy_client_1.expectString,
|
|
3045
|
+
workflowName: smithy_client_1.expectString,
|
|
3046
|
+
});
|
|
3047
|
+
};
|
|
3048
|
+
const de_WorkflowSummaries = (output, context) => {
|
|
3049
|
+
const retVal = (output || [])
|
|
3050
|
+
.filter((e) => e != null)
|
|
3051
|
+
.map((entry) => {
|
|
3052
|
+
return de_WorkflowSummary(entry, context);
|
|
3053
|
+
});
|
|
3054
|
+
return retVal;
|
|
3055
|
+
};
|
|
3056
|
+
const de_WorkflowSummary = (output, context) => {
|
|
3057
|
+
return (0, smithy_client_1.take)(output, {
|
|
3058
|
+
createdTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
3059
|
+
definition: smithy_client_1._json,
|
|
3060
|
+
id: smithy_client_1.expectString,
|
|
3061
|
+
lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
3062
|
+
name: smithy_client_1.expectString,
|
|
3063
|
+
runMode: smithy_client_1.expectString,
|
|
3064
|
+
sourceBranchName: smithy_client_1.expectString,
|
|
3065
|
+
sourceRepositoryName: smithy_client_1.expectString,
|
|
3066
|
+
status: smithy_client_1.expectString,
|
|
3067
|
+
});
|
|
3068
|
+
};
|
|
2633
3069
|
const deserializeMetadata = (output) => ({
|
|
2634
3070
|
httpStatusCode: output.statusCode,
|
|
2635
3071
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
package/dist-es/CodeCatalyst.js
CHANGED
|
@@ -17,6 +17,8 @@ import { GetSourceRepositoryCommand, } from "./commands/GetSourceRepositoryComma
|
|
|
17
17
|
import { GetSpaceCommand } from "./commands/GetSpaceCommand";
|
|
18
18
|
import { GetSubscriptionCommand, } from "./commands/GetSubscriptionCommand";
|
|
19
19
|
import { GetUserDetailsCommand, } from "./commands/GetUserDetailsCommand";
|
|
20
|
+
import { GetWorkflowCommand } from "./commands/GetWorkflowCommand";
|
|
21
|
+
import { GetWorkflowRunCommand, } from "./commands/GetWorkflowRunCommand";
|
|
20
22
|
import { ListAccessTokensCommand, } from "./commands/ListAccessTokensCommand";
|
|
21
23
|
import { ListDevEnvironmentsCommand, } from "./commands/ListDevEnvironmentsCommand";
|
|
22
24
|
import { ListDevEnvironmentSessionsCommand, } from "./commands/ListDevEnvironmentSessionsCommand";
|
|
@@ -25,8 +27,11 @@ import { ListProjectsCommand, } from "./commands/ListProjectsCommand";
|
|
|
25
27
|
import { ListSourceRepositoriesCommand, } from "./commands/ListSourceRepositoriesCommand";
|
|
26
28
|
import { ListSourceRepositoryBranchesCommand, } from "./commands/ListSourceRepositoryBranchesCommand";
|
|
27
29
|
import { ListSpacesCommand } from "./commands/ListSpacesCommand";
|
|
30
|
+
import { ListWorkflowRunsCommand, } from "./commands/ListWorkflowRunsCommand";
|
|
31
|
+
import { ListWorkflowsCommand, } from "./commands/ListWorkflowsCommand";
|
|
28
32
|
import { StartDevEnvironmentCommand, } from "./commands/StartDevEnvironmentCommand";
|
|
29
33
|
import { StartDevEnvironmentSessionCommand, } from "./commands/StartDevEnvironmentSessionCommand";
|
|
34
|
+
import { StartWorkflowRunCommand, } from "./commands/StartWorkflowRunCommand";
|
|
30
35
|
import { StopDevEnvironmentCommand, } from "./commands/StopDevEnvironmentCommand";
|
|
31
36
|
import { StopDevEnvironmentSessionCommand, } from "./commands/StopDevEnvironmentSessionCommand";
|
|
32
37
|
import { UpdateDevEnvironmentCommand, } from "./commands/UpdateDevEnvironmentCommand";
|
|
@@ -51,6 +56,8 @@ const commands = {
|
|
|
51
56
|
GetSpaceCommand,
|
|
52
57
|
GetSubscriptionCommand,
|
|
53
58
|
GetUserDetailsCommand,
|
|
59
|
+
GetWorkflowCommand,
|
|
60
|
+
GetWorkflowRunCommand,
|
|
54
61
|
ListAccessTokensCommand,
|
|
55
62
|
ListDevEnvironmentsCommand,
|
|
56
63
|
ListDevEnvironmentSessionsCommand,
|
|
@@ -59,8 +66,11 @@ const commands = {
|
|
|
59
66
|
ListSourceRepositoriesCommand,
|
|
60
67
|
ListSourceRepositoryBranchesCommand,
|
|
61
68
|
ListSpacesCommand,
|
|
69
|
+
ListWorkflowRunsCommand,
|
|
70
|
+
ListWorkflowsCommand,
|
|
62
71
|
StartDevEnvironmentCommand,
|
|
63
72
|
StartDevEnvironmentSessionCommand,
|
|
73
|
+
StartWorkflowRunCommand,
|
|
64
74
|
StopDevEnvironmentCommand,
|
|
65
75
|
StopDevEnvironmentSessionCommand,
|
|
66
76
|
UpdateDevEnvironmentCommand,
|
|
@@ -41,8 +41,8 @@ export class CodeCatalystClient extends __Client {
|
|
|
41
41
|
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
|
|
42
42
|
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
43
43
|
this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
44
|
-
identityProviderConfigProvider: this.getIdentityProviderConfigProvider(),
|
|
45
44
|
httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(),
|
|
45
|
+
identityProviderConfigProvider: this.getIdentityProviderConfigProvider(),
|
|
46
46
|
}));
|
|
47
47
|
this.middlewareStack.use(getHttpSigningPlugin(this.config));
|
|
48
48
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
|
|
5
|
+
import { de_GetWorkflowCommand, se_GetWorkflowCommand } from "../protocols/Aws_restJson1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class GetWorkflowCommand extends $Command {
|
|
8
|
+
static getEndpointParameterInstructions() {
|
|
9
|
+
return {
|
|
10
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
11
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
12
|
+
Region: { type: "builtInParams", name: "region" },
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
constructor(input) {
|
|
16
|
+
super();
|
|
17
|
+
this.input = input;
|
|
18
|
+
}
|
|
19
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
20
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
21
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, GetWorkflowCommand.getEndpointParameterInstructions()));
|
|
22
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
23
|
+
const { logger } = configuration;
|
|
24
|
+
const clientName = "CodeCatalystClient";
|
|
25
|
+
const commandName = "GetWorkflowCommand";
|
|
26
|
+
const handlerExecutionContext = {
|
|
27
|
+
logger,
|
|
28
|
+
clientName,
|
|
29
|
+
commandName,
|
|
30
|
+
inputFilterSensitiveLog: (_) => _,
|
|
31
|
+
outputFilterSensitiveLog: (_) => _,
|
|
32
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
33
|
+
service: "CodeCatalyst",
|
|
34
|
+
operation: "GetWorkflow",
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
const { requestHandler } = configuration;
|
|
38
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
39
|
+
}
|
|
40
|
+
serialize(input, context) {
|
|
41
|
+
return se_GetWorkflowCommand(input, context);
|
|
42
|
+
}
|
|
43
|
+
deserialize(output, context) {
|
|
44
|
+
return de_GetWorkflowCommand(output, context);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
|
|
5
|
+
import { de_GetWorkflowRunCommand, se_GetWorkflowRunCommand } from "../protocols/Aws_restJson1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class GetWorkflowRunCommand extends $Command {
|
|
8
|
+
static getEndpointParameterInstructions() {
|
|
9
|
+
return {
|
|
10
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
11
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
12
|
+
Region: { type: "builtInParams", name: "region" },
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
constructor(input) {
|
|
16
|
+
super();
|
|
17
|
+
this.input = input;
|
|
18
|
+
}
|
|
19
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
20
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
21
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, GetWorkflowRunCommand.getEndpointParameterInstructions()));
|
|
22
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
23
|
+
const { logger } = configuration;
|
|
24
|
+
const clientName = "CodeCatalystClient";
|
|
25
|
+
const commandName = "GetWorkflowRunCommand";
|
|
26
|
+
const handlerExecutionContext = {
|
|
27
|
+
logger,
|
|
28
|
+
clientName,
|
|
29
|
+
commandName,
|
|
30
|
+
inputFilterSensitiveLog: (_) => _,
|
|
31
|
+
outputFilterSensitiveLog: (_) => _,
|
|
32
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
33
|
+
service: "CodeCatalyst",
|
|
34
|
+
operation: "GetWorkflowRun",
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
const { requestHandler } = configuration;
|
|
38
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
39
|
+
}
|
|
40
|
+
serialize(input, context) {
|
|
41
|
+
return se_GetWorkflowRunCommand(input, context);
|
|
42
|
+
}
|
|
43
|
+
deserialize(output, context) {
|
|
44
|
+
return de_GetWorkflowRunCommand(output, context);
|
|
45
|
+
}
|
|
46
|
+
}
|