@aws-sdk/client-ssm-incidents 3.35.0 → 3.38.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/CHANGELOG.md +47 -0
- package/dist-cjs/SSMIncidents.js +0 -11
- package/dist-cjs/SSMIncidentsClient.js +0 -16
- package/dist-cjs/commands/CreateReplicationSetCommand.js +0 -26
- package/dist-cjs/commands/CreateResponsePlanCommand.js +0 -28
- package/dist-cjs/commands/CreateTimelineEventCommand.js +0 -28
- package/dist-cjs/commands/DeleteIncidentRecordCommand.js +0 -25
- package/dist-cjs/commands/DeleteReplicationSetCommand.js +0 -26
- package/dist-cjs/commands/DeleteResourcePolicyCommand.js +0 -27
- package/dist-cjs/commands/DeleteResponsePlanCommand.js +0 -27
- package/dist-cjs/commands/DeleteTimelineEventCommand.js +0 -25
- package/dist-cjs/commands/GetIncidentRecordCommand.js +0 -25
- package/dist-cjs/commands/GetReplicationSetCommand.js +0 -25
- package/dist-cjs/commands/GetResourcePoliciesCommand.js +0 -25
- package/dist-cjs/commands/GetResponsePlanCommand.js +0 -25
- package/dist-cjs/commands/GetTimelineEventCommand.js +0 -25
- package/dist-cjs/commands/ListIncidentRecordsCommand.js +0 -26
- package/dist-cjs/commands/ListRelatedItemsCommand.js +0 -25
- package/dist-cjs/commands/ListReplicationSetsCommand.js +0 -25
- package/dist-cjs/commands/ListResponsePlansCommand.js +0 -25
- package/dist-cjs/commands/ListTagsForResourceCommand.js +0 -25
- package/dist-cjs/commands/ListTimelineEventsCommand.js +0 -25
- package/dist-cjs/commands/PutResourcePolicyCommand.js +0 -25
- package/dist-cjs/commands/StartIncidentCommand.js +0 -25
- package/dist-cjs/commands/TagResourceCommand.js +0 -25
- package/dist-cjs/commands/UntagResourceCommand.js +0 -25
- package/dist-cjs/commands/UpdateDeletionProtectionCommand.js +0 -26
- package/dist-cjs/commands/UpdateIncidentRecordCommand.js +0 -27
- package/dist-cjs/commands/UpdateRelatedItemsCommand.js +0 -25
- package/dist-cjs/commands/UpdateReplicationSetCommand.js +0 -25
- package/dist-cjs/commands/UpdateResponsePlanCommand.js +0 -25
- package/dist-cjs/commands/UpdateTimelineEventCommand.js +0 -26
- package/dist-cjs/commands/index.js +32 -0
- package/dist-cjs/endpoints.js +1 -2
- package/dist-cjs/index.js +5 -41
- package/dist-cjs/models/index.js +0 -1
- package/dist-cjs/models/models_0.js +0 -307
- package/dist-cjs/pagination/GetResourcePoliciesPaginator.js +0 -11
- package/dist-cjs/pagination/Interfaces.js +0 -1
- package/dist-cjs/pagination/ListIncidentRecordsPaginator.js +0 -11
- package/dist-cjs/pagination/ListRelatedItemsPaginator.js +0 -11
- package/dist-cjs/pagination/ListReplicationSetsPaginator.js +0 -11
- package/dist-cjs/pagination/ListResponsePlansPaginator.js +0 -11
- package/dist-cjs/pagination/ListTimelineEventsPaginator.js +0 -11
- package/dist-cjs/pagination/index.js +10 -0
- package/dist-cjs/protocols/Aws_restJson1.js +0 -6
- package/dist-cjs/runtimeConfig.browser.js +1 -6
- package/dist-cjs/runtimeConfig.js +2 -7
- package/dist-cjs/runtimeConfig.native.js +0 -4
- package/dist-cjs/runtimeConfig.shared.js +0 -4
- package/dist-cjs/waiters/index.js +5 -0
- package/dist-cjs/waiters/waitForWaitForReplicationSetActive.js +0 -10
- package/dist-cjs/waiters/waitForWaitForReplicationSetDeleted.js +0 -10
- package/dist-es/SSMIncidents.js +0 -1
- package/dist-es/SSMIncidentsClient.js +0 -1
- package/dist-es/commands/CreateReplicationSetCommand.js +0 -1
- package/dist-es/commands/CreateResponsePlanCommand.js +0 -1
- package/dist-es/commands/CreateTimelineEventCommand.js +0 -1
- package/dist-es/commands/DeleteIncidentRecordCommand.js +0 -1
- package/dist-es/commands/DeleteReplicationSetCommand.js +0 -1
- package/dist-es/commands/DeleteResourcePolicyCommand.js +0 -1
- package/dist-es/commands/DeleteResponsePlanCommand.js +0 -1
- package/dist-es/commands/DeleteTimelineEventCommand.js +0 -1
- package/dist-es/commands/GetIncidentRecordCommand.js +0 -1
- package/dist-es/commands/GetReplicationSetCommand.js +0 -1
- package/dist-es/commands/GetResourcePoliciesCommand.js +0 -1
- package/dist-es/commands/GetResponsePlanCommand.js +0 -1
- package/dist-es/commands/GetTimelineEventCommand.js +0 -1
- package/dist-es/commands/ListIncidentRecordsCommand.js +0 -1
- package/dist-es/commands/ListRelatedItemsCommand.js +0 -1
- package/dist-es/commands/ListReplicationSetsCommand.js +0 -1
- package/dist-es/commands/ListResponsePlansCommand.js +0 -1
- package/dist-es/commands/ListTagsForResourceCommand.js +0 -1
- package/dist-es/commands/ListTimelineEventsCommand.js +0 -1
- package/dist-es/commands/PutResourcePolicyCommand.js +0 -1
- package/dist-es/commands/StartIncidentCommand.js +0 -1
- package/dist-es/commands/TagResourceCommand.js +0 -1
- package/dist-es/commands/UntagResourceCommand.js +0 -1
- package/dist-es/commands/UpdateDeletionProtectionCommand.js +0 -1
- package/dist-es/commands/UpdateIncidentRecordCommand.js +0 -1
- package/dist-es/commands/UpdateRelatedItemsCommand.js +0 -1
- package/dist-es/commands/UpdateReplicationSetCommand.js +0 -1
- package/dist-es/commands/UpdateResponsePlanCommand.js +0 -1
- package/dist-es/commands/UpdateTimelineEventCommand.js +0 -1
- package/dist-es/commands/index.js +29 -0
- package/dist-es/endpoints.js +1 -2
- package/dist-es/index.js +5 -41
- package/dist-es/models/index.js +0 -1
- package/dist-es/models/models_0.js +0 -1
- package/dist-es/pagination/GetResourcePoliciesPaginator.js +0 -1
- package/dist-es/pagination/Interfaces.js +0 -1
- package/dist-es/pagination/ListIncidentRecordsPaginator.js +0 -1
- package/dist-es/pagination/ListRelatedItemsPaginator.js +0 -1
- package/dist-es/pagination/ListReplicationSetsPaginator.js +0 -1
- package/dist-es/pagination/ListResponsePlansPaginator.js +0 -1
- package/dist-es/pagination/ListTimelineEventsPaginator.js +0 -1
- package/dist-es/pagination/index.js +7 -0
- package/dist-es/protocols/Aws_restJson1.js +0 -1
- package/dist-es/runtimeConfig.browser.js +1 -2
- package/dist-es/runtimeConfig.js +2 -3
- package/dist-es/runtimeConfig.native.js +0 -1
- package/dist-es/runtimeConfig.shared.js +0 -1
- package/dist-es/waiters/index.js +2 -0
- package/dist-es/waiters/waitForWaitForReplicationSetActive.js +0 -1
- package/dist-es/waiters/waitForWaitForReplicationSetDeleted.js +0 -1
- package/dist-types/commands/index.d.ts +29 -0
- package/dist-types/index.d.ts +5 -40
- package/dist-types/pagination/index.d.ts +7 -0
- package/dist-types/ts3.4/SSMIncidents.d.ts +30 -114
- package/dist-types/ts3.4/SSMIncidentsClient.d.ts +24 -96
- package/dist-types/ts3.4/commands/CreateReplicationSetCommand.d.ts +2 -21
- package/dist-types/ts3.4/commands/CreateResponsePlanCommand.d.ts +2 -23
- package/dist-types/ts3.4/commands/CreateTimelineEventCommand.d.ts +2 -23
- package/dist-types/ts3.4/commands/DeleteIncidentRecordCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/DeleteReplicationSetCommand.d.ts +2 -21
- package/dist-types/ts3.4/commands/DeleteResourcePolicyCommand.d.ts +2 -22
- package/dist-types/ts3.4/commands/DeleteResponsePlanCommand.d.ts +2 -22
- package/dist-types/ts3.4/commands/DeleteTimelineEventCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/GetIncidentRecordCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/GetReplicationSetCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/GetResourcePoliciesCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/GetResponsePlanCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/GetTimelineEventCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/ListIncidentRecordsCommand.d.ts +2 -21
- package/dist-types/ts3.4/commands/ListRelatedItemsCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/ListReplicationSetsCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/ListResponsePlansCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/ListTimelineEventsCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/PutResourcePolicyCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/StartIncidentCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/UpdateDeletionProtectionCommand.d.ts +2 -21
- package/dist-types/ts3.4/commands/UpdateIncidentRecordCommand.d.ts +2 -22
- package/dist-types/ts3.4/commands/UpdateRelatedItemsCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/UpdateReplicationSetCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/UpdateResponsePlanCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/UpdateTimelineEventCommand.d.ts +2 -21
- package/dist-types/ts3.4/commands/index.d.ts +29 -0
- package/dist-types/ts3.4/index.d.ts +5 -40
- package/dist-types/ts3.4/models/models_0.d.ts +364 -1300
- package/dist-types/ts3.4/pagination/index.d.ts +7 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -3
- package/dist-types/ts3.4/waiters/index.d.ts +2 -0
- package/dist-types/ts3.4/waiters/waitForWaitForReplicationSetActive.d.ts +2 -9
- package/dist-types/ts3.4/waiters/waitForWaitForReplicationSetDeleted.d.ts +2 -9
- package/dist-types/waiters/index.d.ts +2 -0
- package/package.json +34 -31
- package/dist-cjs/SSMIncidents.js.map +0 -1
- package/dist-cjs/SSMIncidentsClient.js.map +0 -1
- package/dist-cjs/commands/CreateReplicationSetCommand.js.map +0 -1
- package/dist-cjs/commands/CreateResponsePlanCommand.js.map +0 -1
- package/dist-cjs/commands/CreateTimelineEventCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteIncidentRecordCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteReplicationSetCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteResourcePolicyCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteResponsePlanCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteTimelineEventCommand.js.map +0 -1
- package/dist-cjs/commands/GetIncidentRecordCommand.js.map +0 -1
- package/dist-cjs/commands/GetReplicationSetCommand.js.map +0 -1
- package/dist-cjs/commands/GetResourcePoliciesCommand.js.map +0 -1
- package/dist-cjs/commands/GetResponsePlanCommand.js.map +0 -1
- package/dist-cjs/commands/GetTimelineEventCommand.js.map +0 -1
- package/dist-cjs/commands/ListIncidentRecordsCommand.js.map +0 -1
- package/dist-cjs/commands/ListRelatedItemsCommand.js.map +0 -1
- package/dist-cjs/commands/ListReplicationSetsCommand.js.map +0 -1
- package/dist-cjs/commands/ListResponsePlansCommand.js.map +0 -1
- package/dist-cjs/commands/ListTagsForResourceCommand.js.map +0 -1
- package/dist-cjs/commands/ListTimelineEventsCommand.js.map +0 -1
- package/dist-cjs/commands/PutResourcePolicyCommand.js.map +0 -1
- package/dist-cjs/commands/StartIncidentCommand.js.map +0 -1
- package/dist-cjs/commands/TagResourceCommand.js.map +0 -1
- package/dist-cjs/commands/UntagResourceCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateDeletionProtectionCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateIncidentRecordCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateRelatedItemsCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateReplicationSetCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateResponsePlanCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateTimelineEventCommand.js.map +0 -1
- package/dist-cjs/endpoints.js.map +0 -1
- package/dist-cjs/index.js.map +0 -1
- package/dist-cjs/models/index.js.map +0 -1
- package/dist-cjs/models/models_0.js.map +0 -1
- package/dist-cjs/pagination/GetResourcePoliciesPaginator.js.map +0 -1
- package/dist-cjs/pagination/Interfaces.js.map +0 -1
- package/dist-cjs/pagination/ListIncidentRecordsPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListRelatedItemsPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListReplicationSetsPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListResponsePlansPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListTimelineEventsPaginator.js.map +0 -1
- package/dist-cjs/protocols/Aws_restJson1.js.map +0 -1
- package/dist-cjs/runtimeConfig.browser.js.map +0 -1
- package/dist-cjs/runtimeConfig.js.map +0 -1
- package/dist-cjs/runtimeConfig.native.js.map +0 -1
- package/dist-cjs/runtimeConfig.shared.js.map +0 -1
- package/dist-cjs/waiters/waitForWaitForReplicationSetActive.js.map +0 -1
- package/dist-cjs/waiters/waitForWaitForReplicationSetDeleted.js.map +0 -1
- package/dist-es/SSMIncidents.js.map +0 -1
- package/dist-es/SSMIncidentsClient.js.map +0 -1
- package/dist-es/commands/CreateReplicationSetCommand.js.map +0 -1
- package/dist-es/commands/CreateResponsePlanCommand.js.map +0 -1
- package/dist-es/commands/CreateTimelineEventCommand.js.map +0 -1
- package/dist-es/commands/DeleteIncidentRecordCommand.js.map +0 -1
- package/dist-es/commands/DeleteReplicationSetCommand.js.map +0 -1
- package/dist-es/commands/DeleteResourcePolicyCommand.js.map +0 -1
- package/dist-es/commands/DeleteResponsePlanCommand.js.map +0 -1
- package/dist-es/commands/DeleteTimelineEventCommand.js.map +0 -1
- package/dist-es/commands/GetIncidentRecordCommand.js.map +0 -1
- package/dist-es/commands/GetReplicationSetCommand.js.map +0 -1
- package/dist-es/commands/GetResourcePoliciesCommand.js.map +0 -1
- package/dist-es/commands/GetResponsePlanCommand.js.map +0 -1
- package/dist-es/commands/GetTimelineEventCommand.js.map +0 -1
- package/dist-es/commands/ListIncidentRecordsCommand.js.map +0 -1
- package/dist-es/commands/ListRelatedItemsCommand.js.map +0 -1
- package/dist-es/commands/ListReplicationSetsCommand.js.map +0 -1
- package/dist-es/commands/ListResponsePlansCommand.js.map +0 -1
- package/dist-es/commands/ListTagsForResourceCommand.js.map +0 -1
- package/dist-es/commands/ListTimelineEventsCommand.js.map +0 -1
- package/dist-es/commands/PutResourcePolicyCommand.js.map +0 -1
- package/dist-es/commands/StartIncidentCommand.js.map +0 -1
- package/dist-es/commands/TagResourceCommand.js.map +0 -1
- package/dist-es/commands/UntagResourceCommand.js.map +0 -1
- package/dist-es/commands/UpdateDeletionProtectionCommand.js.map +0 -1
- package/dist-es/commands/UpdateIncidentRecordCommand.js.map +0 -1
- package/dist-es/commands/UpdateRelatedItemsCommand.js.map +0 -1
- package/dist-es/commands/UpdateReplicationSetCommand.js.map +0 -1
- package/dist-es/commands/UpdateResponsePlanCommand.js.map +0 -1
- package/dist-es/commands/UpdateTimelineEventCommand.js.map +0 -1
- package/dist-es/endpoints.js.map +0 -1
- package/dist-es/index.js.map +0 -1
- package/dist-es/models/index.js.map +0 -1
- package/dist-es/models/models_0.js.map +0 -1
- package/dist-es/pagination/GetResourcePoliciesPaginator.js.map +0 -1
- package/dist-es/pagination/Interfaces.js.map +0 -1
- package/dist-es/pagination/ListIncidentRecordsPaginator.js.map +0 -1
- package/dist-es/pagination/ListRelatedItemsPaginator.js.map +0 -1
- package/dist-es/pagination/ListReplicationSetsPaginator.js.map +0 -1
- package/dist-es/pagination/ListResponsePlansPaginator.js.map +0 -1
- package/dist-es/pagination/ListTimelineEventsPaginator.js.map +0 -1
- package/dist-es/protocols/Aws_restJson1.js.map +0 -1
- package/dist-es/runtimeConfig.browser.js.map +0 -1
- package/dist-es/runtimeConfig.js.map +0 -1
- package/dist-es/runtimeConfig.native.js.map +0 -1
- package/dist-es/runtimeConfig.shared.js.map +0 -1
- package/dist-es/waiters/waitForWaitForReplicationSetActive.js.map +0 -1
- package/dist-es/waiters/waitForWaitForReplicationSetDeleted.js.map +0 -1
- package/jest.config.js +0 -4
- package/src/SSMIncidents.ts +0 -1095
- package/src/SSMIncidentsClient.ts +0 -372
- package/src/commands/CreateReplicationSetCommand.ts +0 -96
- package/src/commands/CreateResponsePlanCommand.ts +0 -98
- package/src/commands/CreateTimelineEventCommand.ts +0 -98
- package/src/commands/DeleteIncidentRecordCommand.ts +0 -95
- package/src/commands/DeleteReplicationSetCommand.ts +0 -96
- package/src/commands/DeleteResourcePolicyCommand.ts +0 -97
- package/src/commands/DeleteResponsePlanCommand.ts +0 -97
- package/src/commands/DeleteTimelineEventCommand.ts +0 -95
- package/src/commands/GetIncidentRecordCommand.ts +0 -95
- package/src/commands/GetReplicationSetCommand.ts +0 -95
- package/src/commands/GetResourcePoliciesCommand.ts +0 -95
- package/src/commands/GetResponsePlanCommand.ts +0 -95
- package/src/commands/GetTimelineEventCommand.ts +0 -95
- package/src/commands/ListIncidentRecordsCommand.ts +0 -96
- package/src/commands/ListRelatedItemsCommand.ts +0 -95
- package/src/commands/ListReplicationSetsCommand.ts +0 -95
- package/src/commands/ListResponsePlansCommand.ts +0 -95
- package/src/commands/ListTagsForResourceCommand.ts +0 -95
- package/src/commands/ListTimelineEventsCommand.ts +0 -95
- package/src/commands/PutResourcePolicyCommand.ts +0 -95
- package/src/commands/StartIncidentCommand.ts +0 -95
- package/src/commands/TagResourceCommand.ts +0 -95
- package/src/commands/UntagResourceCommand.ts +0 -95
- package/src/commands/UpdateDeletionProtectionCommand.ts +0 -96
- package/src/commands/UpdateIncidentRecordCommand.ts +0 -97
- package/src/commands/UpdateRelatedItemsCommand.ts +0 -95
- package/src/commands/UpdateReplicationSetCommand.ts +0 -95
- package/src/commands/UpdateResponsePlanCommand.ts +0 -95
- package/src/commands/UpdateTimelineEventCommand.ts +0 -96
- package/src/endpoints.ts +0 -57
- package/src/index.ts +0 -41
- package/src/models/index.ts +0 -1
- package/src/models/models_0.ts +0 -2883
- package/src/pagination/GetResourcePoliciesPaginator.ts +0 -59
- package/src/pagination/Interfaces.ts +0 -8
- package/src/pagination/ListIncidentRecordsPaginator.ts +0 -59
- package/src/pagination/ListRelatedItemsPaginator.ts +0 -59
- package/src/pagination/ListReplicationSetsPaginator.ts +0 -59
- package/src/pagination/ListResponsePlansPaginator.ts +0 -59
- package/src/pagination/ListTimelineEventsPaginator.ts +0 -59
- package/src/protocols/Aws_restJson1.ts +0 -4502
- package/src/runtimeConfig.browser.ts +0 -41
- package/src/runtimeConfig.native.ts +0 -17
- package/src/runtimeConfig.shared.ts +0 -17
- package/src/runtimeConfig.ts +0 -46
- package/src/waiters/waitForWaitForReplicationSetActive.ts +0 -71
- package/src/waiters/waitForWaitForReplicationSetDeleted.ts +0 -58
- package/tsconfig.es.json +0 -10
- package/tsconfig.json +0 -33
- package/tsconfig.types.json +0 -9
|
@@ -1,4502 +0,0 @@
|
|
|
1
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
|
|
2
|
-
import {
|
|
3
|
-
expectBoolean as __expectBoolean,
|
|
4
|
-
expectInt32 as __expectInt32,
|
|
5
|
-
expectNonNull as __expectNonNull,
|
|
6
|
-
expectNumber as __expectNumber,
|
|
7
|
-
expectObject as __expectObject,
|
|
8
|
-
expectString as __expectString,
|
|
9
|
-
expectUnion as __expectUnion,
|
|
10
|
-
extendedEncodeURIComponent as __extendedEncodeURIComponent,
|
|
11
|
-
parseEpochTimestamp as __parseEpochTimestamp,
|
|
12
|
-
} from "@aws-sdk/smithy-client";
|
|
13
|
-
import {
|
|
14
|
-
Endpoint as __Endpoint,
|
|
15
|
-
MetadataBearer as __MetadataBearer,
|
|
16
|
-
ResponseMetadata as __ResponseMetadata,
|
|
17
|
-
SerdeContext as __SerdeContext,
|
|
18
|
-
SmithyException as __SmithyException,
|
|
19
|
-
} from "@aws-sdk/types";
|
|
20
|
-
import { v4 as generateIdempotencyToken } from "uuid";
|
|
21
|
-
|
|
22
|
-
import {
|
|
23
|
-
CreateReplicationSetCommandInput,
|
|
24
|
-
CreateReplicationSetCommandOutput,
|
|
25
|
-
} from "../commands/CreateReplicationSetCommand";
|
|
26
|
-
import { CreateResponsePlanCommandInput, CreateResponsePlanCommandOutput } from "../commands/CreateResponsePlanCommand";
|
|
27
|
-
import {
|
|
28
|
-
CreateTimelineEventCommandInput,
|
|
29
|
-
CreateTimelineEventCommandOutput,
|
|
30
|
-
} from "../commands/CreateTimelineEventCommand";
|
|
31
|
-
import {
|
|
32
|
-
DeleteIncidentRecordCommandInput,
|
|
33
|
-
DeleteIncidentRecordCommandOutput,
|
|
34
|
-
} from "../commands/DeleteIncidentRecordCommand";
|
|
35
|
-
import {
|
|
36
|
-
DeleteReplicationSetCommandInput,
|
|
37
|
-
DeleteReplicationSetCommandOutput,
|
|
38
|
-
} from "../commands/DeleteReplicationSetCommand";
|
|
39
|
-
import {
|
|
40
|
-
DeleteResourcePolicyCommandInput,
|
|
41
|
-
DeleteResourcePolicyCommandOutput,
|
|
42
|
-
} from "../commands/DeleteResourcePolicyCommand";
|
|
43
|
-
import { DeleteResponsePlanCommandInput, DeleteResponsePlanCommandOutput } from "../commands/DeleteResponsePlanCommand";
|
|
44
|
-
import {
|
|
45
|
-
DeleteTimelineEventCommandInput,
|
|
46
|
-
DeleteTimelineEventCommandOutput,
|
|
47
|
-
} from "../commands/DeleteTimelineEventCommand";
|
|
48
|
-
import { GetIncidentRecordCommandInput, GetIncidentRecordCommandOutput } from "../commands/GetIncidentRecordCommand";
|
|
49
|
-
import { GetReplicationSetCommandInput, GetReplicationSetCommandOutput } from "../commands/GetReplicationSetCommand";
|
|
50
|
-
import {
|
|
51
|
-
GetResourcePoliciesCommandInput,
|
|
52
|
-
GetResourcePoliciesCommandOutput,
|
|
53
|
-
} from "../commands/GetResourcePoliciesCommand";
|
|
54
|
-
import { GetResponsePlanCommandInput, GetResponsePlanCommandOutput } from "../commands/GetResponsePlanCommand";
|
|
55
|
-
import { GetTimelineEventCommandInput, GetTimelineEventCommandOutput } from "../commands/GetTimelineEventCommand";
|
|
56
|
-
import {
|
|
57
|
-
ListIncidentRecordsCommandInput,
|
|
58
|
-
ListIncidentRecordsCommandOutput,
|
|
59
|
-
} from "../commands/ListIncidentRecordsCommand";
|
|
60
|
-
import { ListRelatedItemsCommandInput, ListRelatedItemsCommandOutput } from "../commands/ListRelatedItemsCommand";
|
|
61
|
-
import {
|
|
62
|
-
ListReplicationSetsCommandInput,
|
|
63
|
-
ListReplicationSetsCommandOutput,
|
|
64
|
-
} from "../commands/ListReplicationSetsCommand";
|
|
65
|
-
import { ListResponsePlansCommandInput, ListResponsePlansCommandOutput } from "../commands/ListResponsePlansCommand";
|
|
66
|
-
import {
|
|
67
|
-
ListTagsForResourceCommandInput,
|
|
68
|
-
ListTagsForResourceCommandOutput,
|
|
69
|
-
} from "../commands/ListTagsForResourceCommand";
|
|
70
|
-
import { ListTimelineEventsCommandInput, ListTimelineEventsCommandOutput } from "../commands/ListTimelineEventsCommand";
|
|
71
|
-
import { PutResourcePolicyCommandInput, PutResourcePolicyCommandOutput } from "../commands/PutResourcePolicyCommand";
|
|
72
|
-
import { StartIncidentCommandInput, StartIncidentCommandOutput } from "../commands/StartIncidentCommand";
|
|
73
|
-
import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand";
|
|
74
|
-
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand";
|
|
75
|
-
import {
|
|
76
|
-
UpdateDeletionProtectionCommandInput,
|
|
77
|
-
UpdateDeletionProtectionCommandOutput,
|
|
78
|
-
} from "../commands/UpdateDeletionProtectionCommand";
|
|
79
|
-
import {
|
|
80
|
-
UpdateIncidentRecordCommandInput,
|
|
81
|
-
UpdateIncidentRecordCommandOutput,
|
|
82
|
-
} from "../commands/UpdateIncidentRecordCommand";
|
|
83
|
-
import { UpdateRelatedItemsCommandInput, UpdateRelatedItemsCommandOutput } from "../commands/UpdateRelatedItemsCommand";
|
|
84
|
-
import {
|
|
85
|
-
UpdateReplicationSetCommandInput,
|
|
86
|
-
UpdateReplicationSetCommandOutput,
|
|
87
|
-
} from "../commands/UpdateReplicationSetCommand";
|
|
88
|
-
import { UpdateResponsePlanCommandInput, UpdateResponsePlanCommandOutput } from "../commands/UpdateResponsePlanCommand";
|
|
89
|
-
import {
|
|
90
|
-
UpdateTimelineEventCommandInput,
|
|
91
|
-
UpdateTimelineEventCommandOutput,
|
|
92
|
-
} from "../commands/UpdateTimelineEventCommand";
|
|
93
|
-
import {
|
|
94
|
-
AccessDeniedException,
|
|
95
|
-
Action,
|
|
96
|
-
AddRegionAction,
|
|
97
|
-
AttributeValueList,
|
|
98
|
-
AutomationExecution,
|
|
99
|
-
ChatChannel,
|
|
100
|
-
Condition,
|
|
101
|
-
ConflictException,
|
|
102
|
-
DeleteRegionAction,
|
|
103
|
-
EmptyChatChannel,
|
|
104
|
-
EventSummary,
|
|
105
|
-
Filter,
|
|
106
|
-
IncidentRecord,
|
|
107
|
-
IncidentRecordSource,
|
|
108
|
-
IncidentRecordSummary,
|
|
109
|
-
IncidentTemplate,
|
|
110
|
-
InternalServerException,
|
|
111
|
-
ItemIdentifier,
|
|
112
|
-
ItemValue,
|
|
113
|
-
NotificationTargetItem,
|
|
114
|
-
RegionInfo,
|
|
115
|
-
RegionMapInputValue,
|
|
116
|
-
RelatedItem,
|
|
117
|
-
RelatedItemsUpdate,
|
|
118
|
-
ReplicationSet,
|
|
119
|
-
ResourceNotFoundException,
|
|
120
|
-
ResourcePolicy,
|
|
121
|
-
ResponsePlanSummary,
|
|
122
|
-
ServiceQuotaExceededException,
|
|
123
|
-
SsmAutomation,
|
|
124
|
-
ThrottlingException,
|
|
125
|
-
TimelineEvent,
|
|
126
|
-
TriggerDetails,
|
|
127
|
-
UpdateReplicationSetAction,
|
|
128
|
-
ValidationException,
|
|
129
|
-
} from "../models/models_0";
|
|
130
|
-
|
|
131
|
-
export const serializeAws_restJson1CreateReplicationSetCommand = async (
|
|
132
|
-
input: CreateReplicationSetCommandInput,
|
|
133
|
-
context: __SerdeContext
|
|
134
|
-
): Promise<__HttpRequest> => {
|
|
135
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
136
|
-
const headers: any = {
|
|
137
|
-
"content-type": "application/json",
|
|
138
|
-
};
|
|
139
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createReplicationSet";
|
|
140
|
-
let body: any;
|
|
141
|
-
body = JSON.stringify({
|
|
142
|
-
clientToken: input.clientToken ?? generateIdempotencyToken(),
|
|
143
|
-
...(input.regions !== undefined &&
|
|
144
|
-
input.regions !== null && { regions: serializeAws_restJson1RegionMapInput(input.regions, context) }),
|
|
145
|
-
});
|
|
146
|
-
return new __HttpRequest({
|
|
147
|
-
protocol,
|
|
148
|
-
hostname,
|
|
149
|
-
port,
|
|
150
|
-
method: "POST",
|
|
151
|
-
headers,
|
|
152
|
-
path: resolvedPath,
|
|
153
|
-
body,
|
|
154
|
-
});
|
|
155
|
-
};
|
|
156
|
-
|
|
157
|
-
export const serializeAws_restJson1CreateResponsePlanCommand = async (
|
|
158
|
-
input: CreateResponsePlanCommandInput,
|
|
159
|
-
context: __SerdeContext
|
|
160
|
-
): Promise<__HttpRequest> => {
|
|
161
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
162
|
-
const headers: any = {
|
|
163
|
-
"content-type": "application/json",
|
|
164
|
-
};
|
|
165
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createResponsePlan";
|
|
166
|
-
let body: any;
|
|
167
|
-
body = JSON.stringify({
|
|
168
|
-
...(input.actions !== undefined &&
|
|
169
|
-
input.actions !== null && { actions: serializeAws_restJson1ActionsList(input.actions, context) }),
|
|
170
|
-
...(input.chatChannel !== undefined &&
|
|
171
|
-
input.chatChannel !== null && { chatChannel: serializeAws_restJson1ChatChannel(input.chatChannel, context) }),
|
|
172
|
-
clientToken: input.clientToken ?? generateIdempotencyToken(),
|
|
173
|
-
...(input.displayName !== undefined && input.displayName !== null && { displayName: input.displayName }),
|
|
174
|
-
...(input.engagements !== undefined &&
|
|
175
|
-
input.engagements !== null && { engagements: serializeAws_restJson1EngagementSet(input.engagements, context) }),
|
|
176
|
-
...(input.incidentTemplate !== undefined &&
|
|
177
|
-
input.incidentTemplate !== null && {
|
|
178
|
-
incidentTemplate: serializeAws_restJson1IncidentTemplate(input.incidentTemplate, context),
|
|
179
|
-
}),
|
|
180
|
-
...(input.name !== undefined && input.name !== null && { name: input.name }),
|
|
181
|
-
...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
|
|
182
|
-
});
|
|
183
|
-
return new __HttpRequest({
|
|
184
|
-
protocol,
|
|
185
|
-
hostname,
|
|
186
|
-
port,
|
|
187
|
-
method: "POST",
|
|
188
|
-
headers,
|
|
189
|
-
path: resolvedPath,
|
|
190
|
-
body,
|
|
191
|
-
});
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
export const serializeAws_restJson1CreateTimelineEventCommand = async (
|
|
195
|
-
input: CreateTimelineEventCommandInput,
|
|
196
|
-
context: __SerdeContext
|
|
197
|
-
): Promise<__HttpRequest> => {
|
|
198
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
199
|
-
const headers: any = {
|
|
200
|
-
"content-type": "application/json",
|
|
201
|
-
};
|
|
202
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createTimelineEvent";
|
|
203
|
-
let body: any;
|
|
204
|
-
body = JSON.stringify({
|
|
205
|
-
clientToken: input.clientToken ?? generateIdempotencyToken(),
|
|
206
|
-
...(input.eventData !== undefined && input.eventData !== null && { eventData: input.eventData }),
|
|
207
|
-
...(input.eventTime !== undefined &&
|
|
208
|
-
input.eventTime !== null && { eventTime: Math.round(input.eventTime.getTime() / 1000) }),
|
|
209
|
-
...(input.eventType !== undefined && input.eventType !== null && { eventType: input.eventType }),
|
|
210
|
-
...(input.incidentRecordArn !== undefined &&
|
|
211
|
-
input.incidentRecordArn !== null && { incidentRecordArn: input.incidentRecordArn }),
|
|
212
|
-
});
|
|
213
|
-
return new __HttpRequest({
|
|
214
|
-
protocol,
|
|
215
|
-
hostname,
|
|
216
|
-
port,
|
|
217
|
-
method: "POST",
|
|
218
|
-
headers,
|
|
219
|
-
path: resolvedPath,
|
|
220
|
-
body,
|
|
221
|
-
});
|
|
222
|
-
};
|
|
223
|
-
|
|
224
|
-
export const serializeAws_restJson1DeleteIncidentRecordCommand = async (
|
|
225
|
-
input: DeleteIncidentRecordCommandInput,
|
|
226
|
-
context: __SerdeContext
|
|
227
|
-
): Promise<__HttpRequest> => {
|
|
228
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
229
|
-
const headers: any = {
|
|
230
|
-
"content-type": "application/json",
|
|
231
|
-
};
|
|
232
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteIncidentRecord";
|
|
233
|
-
let body: any;
|
|
234
|
-
body = JSON.stringify({
|
|
235
|
-
...(input.arn !== undefined && input.arn !== null && { arn: input.arn }),
|
|
236
|
-
});
|
|
237
|
-
return new __HttpRequest({
|
|
238
|
-
protocol,
|
|
239
|
-
hostname,
|
|
240
|
-
port,
|
|
241
|
-
method: "POST",
|
|
242
|
-
headers,
|
|
243
|
-
path: resolvedPath,
|
|
244
|
-
body,
|
|
245
|
-
});
|
|
246
|
-
};
|
|
247
|
-
|
|
248
|
-
export const serializeAws_restJson1DeleteReplicationSetCommand = async (
|
|
249
|
-
input: DeleteReplicationSetCommandInput,
|
|
250
|
-
context: __SerdeContext
|
|
251
|
-
): Promise<__HttpRequest> => {
|
|
252
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
253
|
-
const headers: any = {};
|
|
254
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteReplicationSet";
|
|
255
|
-
const query: any = {
|
|
256
|
-
...(input.arn !== undefined && { arn: input.arn }),
|
|
257
|
-
};
|
|
258
|
-
let body: any;
|
|
259
|
-
return new __HttpRequest({
|
|
260
|
-
protocol,
|
|
261
|
-
hostname,
|
|
262
|
-
port,
|
|
263
|
-
method: "POST",
|
|
264
|
-
headers,
|
|
265
|
-
path: resolvedPath,
|
|
266
|
-
query,
|
|
267
|
-
body,
|
|
268
|
-
});
|
|
269
|
-
};
|
|
270
|
-
|
|
271
|
-
export const serializeAws_restJson1DeleteResourcePolicyCommand = async (
|
|
272
|
-
input: DeleteResourcePolicyCommandInput,
|
|
273
|
-
context: __SerdeContext
|
|
274
|
-
): Promise<__HttpRequest> => {
|
|
275
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
276
|
-
const headers: any = {
|
|
277
|
-
"content-type": "application/json",
|
|
278
|
-
};
|
|
279
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteResourcePolicy";
|
|
280
|
-
let body: any;
|
|
281
|
-
body = JSON.stringify({
|
|
282
|
-
...(input.policyId !== undefined && input.policyId !== null && { policyId: input.policyId }),
|
|
283
|
-
...(input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn }),
|
|
284
|
-
});
|
|
285
|
-
return new __HttpRequest({
|
|
286
|
-
protocol,
|
|
287
|
-
hostname,
|
|
288
|
-
port,
|
|
289
|
-
method: "POST",
|
|
290
|
-
headers,
|
|
291
|
-
path: resolvedPath,
|
|
292
|
-
body,
|
|
293
|
-
});
|
|
294
|
-
};
|
|
295
|
-
|
|
296
|
-
export const serializeAws_restJson1DeleteResponsePlanCommand = async (
|
|
297
|
-
input: DeleteResponsePlanCommandInput,
|
|
298
|
-
context: __SerdeContext
|
|
299
|
-
): Promise<__HttpRequest> => {
|
|
300
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
301
|
-
const headers: any = {
|
|
302
|
-
"content-type": "application/json",
|
|
303
|
-
};
|
|
304
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteResponsePlan";
|
|
305
|
-
let body: any;
|
|
306
|
-
body = JSON.stringify({
|
|
307
|
-
...(input.arn !== undefined && input.arn !== null && { arn: input.arn }),
|
|
308
|
-
});
|
|
309
|
-
return new __HttpRequest({
|
|
310
|
-
protocol,
|
|
311
|
-
hostname,
|
|
312
|
-
port,
|
|
313
|
-
method: "POST",
|
|
314
|
-
headers,
|
|
315
|
-
path: resolvedPath,
|
|
316
|
-
body,
|
|
317
|
-
});
|
|
318
|
-
};
|
|
319
|
-
|
|
320
|
-
export const serializeAws_restJson1DeleteTimelineEventCommand = async (
|
|
321
|
-
input: DeleteTimelineEventCommandInput,
|
|
322
|
-
context: __SerdeContext
|
|
323
|
-
): Promise<__HttpRequest> => {
|
|
324
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
325
|
-
const headers: any = {
|
|
326
|
-
"content-type": "application/json",
|
|
327
|
-
};
|
|
328
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteTimelineEvent";
|
|
329
|
-
let body: any;
|
|
330
|
-
body = JSON.stringify({
|
|
331
|
-
...(input.eventId !== undefined && input.eventId !== null && { eventId: input.eventId }),
|
|
332
|
-
...(input.incidentRecordArn !== undefined &&
|
|
333
|
-
input.incidentRecordArn !== null && { incidentRecordArn: input.incidentRecordArn }),
|
|
334
|
-
});
|
|
335
|
-
return new __HttpRequest({
|
|
336
|
-
protocol,
|
|
337
|
-
hostname,
|
|
338
|
-
port,
|
|
339
|
-
method: "POST",
|
|
340
|
-
headers,
|
|
341
|
-
path: resolvedPath,
|
|
342
|
-
body,
|
|
343
|
-
});
|
|
344
|
-
};
|
|
345
|
-
|
|
346
|
-
export const serializeAws_restJson1GetIncidentRecordCommand = async (
|
|
347
|
-
input: GetIncidentRecordCommandInput,
|
|
348
|
-
context: __SerdeContext
|
|
349
|
-
): Promise<__HttpRequest> => {
|
|
350
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
351
|
-
const headers: any = {};
|
|
352
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getIncidentRecord";
|
|
353
|
-
const query: any = {
|
|
354
|
-
...(input.arn !== undefined && { arn: input.arn }),
|
|
355
|
-
};
|
|
356
|
-
let body: any;
|
|
357
|
-
return new __HttpRequest({
|
|
358
|
-
protocol,
|
|
359
|
-
hostname,
|
|
360
|
-
port,
|
|
361
|
-
method: "GET",
|
|
362
|
-
headers,
|
|
363
|
-
path: resolvedPath,
|
|
364
|
-
query,
|
|
365
|
-
body,
|
|
366
|
-
});
|
|
367
|
-
};
|
|
368
|
-
|
|
369
|
-
export const serializeAws_restJson1GetReplicationSetCommand = async (
|
|
370
|
-
input: GetReplicationSetCommandInput,
|
|
371
|
-
context: __SerdeContext
|
|
372
|
-
): Promise<__HttpRequest> => {
|
|
373
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
374
|
-
const headers: any = {};
|
|
375
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getReplicationSet";
|
|
376
|
-
const query: any = {
|
|
377
|
-
...(input.arn !== undefined && { arn: input.arn }),
|
|
378
|
-
};
|
|
379
|
-
let body: any;
|
|
380
|
-
return new __HttpRequest({
|
|
381
|
-
protocol,
|
|
382
|
-
hostname,
|
|
383
|
-
port,
|
|
384
|
-
method: "GET",
|
|
385
|
-
headers,
|
|
386
|
-
path: resolvedPath,
|
|
387
|
-
query,
|
|
388
|
-
body,
|
|
389
|
-
});
|
|
390
|
-
};
|
|
391
|
-
|
|
392
|
-
export const serializeAws_restJson1GetResourcePoliciesCommand = async (
|
|
393
|
-
input: GetResourcePoliciesCommandInput,
|
|
394
|
-
context: __SerdeContext
|
|
395
|
-
): Promise<__HttpRequest> => {
|
|
396
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
397
|
-
const headers: any = {
|
|
398
|
-
"content-type": "application/json",
|
|
399
|
-
};
|
|
400
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getResourcePolicies";
|
|
401
|
-
const query: any = {
|
|
402
|
-
...(input.resourceArn !== undefined && { resourceArn: input.resourceArn }),
|
|
403
|
-
};
|
|
404
|
-
let body: any;
|
|
405
|
-
body = JSON.stringify({
|
|
406
|
-
...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
|
|
407
|
-
...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
|
|
408
|
-
});
|
|
409
|
-
return new __HttpRequest({
|
|
410
|
-
protocol,
|
|
411
|
-
hostname,
|
|
412
|
-
port,
|
|
413
|
-
method: "POST",
|
|
414
|
-
headers,
|
|
415
|
-
path: resolvedPath,
|
|
416
|
-
query,
|
|
417
|
-
body,
|
|
418
|
-
});
|
|
419
|
-
};
|
|
420
|
-
|
|
421
|
-
export const serializeAws_restJson1GetResponsePlanCommand = async (
|
|
422
|
-
input: GetResponsePlanCommandInput,
|
|
423
|
-
context: __SerdeContext
|
|
424
|
-
): Promise<__HttpRequest> => {
|
|
425
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
426
|
-
const headers: any = {};
|
|
427
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getResponsePlan";
|
|
428
|
-
const query: any = {
|
|
429
|
-
...(input.arn !== undefined && { arn: input.arn }),
|
|
430
|
-
};
|
|
431
|
-
let body: any;
|
|
432
|
-
return new __HttpRequest({
|
|
433
|
-
protocol,
|
|
434
|
-
hostname,
|
|
435
|
-
port,
|
|
436
|
-
method: "GET",
|
|
437
|
-
headers,
|
|
438
|
-
path: resolvedPath,
|
|
439
|
-
query,
|
|
440
|
-
body,
|
|
441
|
-
});
|
|
442
|
-
};
|
|
443
|
-
|
|
444
|
-
export const serializeAws_restJson1GetTimelineEventCommand = async (
|
|
445
|
-
input: GetTimelineEventCommandInput,
|
|
446
|
-
context: __SerdeContext
|
|
447
|
-
): Promise<__HttpRequest> => {
|
|
448
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
449
|
-
const headers: any = {};
|
|
450
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getTimelineEvent";
|
|
451
|
-
const query: any = {
|
|
452
|
-
...(input.incidentRecordArn !== undefined && { incidentRecordArn: input.incidentRecordArn }),
|
|
453
|
-
...(input.eventId !== undefined && { eventId: input.eventId }),
|
|
454
|
-
};
|
|
455
|
-
let body: any;
|
|
456
|
-
return new __HttpRequest({
|
|
457
|
-
protocol,
|
|
458
|
-
hostname,
|
|
459
|
-
port,
|
|
460
|
-
method: "GET",
|
|
461
|
-
headers,
|
|
462
|
-
path: resolvedPath,
|
|
463
|
-
query,
|
|
464
|
-
body,
|
|
465
|
-
});
|
|
466
|
-
};
|
|
467
|
-
|
|
468
|
-
export const serializeAws_restJson1ListIncidentRecordsCommand = async (
|
|
469
|
-
input: ListIncidentRecordsCommandInput,
|
|
470
|
-
context: __SerdeContext
|
|
471
|
-
): Promise<__HttpRequest> => {
|
|
472
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
473
|
-
const headers: any = {
|
|
474
|
-
"content-type": "application/json",
|
|
475
|
-
};
|
|
476
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listIncidentRecords";
|
|
477
|
-
let body: any;
|
|
478
|
-
body = JSON.stringify({
|
|
479
|
-
...(input.filters !== undefined &&
|
|
480
|
-
input.filters !== null && { filters: serializeAws_restJson1FilterList(input.filters, context) }),
|
|
481
|
-
...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
|
|
482
|
-
...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
|
|
483
|
-
});
|
|
484
|
-
return new __HttpRequest({
|
|
485
|
-
protocol,
|
|
486
|
-
hostname,
|
|
487
|
-
port,
|
|
488
|
-
method: "POST",
|
|
489
|
-
headers,
|
|
490
|
-
path: resolvedPath,
|
|
491
|
-
body,
|
|
492
|
-
});
|
|
493
|
-
};
|
|
494
|
-
|
|
495
|
-
export const serializeAws_restJson1ListRelatedItemsCommand = async (
|
|
496
|
-
input: ListRelatedItemsCommandInput,
|
|
497
|
-
context: __SerdeContext
|
|
498
|
-
): Promise<__HttpRequest> => {
|
|
499
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
500
|
-
const headers: any = {
|
|
501
|
-
"content-type": "application/json",
|
|
502
|
-
};
|
|
503
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listRelatedItems";
|
|
504
|
-
let body: any;
|
|
505
|
-
body = JSON.stringify({
|
|
506
|
-
...(input.incidentRecordArn !== undefined &&
|
|
507
|
-
input.incidentRecordArn !== null && { incidentRecordArn: input.incidentRecordArn }),
|
|
508
|
-
...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
|
|
509
|
-
...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
|
|
510
|
-
});
|
|
511
|
-
return new __HttpRequest({
|
|
512
|
-
protocol,
|
|
513
|
-
hostname,
|
|
514
|
-
port,
|
|
515
|
-
method: "POST",
|
|
516
|
-
headers,
|
|
517
|
-
path: resolvedPath,
|
|
518
|
-
body,
|
|
519
|
-
});
|
|
520
|
-
};
|
|
521
|
-
|
|
522
|
-
export const serializeAws_restJson1ListReplicationSetsCommand = async (
|
|
523
|
-
input: ListReplicationSetsCommandInput,
|
|
524
|
-
context: __SerdeContext
|
|
525
|
-
): Promise<__HttpRequest> => {
|
|
526
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
527
|
-
const headers: any = {
|
|
528
|
-
"content-type": "application/json",
|
|
529
|
-
};
|
|
530
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listReplicationSets";
|
|
531
|
-
let body: any;
|
|
532
|
-
body = JSON.stringify({
|
|
533
|
-
...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
|
|
534
|
-
...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
|
|
535
|
-
});
|
|
536
|
-
return new __HttpRequest({
|
|
537
|
-
protocol,
|
|
538
|
-
hostname,
|
|
539
|
-
port,
|
|
540
|
-
method: "POST",
|
|
541
|
-
headers,
|
|
542
|
-
path: resolvedPath,
|
|
543
|
-
body,
|
|
544
|
-
});
|
|
545
|
-
};
|
|
546
|
-
|
|
547
|
-
export const serializeAws_restJson1ListResponsePlansCommand = async (
|
|
548
|
-
input: ListResponsePlansCommandInput,
|
|
549
|
-
context: __SerdeContext
|
|
550
|
-
): Promise<__HttpRequest> => {
|
|
551
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
552
|
-
const headers: any = {
|
|
553
|
-
"content-type": "application/json",
|
|
554
|
-
};
|
|
555
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listResponsePlans";
|
|
556
|
-
let body: any;
|
|
557
|
-
body = JSON.stringify({
|
|
558
|
-
...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
|
|
559
|
-
...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
|
|
560
|
-
});
|
|
561
|
-
return new __HttpRequest({
|
|
562
|
-
protocol,
|
|
563
|
-
hostname,
|
|
564
|
-
port,
|
|
565
|
-
method: "POST",
|
|
566
|
-
headers,
|
|
567
|
-
path: resolvedPath,
|
|
568
|
-
body,
|
|
569
|
-
});
|
|
570
|
-
};
|
|
571
|
-
|
|
572
|
-
export const serializeAws_restJson1ListTagsForResourceCommand = async (
|
|
573
|
-
input: ListTagsForResourceCommandInput,
|
|
574
|
-
context: __SerdeContext
|
|
575
|
-
): Promise<__HttpRequest> => {
|
|
576
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
577
|
-
const headers: any = {};
|
|
578
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
579
|
-
if (input.resourceArn !== undefined) {
|
|
580
|
-
const labelValue: string = input.resourceArn;
|
|
581
|
-
if (labelValue.length <= 0) {
|
|
582
|
-
throw new Error("Empty value provided for input HTTP label: resourceArn.");
|
|
583
|
-
}
|
|
584
|
-
resolvedPath = resolvedPath.replace("{resourceArn}", __extendedEncodeURIComponent(labelValue));
|
|
585
|
-
} else {
|
|
586
|
-
throw new Error("No value provided for input HTTP label: resourceArn.");
|
|
587
|
-
}
|
|
588
|
-
let body: any;
|
|
589
|
-
return new __HttpRequest({
|
|
590
|
-
protocol,
|
|
591
|
-
hostname,
|
|
592
|
-
port,
|
|
593
|
-
method: "GET",
|
|
594
|
-
headers,
|
|
595
|
-
path: resolvedPath,
|
|
596
|
-
body,
|
|
597
|
-
});
|
|
598
|
-
};
|
|
599
|
-
|
|
600
|
-
export const serializeAws_restJson1ListTimelineEventsCommand = async (
|
|
601
|
-
input: ListTimelineEventsCommandInput,
|
|
602
|
-
context: __SerdeContext
|
|
603
|
-
): Promise<__HttpRequest> => {
|
|
604
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
605
|
-
const headers: any = {
|
|
606
|
-
"content-type": "application/json",
|
|
607
|
-
};
|
|
608
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listTimelineEvents";
|
|
609
|
-
let body: any;
|
|
610
|
-
body = JSON.stringify({
|
|
611
|
-
...(input.filters !== undefined &&
|
|
612
|
-
input.filters !== null && { filters: serializeAws_restJson1FilterList(input.filters, context) }),
|
|
613
|
-
...(input.incidentRecordArn !== undefined &&
|
|
614
|
-
input.incidentRecordArn !== null && { incidentRecordArn: input.incidentRecordArn }),
|
|
615
|
-
...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
|
|
616
|
-
...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
|
|
617
|
-
...(input.sortBy !== undefined && input.sortBy !== null && { sortBy: input.sortBy }),
|
|
618
|
-
...(input.sortOrder !== undefined && input.sortOrder !== null && { sortOrder: input.sortOrder }),
|
|
619
|
-
});
|
|
620
|
-
return new __HttpRequest({
|
|
621
|
-
protocol,
|
|
622
|
-
hostname,
|
|
623
|
-
port,
|
|
624
|
-
method: "POST",
|
|
625
|
-
headers,
|
|
626
|
-
path: resolvedPath,
|
|
627
|
-
body,
|
|
628
|
-
});
|
|
629
|
-
};
|
|
630
|
-
|
|
631
|
-
export const serializeAws_restJson1PutResourcePolicyCommand = async (
|
|
632
|
-
input: PutResourcePolicyCommandInput,
|
|
633
|
-
context: __SerdeContext
|
|
634
|
-
): Promise<__HttpRequest> => {
|
|
635
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
636
|
-
const headers: any = {
|
|
637
|
-
"content-type": "application/json",
|
|
638
|
-
};
|
|
639
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/putResourcePolicy";
|
|
640
|
-
let body: any;
|
|
641
|
-
body = JSON.stringify({
|
|
642
|
-
...(input.policy !== undefined && input.policy !== null && { policy: input.policy }),
|
|
643
|
-
...(input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn }),
|
|
644
|
-
});
|
|
645
|
-
return new __HttpRequest({
|
|
646
|
-
protocol,
|
|
647
|
-
hostname,
|
|
648
|
-
port,
|
|
649
|
-
method: "POST",
|
|
650
|
-
headers,
|
|
651
|
-
path: resolvedPath,
|
|
652
|
-
body,
|
|
653
|
-
});
|
|
654
|
-
};
|
|
655
|
-
|
|
656
|
-
export const serializeAws_restJson1StartIncidentCommand = async (
|
|
657
|
-
input: StartIncidentCommandInput,
|
|
658
|
-
context: __SerdeContext
|
|
659
|
-
): Promise<__HttpRequest> => {
|
|
660
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
661
|
-
const headers: any = {
|
|
662
|
-
"content-type": "application/json",
|
|
663
|
-
};
|
|
664
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/startIncident";
|
|
665
|
-
let body: any;
|
|
666
|
-
body = JSON.stringify({
|
|
667
|
-
clientToken: input.clientToken ?? generateIdempotencyToken(),
|
|
668
|
-
...(input.impact !== undefined && input.impact !== null && { impact: input.impact }),
|
|
669
|
-
...(input.relatedItems !== undefined &&
|
|
670
|
-
input.relatedItems !== null && {
|
|
671
|
-
relatedItems: serializeAws_restJson1RelatedItemList(input.relatedItems, context),
|
|
672
|
-
}),
|
|
673
|
-
...(input.responsePlanArn !== undefined &&
|
|
674
|
-
input.responsePlanArn !== null && { responsePlanArn: input.responsePlanArn }),
|
|
675
|
-
...(input.title !== undefined && input.title !== null && { title: input.title }),
|
|
676
|
-
...(input.triggerDetails !== undefined &&
|
|
677
|
-
input.triggerDetails !== null && {
|
|
678
|
-
triggerDetails: serializeAws_restJson1TriggerDetails(input.triggerDetails, context),
|
|
679
|
-
}),
|
|
680
|
-
});
|
|
681
|
-
return new __HttpRequest({
|
|
682
|
-
protocol,
|
|
683
|
-
hostname,
|
|
684
|
-
port,
|
|
685
|
-
method: "POST",
|
|
686
|
-
headers,
|
|
687
|
-
path: resolvedPath,
|
|
688
|
-
body,
|
|
689
|
-
});
|
|
690
|
-
};
|
|
691
|
-
|
|
692
|
-
export const serializeAws_restJson1TagResourceCommand = async (
|
|
693
|
-
input: TagResourceCommandInput,
|
|
694
|
-
context: __SerdeContext
|
|
695
|
-
): Promise<__HttpRequest> => {
|
|
696
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
697
|
-
const headers: any = {
|
|
698
|
-
"content-type": "application/json",
|
|
699
|
-
};
|
|
700
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
701
|
-
if (input.resourceArn !== undefined) {
|
|
702
|
-
const labelValue: string = input.resourceArn;
|
|
703
|
-
if (labelValue.length <= 0) {
|
|
704
|
-
throw new Error("Empty value provided for input HTTP label: resourceArn.");
|
|
705
|
-
}
|
|
706
|
-
resolvedPath = resolvedPath.replace("{resourceArn}", __extendedEncodeURIComponent(labelValue));
|
|
707
|
-
} else {
|
|
708
|
-
throw new Error("No value provided for input HTTP label: resourceArn.");
|
|
709
|
-
}
|
|
710
|
-
let body: any;
|
|
711
|
-
body = JSON.stringify({
|
|
712
|
-
...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
|
|
713
|
-
});
|
|
714
|
-
return new __HttpRequest({
|
|
715
|
-
protocol,
|
|
716
|
-
hostname,
|
|
717
|
-
port,
|
|
718
|
-
method: "POST",
|
|
719
|
-
headers,
|
|
720
|
-
path: resolvedPath,
|
|
721
|
-
body,
|
|
722
|
-
});
|
|
723
|
-
};
|
|
724
|
-
|
|
725
|
-
export const serializeAws_restJson1UntagResourceCommand = async (
|
|
726
|
-
input: UntagResourceCommandInput,
|
|
727
|
-
context: __SerdeContext
|
|
728
|
-
): Promise<__HttpRequest> => {
|
|
729
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
730
|
-
const headers: any = {};
|
|
731
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
732
|
-
if (input.resourceArn !== undefined) {
|
|
733
|
-
const labelValue: string = input.resourceArn;
|
|
734
|
-
if (labelValue.length <= 0) {
|
|
735
|
-
throw new Error("Empty value provided for input HTTP label: resourceArn.");
|
|
736
|
-
}
|
|
737
|
-
resolvedPath = resolvedPath.replace("{resourceArn}", __extendedEncodeURIComponent(labelValue));
|
|
738
|
-
} else {
|
|
739
|
-
throw new Error("No value provided for input HTTP label: resourceArn.");
|
|
740
|
-
}
|
|
741
|
-
const query: any = {
|
|
742
|
-
...(input.tagKeys !== undefined && { tagKeys: (input.tagKeys || []).map((_entry) => _entry as any) }),
|
|
743
|
-
};
|
|
744
|
-
let body: any;
|
|
745
|
-
return new __HttpRequest({
|
|
746
|
-
protocol,
|
|
747
|
-
hostname,
|
|
748
|
-
port,
|
|
749
|
-
method: "DELETE",
|
|
750
|
-
headers,
|
|
751
|
-
path: resolvedPath,
|
|
752
|
-
query,
|
|
753
|
-
body,
|
|
754
|
-
});
|
|
755
|
-
};
|
|
756
|
-
|
|
757
|
-
export const serializeAws_restJson1UpdateDeletionProtectionCommand = async (
|
|
758
|
-
input: UpdateDeletionProtectionCommandInput,
|
|
759
|
-
context: __SerdeContext
|
|
760
|
-
): Promise<__HttpRequest> => {
|
|
761
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
762
|
-
const headers: any = {
|
|
763
|
-
"content-type": "application/json",
|
|
764
|
-
};
|
|
765
|
-
const resolvedPath =
|
|
766
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateDeletionProtection";
|
|
767
|
-
let body: any;
|
|
768
|
-
body = JSON.stringify({
|
|
769
|
-
...(input.arn !== undefined && input.arn !== null && { arn: input.arn }),
|
|
770
|
-
clientToken: input.clientToken ?? generateIdempotencyToken(),
|
|
771
|
-
...(input.deletionProtected !== undefined &&
|
|
772
|
-
input.deletionProtected !== null && { deletionProtected: input.deletionProtected }),
|
|
773
|
-
});
|
|
774
|
-
return new __HttpRequest({
|
|
775
|
-
protocol,
|
|
776
|
-
hostname,
|
|
777
|
-
port,
|
|
778
|
-
method: "POST",
|
|
779
|
-
headers,
|
|
780
|
-
path: resolvedPath,
|
|
781
|
-
body,
|
|
782
|
-
});
|
|
783
|
-
};
|
|
784
|
-
|
|
785
|
-
export const serializeAws_restJson1UpdateIncidentRecordCommand = async (
|
|
786
|
-
input: UpdateIncidentRecordCommandInput,
|
|
787
|
-
context: __SerdeContext
|
|
788
|
-
): Promise<__HttpRequest> => {
|
|
789
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
790
|
-
const headers: any = {
|
|
791
|
-
"content-type": "application/json",
|
|
792
|
-
};
|
|
793
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateIncidentRecord";
|
|
794
|
-
let body: any;
|
|
795
|
-
body = JSON.stringify({
|
|
796
|
-
...(input.arn !== undefined && input.arn !== null && { arn: input.arn }),
|
|
797
|
-
...(input.chatChannel !== undefined &&
|
|
798
|
-
input.chatChannel !== null && { chatChannel: serializeAws_restJson1ChatChannel(input.chatChannel, context) }),
|
|
799
|
-
clientToken: input.clientToken ?? generateIdempotencyToken(),
|
|
800
|
-
...(input.impact !== undefined && input.impact !== null && { impact: input.impact }),
|
|
801
|
-
...(input.notificationTargets !== undefined &&
|
|
802
|
-
input.notificationTargets !== null && {
|
|
803
|
-
notificationTargets: serializeAws_restJson1NotificationTargetSet(input.notificationTargets, context),
|
|
804
|
-
}),
|
|
805
|
-
...(input.status !== undefined && input.status !== null && { status: input.status }),
|
|
806
|
-
...(input.summary !== undefined && input.summary !== null && { summary: input.summary }),
|
|
807
|
-
...(input.title !== undefined && input.title !== null && { title: input.title }),
|
|
808
|
-
});
|
|
809
|
-
return new __HttpRequest({
|
|
810
|
-
protocol,
|
|
811
|
-
hostname,
|
|
812
|
-
port,
|
|
813
|
-
method: "POST",
|
|
814
|
-
headers,
|
|
815
|
-
path: resolvedPath,
|
|
816
|
-
body,
|
|
817
|
-
});
|
|
818
|
-
};
|
|
819
|
-
|
|
820
|
-
export const serializeAws_restJson1UpdateRelatedItemsCommand = async (
|
|
821
|
-
input: UpdateRelatedItemsCommandInput,
|
|
822
|
-
context: __SerdeContext
|
|
823
|
-
): Promise<__HttpRequest> => {
|
|
824
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
825
|
-
const headers: any = {
|
|
826
|
-
"content-type": "application/json",
|
|
827
|
-
};
|
|
828
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateRelatedItems";
|
|
829
|
-
let body: any;
|
|
830
|
-
body = JSON.stringify({
|
|
831
|
-
clientToken: input.clientToken ?? generateIdempotencyToken(),
|
|
832
|
-
...(input.incidentRecordArn !== undefined &&
|
|
833
|
-
input.incidentRecordArn !== null && { incidentRecordArn: input.incidentRecordArn }),
|
|
834
|
-
...(input.relatedItemsUpdate !== undefined &&
|
|
835
|
-
input.relatedItemsUpdate !== null && {
|
|
836
|
-
relatedItemsUpdate: serializeAws_restJson1RelatedItemsUpdate(input.relatedItemsUpdate, context),
|
|
837
|
-
}),
|
|
838
|
-
});
|
|
839
|
-
return new __HttpRequest({
|
|
840
|
-
protocol,
|
|
841
|
-
hostname,
|
|
842
|
-
port,
|
|
843
|
-
method: "POST",
|
|
844
|
-
headers,
|
|
845
|
-
path: resolvedPath,
|
|
846
|
-
body,
|
|
847
|
-
});
|
|
848
|
-
};
|
|
849
|
-
|
|
850
|
-
export const serializeAws_restJson1UpdateReplicationSetCommand = async (
|
|
851
|
-
input: UpdateReplicationSetCommandInput,
|
|
852
|
-
context: __SerdeContext
|
|
853
|
-
): Promise<__HttpRequest> => {
|
|
854
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
855
|
-
const headers: any = {
|
|
856
|
-
"content-type": "application/json",
|
|
857
|
-
};
|
|
858
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateReplicationSet";
|
|
859
|
-
let body: any;
|
|
860
|
-
body = JSON.stringify({
|
|
861
|
-
...(input.actions !== undefined &&
|
|
862
|
-
input.actions !== null && { actions: serializeAws_restJson1UpdateActionList(input.actions, context) }),
|
|
863
|
-
...(input.arn !== undefined && input.arn !== null && { arn: input.arn }),
|
|
864
|
-
clientToken: input.clientToken ?? generateIdempotencyToken(),
|
|
865
|
-
});
|
|
866
|
-
return new __HttpRequest({
|
|
867
|
-
protocol,
|
|
868
|
-
hostname,
|
|
869
|
-
port,
|
|
870
|
-
method: "POST",
|
|
871
|
-
headers,
|
|
872
|
-
path: resolvedPath,
|
|
873
|
-
body,
|
|
874
|
-
});
|
|
875
|
-
};
|
|
876
|
-
|
|
877
|
-
export const serializeAws_restJson1UpdateResponsePlanCommand = async (
|
|
878
|
-
input: UpdateResponsePlanCommandInput,
|
|
879
|
-
context: __SerdeContext
|
|
880
|
-
): Promise<__HttpRequest> => {
|
|
881
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
882
|
-
const headers: any = {
|
|
883
|
-
"content-type": "application/json",
|
|
884
|
-
};
|
|
885
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateResponsePlan";
|
|
886
|
-
let body: any;
|
|
887
|
-
body = JSON.stringify({
|
|
888
|
-
...(input.actions !== undefined &&
|
|
889
|
-
input.actions !== null && { actions: serializeAws_restJson1ActionsList(input.actions, context) }),
|
|
890
|
-
...(input.arn !== undefined && input.arn !== null && { arn: input.arn }),
|
|
891
|
-
...(input.chatChannel !== undefined &&
|
|
892
|
-
input.chatChannel !== null && { chatChannel: serializeAws_restJson1ChatChannel(input.chatChannel, context) }),
|
|
893
|
-
clientToken: input.clientToken ?? generateIdempotencyToken(),
|
|
894
|
-
...(input.displayName !== undefined && input.displayName !== null && { displayName: input.displayName }),
|
|
895
|
-
...(input.engagements !== undefined &&
|
|
896
|
-
input.engagements !== null && { engagements: serializeAws_restJson1EngagementSet(input.engagements, context) }),
|
|
897
|
-
...(input.incidentTemplateDedupeString !== undefined &&
|
|
898
|
-
input.incidentTemplateDedupeString !== null && {
|
|
899
|
-
incidentTemplateDedupeString: input.incidentTemplateDedupeString,
|
|
900
|
-
}),
|
|
901
|
-
...(input.incidentTemplateImpact !== undefined &&
|
|
902
|
-
input.incidentTemplateImpact !== null && { incidentTemplateImpact: input.incidentTemplateImpact }),
|
|
903
|
-
...(input.incidentTemplateNotificationTargets !== undefined &&
|
|
904
|
-
input.incidentTemplateNotificationTargets !== null && {
|
|
905
|
-
incidentTemplateNotificationTargets: serializeAws_restJson1NotificationTargetSet(
|
|
906
|
-
input.incidentTemplateNotificationTargets,
|
|
907
|
-
context
|
|
908
|
-
),
|
|
909
|
-
}),
|
|
910
|
-
...(input.incidentTemplateSummary !== undefined &&
|
|
911
|
-
input.incidentTemplateSummary !== null && { incidentTemplateSummary: input.incidentTemplateSummary }),
|
|
912
|
-
...(input.incidentTemplateTitle !== undefined &&
|
|
913
|
-
input.incidentTemplateTitle !== null && { incidentTemplateTitle: input.incidentTemplateTitle }),
|
|
914
|
-
});
|
|
915
|
-
return new __HttpRequest({
|
|
916
|
-
protocol,
|
|
917
|
-
hostname,
|
|
918
|
-
port,
|
|
919
|
-
method: "POST",
|
|
920
|
-
headers,
|
|
921
|
-
path: resolvedPath,
|
|
922
|
-
body,
|
|
923
|
-
});
|
|
924
|
-
};
|
|
925
|
-
|
|
926
|
-
export const serializeAws_restJson1UpdateTimelineEventCommand = async (
|
|
927
|
-
input: UpdateTimelineEventCommandInput,
|
|
928
|
-
context: __SerdeContext
|
|
929
|
-
): Promise<__HttpRequest> => {
|
|
930
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
931
|
-
const headers: any = {
|
|
932
|
-
"content-type": "application/json",
|
|
933
|
-
};
|
|
934
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateTimelineEvent";
|
|
935
|
-
let body: any;
|
|
936
|
-
body = JSON.stringify({
|
|
937
|
-
clientToken: input.clientToken ?? generateIdempotencyToken(),
|
|
938
|
-
...(input.eventData !== undefined && input.eventData !== null && { eventData: input.eventData }),
|
|
939
|
-
...(input.eventId !== undefined && input.eventId !== null && { eventId: input.eventId }),
|
|
940
|
-
...(input.eventTime !== undefined &&
|
|
941
|
-
input.eventTime !== null && { eventTime: Math.round(input.eventTime.getTime() / 1000) }),
|
|
942
|
-
...(input.eventType !== undefined && input.eventType !== null && { eventType: input.eventType }),
|
|
943
|
-
...(input.incidentRecordArn !== undefined &&
|
|
944
|
-
input.incidentRecordArn !== null && { incidentRecordArn: input.incidentRecordArn }),
|
|
945
|
-
});
|
|
946
|
-
return new __HttpRequest({
|
|
947
|
-
protocol,
|
|
948
|
-
hostname,
|
|
949
|
-
port,
|
|
950
|
-
method: "POST",
|
|
951
|
-
headers,
|
|
952
|
-
path: resolvedPath,
|
|
953
|
-
body,
|
|
954
|
-
});
|
|
955
|
-
};
|
|
956
|
-
|
|
957
|
-
export const deserializeAws_restJson1CreateReplicationSetCommand = async (
|
|
958
|
-
output: __HttpResponse,
|
|
959
|
-
context: __SerdeContext
|
|
960
|
-
): Promise<CreateReplicationSetCommandOutput> => {
|
|
961
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
962
|
-
return deserializeAws_restJson1CreateReplicationSetCommandError(output, context);
|
|
963
|
-
}
|
|
964
|
-
const contents: CreateReplicationSetCommandOutput = {
|
|
965
|
-
$metadata: deserializeMetadata(output),
|
|
966
|
-
arn: undefined,
|
|
967
|
-
};
|
|
968
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
969
|
-
if (data.arn !== undefined && data.arn !== null) {
|
|
970
|
-
contents.arn = __expectString(data.arn);
|
|
971
|
-
}
|
|
972
|
-
return Promise.resolve(contents);
|
|
973
|
-
};
|
|
974
|
-
|
|
975
|
-
const deserializeAws_restJson1CreateReplicationSetCommandError = async (
|
|
976
|
-
output: __HttpResponse,
|
|
977
|
-
context: __SerdeContext
|
|
978
|
-
): Promise<CreateReplicationSetCommandOutput> => {
|
|
979
|
-
const parsedOutput: any = {
|
|
980
|
-
...output,
|
|
981
|
-
body: await parseBody(output.body, context),
|
|
982
|
-
};
|
|
983
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
984
|
-
let errorCode = "UnknownError";
|
|
985
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
986
|
-
switch (errorCode) {
|
|
987
|
-
case "AccessDeniedException":
|
|
988
|
-
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
989
|
-
response = {
|
|
990
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
991
|
-
name: errorCode,
|
|
992
|
-
$metadata: deserializeMetadata(output),
|
|
993
|
-
};
|
|
994
|
-
break;
|
|
995
|
-
case "ConflictException":
|
|
996
|
-
case "com.amazonaws.ssmincidents#ConflictException":
|
|
997
|
-
response = {
|
|
998
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
999
|
-
name: errorCode,
|
|
1000
|
-
$metadata: deserializeMetadata(output),
|
|
1001
|
-
};
|
|
1002
|
-
break;
|
|
1003
|
-
case "InternalServerException":
|
|
1004
|
-
case "com.amazonaws.ssmincidents#InternalServerException":
|
|
1005
|
-
response = {
|
|
1006
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1007
|
-
name: errorCode,
|
|
1008
|
-
$metadata: deserializeMetadata(output),
|
|
1009
|
-
};
|
|
1010
|
-
break;
|
|
1011
|
-
case "ServiceQuotaExceededException":
|
|
1012
|
-
case "com.amazonaws.ssmincidents#ServiceQuotaExceededException":
|
|
1013
|
-
response = {
|
|
1014
|
-
...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
1015
|
-
name: errorCode,
|
|
1016
|
-
$metadata: deserializeMetadata(output),
|
|
1017
|
-
};
|
|
1018
|
-
break;
|
|
1019
|
-
case "ThrottlingException":
|
|
1020
|
-
case "com.amazonaws.ssmincidents#ThrottlingException":
|
|
1021
|
-
response = {
|
|
1022
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1023
|
-
name: errorCode,
|
|
1024
|
-
$metadata: deserializeMetadata(output),
|
|
1025
|
-
};
|
|
1026
|
-
break;
|
|
1027
|
-
case "ValidationException":
|
|
1028
|
-
case "com.amazonaws.ssmincidents#ValidationException":
|
|
1029
|
-
response = {
|
|
1030
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1031
|
-
name: errorCode,
|
|
1032
|
-
$metadata: deserializeMetadata(output),
|
|
1033
|
-
};
|
|
1034
|
-
break;
|
|
1035
|
-
default:
|
|
1036
|
-
const parsedBody = parsedOutput.body;
|
|
1037
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1038
|
-
response = {
|
|
1039
|
-
...parsedBody,
|
|
1040
|
-
name: `${errorCode}`,
|
|
1041
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1042
|
-
$fault: "client",
|
|
1043
|
-
$metadata: deserializeMetadata(output),
|
|
1044
|
-
} as any;
|
|
1045
|
-
}
|
|
1046
|
-
const message = response.message || response.Message || errorCode;
|
|
1047
|
-
response.message = message;
|
|
1048
|
-
delete response.Message;
|
|
1049
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1050
|
-
};
|
|
1051
|
-
|
|
1052
|
-
export const deserializeAws_restJson1CreateResponsePlanCommand = async (
|
|
1053
|
-
output: __HttpResponse,
|
|
1054
|
-
context: __SerdeContext
|
|
1055
|
-
): Promise<CreateResponsePlanCommandOutput> => {
|
|
1056
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
1057
|
-
return deserializeAws_restJson1CreateResponsePlanCommandError(output, context);
|
|
1058
|
-
}
|
|
1059
|
-
const contents: CreateResponsePlanCommandOutput = {
|
|
1060
|
-
$metadata: deserializeMetadata(output),
|
|
1061
|
-
arn: undefined,
|
|
1062
|
-
};
|
|
1063
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1064
|
-
if (data.arn !== undefined && data.arn !== null) {
|
|
1065
|
-
contents.arn = __expectString(data.arn);
|
|
1066
|
-
}
|
|
1067
|
-
return Promise.resolve(contents);
|
|
1068
|
-
};
|
|
1069
|
-
|
|
1070
|
-
const deserializeAws_restJson1CreateResponsePlanCommandError = async (
|
|
1071
|
-
output: __HttpResponse,
|
|
1072
|
-
context: __SerdeContext
|
|
1073
|
-
): Promise<CreateResponsePlanCommandOutput> => {
|
|
1074
|
-
const parsedOutput: any = {
|
|
1075
|
-
...output,
|
|
1076
|
-
body: await parseBody(output.body, context),
|
|
1077
|
-
};
|
|
1078
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1079
|
-
let errorCode = "UnknownError";
|
|
1080
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1081
|
-
switch (errorCode) {
|
|
1082
|
-
case "AccessDeniedException":
|
|
1083
|
-
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
1084
|
-
response = {
|
|
1085
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1086
|
-
name: errorCode,
|
|
1087
|
-
$metadata: deserializeMetadata(output),
|
|
1088
|
-
};
|
|
1089
|
-
break;
|
|
1090
|
-
case "ConflictException":
|
|
1091
|
-
case "com.amazonaws.ssmincidents#ConflictException":
|
|
1092
|
-
response = {
|
|
1093
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
1094
|
-
name: errorCode,
|
|
1095
|
-
$metadata: deserializeMetadata(output),
|
|
1096
|
-
};
|
|
1097
|
-
break;
|
|
1098
|
-
case "InternalServerException":
|
|
1099
|
-
case "com.amazonaws.ssmincidents#InternalServerException":
|
|
1100
|
-
response = {
|
|
1101
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1102
|
-
name: errorCode,
|
|
1103
|
-
$metadata: deserializeMetadata(output),
|
|
1104
|
-
};
|
|
1105
|
-
break;
|
|
1106
|
-
case "ResourceNotFoundException":
|
|
1107
|
-
case "com.amazonaws.ssmincidents#ResourceNotFoundException":
|
|
1108
|
-
response = {
|
|
1109
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1110
|
-
name: errorCode,
|
|
1111
|
-
$metadata: deserializeMetadata(output),
|
|
1112
|
-
};
|
|
1113
|
-
break;
|
|
1114
|
-
case "ThrottlingException":
|
|
1115
|
-
case "com.amazonaws.ssmincidents#ThrottlingException":
|
|
1116
|
-
response = {
|
|
1117
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1118
|
-
name: errorCode,
|
|
1119
|
-
$metadata: deserializeMetadata(output),
|
|
1120
|
-
};
|
|
1121
|
-
break;
|
|
1122
|
-
case "ValidationException":
|
|
1123
|
-
case "com.amazonaws.ssmincidents#ValidationException":
|
|
1124
|
-
response = {
|
|
1125
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1126
|
-
name: errorCode,
|
|
1127
|
-
$metadata: deserializeMetadata(output),
|
|
1128
|
-
};
|
|
1129
|
-
break;
|
|
1130
|
-
default:
|
|
1131
|
-
const parsedBody = parsedOutput.body;
|
|
1132
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1133
|
-
response = {
|
|
1134
|
-
...parsedBody,
|
|
1135
|
-
name: `${errorCode}`,
|
|
1136
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1137
|
-
$fault: "client",
|
|
1138
|
-
$metadata: deserializeMetadata(output),
|
|
1139
|
-
} as any;
|
|
1140
|
-
}
|
|
1141
|
-
const message = response.message || response.Message || errorCode;
|
|
1142
|
-
response.message = message;
|
|
1143
|
-
delete response.Message;
|
|
1144
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1145
|
-
};
|
|
1146
|
-
|
|
1147
|
-
export const deserializeAws_restJson1CreateTimelineEventCommand = async (
|
|
1148
|
-
output: __HttpResponse,
|
|
1149
|
-
context: __SerdeContext
|
|
1150
|
-
): Promise<CreateTimelineEventCommandOutput> => {
|
|
1151
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
1152
|
-
return deserializeAws_restJson1CreateTimelineEventCommandError(output, context);
|
|
1153
|
-
}
|
|
1154
|
-
const contents: CreateTimelineEventCommandOutput = {
|
|
1155
|
-
$metadata: deserializeMetadata(output),
|
|
1156
|
-
eventId: undefined,
|
|
1157
|
-
incidentRecordArn: undefined,
|
|
1158
|
-
};
|
|
1159
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1160
|
-
if (data.eventId !== undefined && data.eventId !== null) {
|
|
1161
|
-
contents.eventId = __expectString(data.eventId);
|
|
1162
|
-
}
|
|
1163
|
-
if (data.incidentRecordArn !== undefined && data.incidentRecordArn !== null) {
|
|
1164
|
-
contents.incidentRecordArn = __expectString(data.incidentRecordArn);
|
|
1165
|
-
}
|
|
1166
|
-
return Promise.resolve(contents);
|
|
1167
|
-
};
|
|
1168
|
-
|
|
1169
|
-
const deserializeAws_restJson1CreateTimelineEventCommandError = async (
|
|
1170
|
-
output: __HttpResponse,
|
|
1171
|
-
context: __SerdeContext
|
|
1172
|
-
): Promise<CreateTimelineEventCommandOutput> => {
|
|
1173
|
-
const parsedOutput: any = {
|
|
1174
|
-
...output,
|
|
1175
|
-
body: await parseBody(output.body, context),
|
|
1176
|
-
};
|
|
1177
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1178
|
-
let errorCode = "UnknownError";
|
|
1179
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1180
|
-
switch (errorCode) {
|
|
1181
|
-
case "AccessDeniedException":
|
|
1182
|
-
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
1183
|
-
response = {
|
|
1184
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1185
|
-
name: errorCode,
|
|
1186
|
-
$metadata: deserializeMetadata(output),
|
|
1187
|
-
};
|
|
1188
|
-
break;
|
|
1189
|
-
case "ConflictException":
|
|
1190
|
-
case "com.amazonaws.ssmincidents#ConflictException":
|
|
1191
|
-
response = {
|
|
1192
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
1193
|
-
name: errorCode,
|
|
1194
|
-
$metadata: deserializeMetadata(output),
|
|
1195
|
-
};
|
|
1196
|
-
break;
|
|
1197
|
-
case "InternalServerException":
|
|
1198
|
-
case "com.amazonaws.ssmincidents#InternalServerException":
|
|
1199
|
-
response = {
|
|
1200
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1201
|
-
name: errorCode,
|
|
1202
|
-
$metadata: deserializeMetadata(output),
|
|
1203
|
-
};
|
|
1204
|
-
break;
|
|
1205
|
-
case "ResourceNotFoundException":
|
|
1206
|
-
case "com.amazonaws.ssmincidents#ResourceNotFoundException":
|
|
1207
|
-
response = {
|
|
1208
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1209
|
-
name: errorCode,
|
|
1210
|
-
$metadata: deserializeMetadata(output),
|
|
1211
|
-
};
|
|
1212
|
-
break;
|
|
1213
|
-
case "ThrottlingException":
|
|
1214
|
-
case "com.amazonaws.ssmincidents#ThrottlingException":
|
|
1215
|
-
response = {
|
|
1216
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1217
|
-
name: errorCode,
|
|
1218
|
-
$metadata: deserializeMetadata(output),
|
|
1219
|
-
};
|
|
1220
|
-
break;
|
|
1221
|
-
case "ValidationException":
|
|
1222
|
-
case "com.amazonaws.ssmincidents#ValidationException":
|
|
1223
|
-
response = {
|
|
1224
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1225
|
-
name: errorCode,
|
|
1226
|
-
$metadata: deserializeMetadata(output),
|
|
1227
|
-
};
|
|
1228
|
-
break;
|
|
1229
|
-
default:
|
|
1230
|
-
const parsedBody = parsedOutput.body;
|
|
1231
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1232
|
-
response = {
|
|
1233
|
-
...parsedBody,
|
|
1234
|
-
name: `${errorCode}`,
|
|
1235
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1236
|
-
$fault: "client",
|
|
1237
|
-
$metadata: deserializeMetadata(output),
|
|
1238
|
-
} as any;
|
|
1239
|
-
}
|
|
1240
|
-
const message = response.message || response.Message || errorCode;
|
|
1241
|
-
response.message = message;
|
|
1242
|
-
delete response.Message;
|
|
1243
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1244
|
-
};
|
|
1245
|
-
|
|
1246
|
-
export const deserializeAws_restJson1DeleteIncidentRecordCommand = async (
|
|
1247
|
-
output: __HttpResponse,
|
|
1248
|
-
context: __SerdeContext
|
|
1249
|
-
): Promise<DeleteIncidentRecordCommandOutput> => {
|
|
1250
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1251
|
-
return deserializeAws_restJson1DeleteIncidentRecordCommandError(output, context);
|
|
1252
|
-
}
|
|
1253
|
-
const contents: DeleteIncidentRecordCommandOutput = {
|
|
1254
|
-
$metadata: deserializeMetadata(output),
|
|
1255
|
-
};
|
|
1256
|
-
await collectBody(output.body, context);
|
|
1257
|
-
return Promise.resolve(contents);
|
|
1258
|
-
};
|
|
1259
|
-
|
|
1260
|
-
const deserializeAws_restJson1DeleteIncidentRecordCommandError = async (
|
|
1261
|
-
output: __HttpResponse,
|
|
1262
|
-
context: __SerdeContext
|
|
1263
|
-
): Promise<DeleteIncidentRecordCommandOutput> => {
|
|
1264
|
-
const parsedOutput: any = {
|
|
1265
|
-
...output,
|
|
1266
|
-
body: await parseBody(output.body, context),
|
|
1267
|
-
};
|
|
1268
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1269
|
-
let errorCode = "UnknownError";
|
|
1270
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1271
|
-
switch (errorCode) {
|
|
1272
|
-
case "AccessDeniedException":
|
|
1273
|
-
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
1274
|
-
response = {
|
|
1275
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1276
|
-
name: errorCode,
|
|
1277
|
-
$metadata: deserializeMetadata(output),
|
|
1278
|
-
};
|
|
1279
|
-
break;
|
|
1280
|
-
case "InternalServerException":
|
|
1281
|
-
case "com.amazonaws.ssmincidents#InternalServerException":
|
|
1282
|
-
response = {
|
|
1283
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1284
|
-
name: errorCode,
|
|
1285
|
-
$metadata: deserializeMetadata(output),
|
|
1286
|
-
};
|
|
1287
|
-
break;
|
|
1288
|
-
case "ThrottlingException":
|
|
1289
|
-
case "com.amazonaws.ssmincidents#ThrottlingException":
|
|
1290
|
-
response = {
|
|
1291
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1292
|
-
name: errorCode,
|
|
1293
|
-
$metadata: deserializeMetadata(output),
|
|
1294
|
-
};
|
|
1295
|
-
break;
|
|
1296
|
-
case "ValidationException":
|
|
1297
|
-
case "com.amazonaws.ssmincidents#ValidationException":
|
|
1298
|
-
response = {
|
|
1299
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1300
|
-
name: errorCode,
|
|
1301
|
-
$metadata: deserializeMetadata(output),
|
|
1302
|
-
};
|
|
1303
|
-
break;
|
|
1304
|
-
default:
|
|
1305
|
-
const parsedBody = parsedOutput.body;
|
|
1306
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1307
|
-
response = {
|
|
1308
|
-
...parsedBody,
|
|
1309
|
-
name: `${errorCode}`,
|
|
1310
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1311
|
-
$fault: "client",
|
|
1312
|
-
$metadata: deserializeMetadata(output),
|
|
1313
|
-
} as any;
|
|
1314
|
-
}
|
|
1315
|
-
const message = response.message || response.Message || errorCode;
|
|
1316
|
-
response.message = message;
|
|
1317
|
-
delete response.Message;
|
|
1318
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1319
|
-
};
|
|
1320
|
-
|
|
1321
|
-
export const deserializeAws_restJson1DeleteReplicationSetCommand = async (
|
|
1322
|
-
output: __HttpResponse,
|
|
1323
|
-
context: __SerdeContext
|
|
1324
|
-
): Promise<DeleteReplicationSetCommandOutput> => {
|
|
1325
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1326
|
-
return deserializeAws_restJson1DeleteReplicationSetCommandError(output, context);
|
|
1327
|
-
}
|
|
1328
|
-
const contents: DeleteReplicationSetCommandOutput = {
|
|
1329
|
-
$metadata: deserializeMetadata(output),
|
|
1330
|
-
};
|
|
1331
|
-
await collectBody(output.body, context);
|
|
1332
|
-
return Promise.resolve(contents);
|
|
1333
|
-
};
|
|
1334
|
-
|
|
1335
|
-
const deserializeAws_restJson1DeleteReplicationSetCommandError = async (
|
|
1336
|
-
output: __HttpResponse,
|
|
1337
|
-
context: __SerdeContext
|
|
1338
|
-
): Promise<DeleteReplicationSetCommandOutput> => {
|
|
1339
|
-
const parsedOutput: any = {
|
|
1340
|
-
...output,
|
|
1341
|
-
body: await parseBody(output.body, context),
|
|
1342
|
-
};
|
|
1343
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1344
|
-
let errorCode = "UnknownError";
|
|
1345
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1346
|
-
switch (errorCode) {
|
|
1347
|
-
case "AccessDeniedException":
|
|
1348
|
-
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
1349
|
-
response = {
|
|
1350
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1351
|
-
name: errorCode,
|
|
1352
|
-
$metadata: deserializeMetadata(output),
|
|
1353
|
-
};
|
|
1354
|
-
break;
|
|
1355
|
-
case "InternalServerException":
|
|
1356
|
-
case "com.amazonaws.ssmincidents#InternalServerException":
|
|
1357
|
-
response = {
|
|
1358
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1359
|
-
name: errorCode,
|
|
1360
|
-
$metadata: deserializeMetadata(output),
|
|
1361
|
-
};
|
|
1362
|
-
break;
|
|
1363
|
-
case "ResourceNotFoundException":
|
|
1364
|
-
case "com.amazonaws.ssmincidents#ResourceNotFoundException":
|
|
1365
|
-
response = {
|
|
1366
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1367
|
-
name: errorCode,
|
|
1368
|
-
$metadata: deserializeMetadata(output),
|
|
1369
|
-
};
|
|
1370
|
-
break;
|
|
1371
|
-
case "ThrottlingException":
|
|
1372
|
-
case "com.amazonaws.ssmincidents#ThrottlingException":
|
|
1373
|
-
response = {
|
|
1374
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1375
|
-
name: errorCode,
|
|
1376
|
-
$metadata: deserializeMetadata(output),
|
|
1377
|
-
};
|
|
1378
|
-
break;
|
|
1379
|
-
case "ValidationException":
|
|
1380
|
-
case "com.amazonaws.ssmincidents#ValidationException":
|
|
1381
|
-
response = {
|
|
1382
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1383
|
-
name: errorCode,
|
|
1384
|
-
$metadata: deserializeMetadata(output),
|
|
1385
|
-
};
|
|
1386
|
-
break;
|
|
1387
|
-
default:
|
|
1388
|
-
const parsedBody = parsedOutput.body;
|
|
1389
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1390
|
-
response = {
|
|
1391
|
-
...parsedBody,
|
|
1392
|
-
name: `${errorCode}`,
|
|
1393
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1394
|
-
$fault: "client",
|
|
1395
|
-
$metadata: deserializeMetadata(output),
|
|
1396
|
-
} as any;
|
|
1397
|
-
}
|
|
1398
|
-
const message = response.message || response.Message || errorCode;
|
|
1399
|
-
response.message = message;
|
|
1400
|
-
delete response.Message;
|
|
1401
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1402
|
-
};
|
|
1403
|
-
|
|
1404
|
-
export const deserializeAws_restJson1DeleteResourcePolicyCommand = async (
|
|
1405
|
-
output: __HttpResponse,
|
|
1406
|
-
context: __SerdeContext
|
|
1407
|
-
): Promise<DeleteResourcePolicyCommandOutput> => {
|
|
1408
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1409
|
-
return deserializeAws_restJson1DeleteResourcePolicyCommandError(output, context);
|
|
1410
|
-
}
|
|
1411
|
-
const contents: DeleteResourcePolicyCommandOutput = {
|
|
1412
|
-
$metadata: deserializeMetadata(output),
|
|
1413
|
-
};
|
|
1414
|
-
await collectBody(output.body, context);
|
|
1415
|
-
return Promise.resolve(contents);
|
|
1416
|
-
};
|
|
1417
|
-
|
|
1418
|
-
const deserializeAws_restJson1DeleteResourcePolicyCommandError = async (
|
|
1419
|
-
output: __HttpResponse,
|
|
1420
|
-
context: __SerdeContext
|
|
1421
|
-
): Promise<DeleteResourcePolicyCommandOutput> => {
|
|
1422
|
-
const parsedOutput: any = {
|
|
1423
|
-
...output,
|
|
1424
|
-
body: await parseBody(output.body, context),
|
|
1425
|
-
};
|
|
1426
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1427
|
-
let errorCode = "UnknownError";
|
|
1428
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1429
|
-
switch (errorCode) {
|
|
1430
|
-
case "AccessDeniedException":
|
|
1431
|
-
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
1432
|
-
response = {
|
|
1433
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1434
|
-
name: errorCode,
|
|
1435
|
-
$metadata: deserializeMetadata(output),
|
|
1436
|
-
};
|
|
1437
|
-
break;
|
|
1438
|
-
case "InternalServerException":
|
|
1439
|
-
case "com.amazonaws.ssmincidents#InternalServerException":
|
|
1440
|
-
response = {
|
|
1441
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1442
|
-
name: errorCode,
|
|
1443
|
-
$metadata: deserializeMetadata(output),
|
|
1444
|
-
};
|
|
1445
|
-
break;
|
|
1446
|
-
case "ResourceNotFoundException":
|
|
1447
|
-
case "com.amazonaws.ssmincidents#ResourceNotFoundException":
|
|
1448
|
-
response = {
|
|
1449
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1450
|
-
name: errorCode,
|
|
1451
|
-
$metadata: deserializeMetadata(output),
|
|
1452
|
-
};
|
|
1453
|
-
break;
|
|
1454
|
-
case "ThrottlingException":
|
|
1455
|
-
case "com.amazonaws.ssmincidents#ThrottlingException":
|
|
1456
|
-
response = {
|
|
1457
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1458
|
-
name: errorCode,
|
|
1459
|
-
$metadata: deserializeMetadata(output),
|
|
1460
|
-
};
|
|
1461
|
-
break;
|
|
1462
|
-
case "ValidationException":
|
|
1463
|
-
case "com.amazonaws.ssmincidents#ValidationException":
|
|
1464
|
-
response = {
|
|
1465
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1466
|
-
name: errorCode,
|
|
1467
|
-
$metadata: deserializeMetadata(output),
|
|
1468
|
-
};
|
|
1469
|
-
break;
|
|
1470
|
-
default:
|
|
1471
|
-
const parsedBody = parsedOutput.body;
|
|
1472
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1473
|
-
response = {
|
|
1474
|
-
...parsedBody,
|
|
1475
|
-
name: `${errorCode}`,
|
|
1476
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1477
|
-
$fault: "client",
|
|
1478
|
-
$metadata: deserializeMetadata(output),
|
|
1479
|
-
} as any;
|
|
1480
|
-
}
|
|
1481
|
-
const message = response.message || response.Message || errorCode;
|
|
1482
|
-
response.message = message;
|
|
1483
|
-
delete response.Message;
|
|
1484
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1485
|
-
};
|
|
1486
|
-
|
|
1487
|
-
export const deserializeAws_restJson1DeleteResponsePlanCommand = async (
|
|
1488
|
-
output: __HttpResponse,
|
|
1489
|
-
context: __SerdeContext
|
|
1490
|
-
): Promise<DeleteResponsePlanCommandOutput> => {
|
|
1491
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1492
|
-
return deserializeAws_restJson1DeleteResponsePlanCommandError(output, context);
|
|
1493
|
-
}
|
|
1494
|
-
const contents: DeleteResponsePlanCommandOutput = {
|
|
1495
|
-
$metadata: deserializeMetadata(output),
|
|
1496
|
-
};
|
|
1497
|
-
await collectBody(output.body, context);
|
|
1498
|
-
return Promise.resolve(contents);
|
|
1499
|
-
};
|
|
1500
|
-
|
|
1501
|
-
const deserializeAws_restJson1DeleteResponsePlanCommandError = async (
|
|
1502
|
-
output: __HttpResponse,
|
|
1503
|
-
context: __SerdeContext
|
|
1504
|
-
): Promise<DeleteResponsePlanCommandOutput> => {
|
|
1505
|
-
const parsedOutput: any = {
|
|
1506
|
-
...output,
|
|
1507
|
-
body: await parseBody(output.body, context),
|
|
1508
|
-
};
|
|
1509
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1510
|
-
let errorCode = "UnknownError";
|
|
1511
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1512
|
-
switch (errorCode) {
|
|
1513
|
-
case "AccessDeniedException":
|
|
1514
|
-
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
1515
|
-
response = {
|
|
1516
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1517
|
-
name: errorCode,
|
|
1518
|
-
$metadata: deserializeMetadata(output),
|
|
1519
|
-
};
|
|
1520
|
-
break;
|
|
1521
|
-
case "InternalServerException":
|
|
1522
|
-
case "com.amazonaws.ssmincidents#InternalServerException":
|
|
1523
|
-
response = {
|
|
1524
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1525
|
-
name: errorCode,
|
|
1526
|
-
$metadata: deserializeMetadata(output),
|
|
1527
|
-
};
|
|
1528
|
-
break;
|
|
1529
|
-
case "ThrottlingException":
|
|
1530
|
-
case "com.amazonaws.ssmincidents#ThrottlingException":
|
|
1531
|
-
response = {
|
|
1532
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1533
|
-
name: errorCode,
|
|
1534
|
-
$metadata: deserializeMetadata(output),
|
|
1535
|
-
};
|
|
1536
|
-
break;
|
|
1537
|
-
case "ValidationException":
|
|
1538
|
-
case "com.amazonaws.ssmincidents#ValidationException":
|
|
1539
|
-
response = {
|
|
1540
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1541
|
-
name: errorCode,
|
|
1542
|
-
$metadata: deserializeMetadata(output),
|
|
1543
|
-
};
|
|
1544
|
-
break;
|
|
1545
|
-
default:
|
|
1546
|
-
const parsedBody = parsedOutput.body;
|
|
1547
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1548
|
-
response = {
|
|
1549
|
-
...parsedBody,
|
|
1550
|
-
name: `${errorCode}`,
|
|
1551
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1552
|
-
$fault: "client",
|
|
1553
|
-
$metadata: deserializeMetadata(output),
|
|
1554
|
-
} as any;
|
|
1555
|
-
}
|
|
1556
|
-
const message = response.message || response.Message || errorCode;
|
|
1557
|
-
response.message = message;
|
|
1558
|
-
delete response.Message;
|
|
1559
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1560
|
-
};
|
|
1561
|
-
|
|
1562
|
-
export const deserializeAws_restJson1DeleteTimelineEventCommand = async (
|
|
1563
|
-
output: __HttpResponse,
|
|
1564
|
-
context: __SerdeContext
|
|
1565
|
-
): Promise<DeleteTimelineEventCommandOutput> => {
|
|
1566
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1567
|
-
return deserializeAws_restJson1DeleteTimelineEventCommandError(output, context);
|
|
1568
|
-
}
|
|
1569
|
-
const contents: DeleteTimelineEventCommandOutput = {
|
|
1570
|
-
$metadata: deserializeMetadata(output),
|
|
1571
|
-
};
|
|
1572
|
-
await collectBody(output.body, context);
|
|
1573
|
-
return Promise.resolve(contents);
|
|
1574
|
-
};
|
|
1575
|
-
|
|
1576
|
-
const deserializeAws_restJson1DeleteTimelineEventCommandError = async (
|
|
1577
|
-
output: __HttpResponse,
|
|
1578
|
-
context: __SerdeContext
|
|
1579
|
-
): Promise<DeleteTimelineEventCommandOutput> => {
|
|
1580
|
-
const parsedOutput: any = {
|
|
1581
|
-
...output,
|
|
1582
|
-
body: await parseBody(output.body, context),
|
|
1583
|
-
};
|
|
1584
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1585
|
-
let errorCode = "UnknownError";
|
|
1586
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1587
|
-
switch (errorCode) {
|
|
1588
|
-
case "AccessDeniedException":
|
|
1589
|
-
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
1590
|
-
response = {
|
|
1591
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1592
|
-
name: errorCode,
|
|
1593
|
-
$metadata: deserializeMetadata(output),
|
|
1594
|
-
};
|
|
1595
|
-
break;
|
|
1596
|
-
case "InternalServerException":
|
|
1597
|
-
case "com.amazonaws.ssmincidents#InternalServerException":
|
|
1598
|
-
response = {
|
|
1599
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1600
|
-
name: errorCode,
|
|
1601
|
-
$metadata: deserializeMetadata(output),
|
|
1602
|
-
};
|
|
1603
|
-
break;
|
|
1604
|
-
case "ThrottlingException":
|
|
1605
|
-
case "com.amazonaws.ssmincidents#ThrottlingException":
|
|
1606
|
-
response = {
|
|
1607
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1608
|
-
name: errorCode,
|
|
1609
|
-
$metadata: deserializeMetadata(output),
|
|
1610
|
-
};
|
|
1611
|
-
break;
|
|
1612
|
-
case "ValidationException":
|
|
1613
|
-
case "com.amazonaws.ssmincidents#ValidationException":
|
|
1614
|
-
response = {
|
|
1615
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1616
|
-
name: errorCode,
|
|
1617
|
-
$metadata: deserializeMetadata(output),
|
|
1618
|
-
};
|
|
1619
|
-
break;
|
|
1620
|
-
default:
|
|
1621
|
-
const parsedBody = parsedOutput.body;
|
|
1622
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1623
|
-
response = {
|
|
1624
|
-
...parsedBody,
|
|
1625
|
-
name: `${errorCode}`,
|
|
1626
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1627
|
-
$fault: "client",
|
|
1628
|
-
$metadata: deserializeMetadata(output),
|
|
1629
|
-
} as any;
|
|
1630
|
-
}
|
|
1631
|
-
const message = response.message || response.Message || errorCode;
|
|
1632
|
-
response.message = message;
|
|
1633
|
-
delete response.Message;
|
|
1634
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1635
|
-
};
|
|
1636
|
-
|
|
1637
|
-
export const deserializeAws_restJson1GetIncidentRecordCommand = async (
|
|
1638
|
-
output: __HttpResponse,
|
|
1639
|
-
context: __SerdeContext
|
|
1640
|
-
): Promise<GetIncidentRecordCommandOutput> => {
|
|
1641
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1642
|
-
return deserializeAws_restJson1GetIncidentRecordCommandError(output, context);
|
|
1643
|
-
}
|
|
1644
|
-
const contents: GetIncidentRecordCommandOutput = {
|
|
1645
|
-
$metadata: deserializeMetadata(output),
|
|
1646
|
-
incidentRecord: undefined,
|
|
1647
|
-
};
|
|
1648
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1649
|
-
if (data.incidentRecord !== undefined && data.incidentRecord !== null) {
|
|
1650
|
-
contents.incidentRecord = deserializeAws_restJson1IncidentRecord(data.incidentRecord, context);
|
|
1651
|
-
}
|
|
1652
|
-
return Promise.resolve(contents);
|
|
1653
|
-
};
|
|
1654
|
-
|
|
1655
|
-
const deserializeAws_restJson1GetIncidentRecordCommandError = async (
|
|
1656
|
-
output: __HttpResponse,
|
|
1657
|
-
context: __SerdeContext
|
|
1658
|
-
): Promise<GetIncidentRecordCommandOutput> => {
|
|
1659
|
-
const parsedOutput: any = {
|
|
1660
|
-
...output,
|
|
1661
|
-
body: await parseBody(output.body, context),
|
|
1662
|
-
};
|
|
1663
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1664
|
-
let errorCode = "UnknownError";
|
|
1665
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1666
|
-
switch (errorCode) {
|
|
1667
|
-
case "AccessDeniedException":
|
|
1668
|
-
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
1669
|
-
response = {
|
|
1670
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1671
|
-
name: errorCode,
|
|
1672
|
-
$metadata: deserializeMetadata(output),
|
|
1673
|
-
};
|
|
1674
|
-
break;
|
|
1675
|
-
case "InternalServerException":
|
|
1676
|
-
case "com.amazonaws.ssmincidents#InternalServerException":
|
|
1677
|
-
response = {
|
|
1678
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1679
|
-
name: errorCode,
|
|
1680
|
-
$metadata: deserializeMetadata(output),
|
|
1681
|
-
};
|
|
1682
|
-
break;
|
|
1683
|
-
case "ResourceNotFoundException":
|
|
1684
|
-
case "com.amazonaws.ssmincidents#ResourceNotFoundException":
|
|
1685
|
-
response = {
|
|
1686
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1687
|
-
name: errorCode,
|
|
1688
|
-
$metadata: deserializeMetadata(output),
|
|
1689
|
-
};
|
|
1690
|
-
break;
|
|
1691
|
-
case "ThrottlingException":
|
|
1692
|
-
case "com.amazonaws.ssmincidents#ThrottlingException":
|
|
1693
|
-
response = {
|
|
1694
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1695
|
-
name: errorCode,
|
|
1696
|
-
$metadata: deserializeMetadata(output),
|
|
1697
|
-
};
|
|
1698
|
-
break;
|
|
1699
|
-
case "ValidationException":
|
|
1700
|
-
case "com.amazonaws.ssmincidents#ValidationException":
|
|
1701
|
-
response = {
|
|
1702
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1703
|
-
name: errorCode,
|
|
1704
|
-
$metadata: deserializeMetadata(output),
|
|
1705
|
-
};
|
|
1706
|
-
break;
|
|
1707
|
-
default:
|
|
1708
|
-
const parsedBody = parsedOutput.body;
|
|
1709
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1710
|
-
response = {
|
|
1711
|
-
...parsedBody,
|
|
1712
|
-
name: `${errorCode}`,
|
|
1713
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1714
|
-
$fault: "client",
|
|
1715
|
-
$metadata: deserializeMetadata(output),
|
|
1716
|
-
} as any;
|
|
1717
|
-
}
|
|
1718
|
-
const message = response.message || response.Message || errorCode;
|
|
1719
|
-
response.message = message;
|
|
1720
|
-
delete response.Message;
|
|
1721
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1722
|
-
};
|
|
1723
|
-
|
|
1724
|
-
export const deserializeAws_restJson1GetReplicationSetCommand = async (
|
|
1725
|
-
output: __HttpResponse,
|
|
1726
|
-
context: __SerdeContext
|
|
1727
|
-
): Promise<GetReplicationSetCommandOutput> => {
|
|
1728
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1729
|
-
return deserializeAws_restJson1GetReplicationSetCommandError(output, context);
|
|
1730
|
-
}
|
|
1731
|
-
const contents: GetReplicationSetCommandOutput = {
|
|
1732
|
-
$metadata: deserializeMetadata(output),
|
|
1733
|
-
replicationSet: undefined,
|
|
1734
|
-
};
|
|
1735
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1736
|
-
if (data.replicationSet !== undefined && data.replicationSet !== null) {
|
|
1737
|
-
contents.replicationSet = deserializeAws_restJson1ReplicationSet(data.replicationSet, context);
|
|
1738
|
-
}
|
|
1739
|
-
return Promise.resolve(contents);
|
|
1740
|
-
};
|
|
1741
|
-
|
|
1742
|
-
const deserializeAws_restJson1GetReplicationSetCommandError = async (
|
|
1743
|
-
output: __HttpResponse,
|
|
1744
|
-
context: __SerdeContext
|
|
1745
|
-
): Promise<GetReplicationSetCommandOutput> => {
|
|
1746
|
-
const parsedOutput: any = {
|
|
1747
|
-
...output,
|
|
1748
|
-
body: await parseBody(output.body, context),
|
|
1749
|
-
};
|
|
1750
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1751
|
-
let errorCode = "UnknownError";
|
|
1752
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1753
|
-
switch (errorCode) {
|
|
1754
|
-
case "AccessDeniedException":
|
|
1755
|
-
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
1756
|
-
response = {
|
|
1757
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1758
|
-
name: errorCode,
|
|
1759
|
-
$metadata: deserializeMetadata(output),
|
|
1760
|
-
};
|
|
1761
|
-
break;
|
|
1762
|
-
case "InternalServerException":
|
|
1763
|
-
case "com.amazonaws.ssmincidents#InternalServerException":
|
|
1764
|
-
response = {
|
|
1765
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1766
|
-
name: errorCode,
|
|
1767
|
-
$metadata: deserializeMetadata(output),
|
|
1768
|
-
};
|
|
1769
|
-
break;
|
|
1770
|
-
case "ResourceNotFoundException":
|
|
1771
|
-
case "com.amazonaws.ssmincidents#ResourceNotFoundException":
|
|
1772
|
-
response = {
|
|
1773
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1774
|
-
name: errorCode,
|
|
1775
|
-
$metadata: deserializeMetadata(output),
|
|
1776
|
-
};
|
|
1777
|
-
break;
|
|
1778
|
-
case "ThrottlingException":
|
|
1779
|
-
case "com.amazonaws.ssmincidents#ThrottlingException":
|
|
1780
|
-
response = {
|
|
1781
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1782
|
-
name: errorCode,
|
|
1783
|
-
$metadata: deserializeMetadata(output),
|
|
1784
|
-
};
|
|
1785
|
-
break;
|
|
1786
|
-
case "ValidationException":
|
|
1787
|
-
case "com.amazonaws.ssmincidents#ValidationException":
|
|
1788
|
-
response = {
|
|
1789
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1790
|
-
name: errorCode,
|
|
1791
|
-
$metadata: deserializeMetadata(output),
|
|
1792
|
-
};
|
|
1793
|
-
break;
|
|
1794
|
-
default:
|
|
1795
|
-
const parsedBody = parsedOutput.body;
|
|
1796
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1797
|
-
response = {
|
|
1798
|
-
...parsedBody,
|
|
1799
|
-
name: `${errorCode}`,
|
|
1800
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1801
|
-
$fault: "client",
|
|
1802
|
-
$metadata: deserializeMetadata(output),
|
|
1803
|
-
} as any;
|
|
1804
|
-
}
|
|
1805
|
-
const message = response.message || response.Message || errorCode;
|
|
1806
|
-
response.message = message;
|
|
1807
|
-
delete response.Message;
|
|
1808
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1809
|
-
};
|
|
1810
|
-
|
|
1811
|
-
export const deserializeAws_restJson1GetResourcePoliciesCommand = async (
|
|
1812
|
-
output: __HttpResponse,
|
|
1813
|
-
context: __SerdeContext
|
|
1814
|
-
): Promise<GetResourcePoliciesCommandOutput> => {
|
|
1815
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1816
|
-
return deserializeAws_restJson1GetResourcePoliciesCommandError(output, context);
|
|
1817
|
-
}
|
|
1818
|
-
const contents: GetResourcePoliciesCommandOutput = {
|
|
1819
|
-
$metadata: deserializeMetadata(output),
|
|
1820
|
-
nextToken: undefined,
|
|
1821
|
-
resourcePolicies: undefined,
|
|
1822
|
-
};
|
|
1823
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1824
|
-
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
1825
|
-
contents.nextToken = __expectString(data.nextToken);
|
|
1826
|
-
}
|
|
1827
|
-
if (data.resourcePolicies !== undefined && data.resourcePolicies !== null) {
|
|
1828
|
-
contents.resourcePolicies = deserializeAws_restJson1ResourcePolicyList(data.resourcePolicies, context);
|
|
1829
|
-
}
|
|
1830
|
-
return Promise.resolve(contents);
|
|
1831
|
-
};
|
|
1832
|
-
|
|
1833
|
-
const deserializeAws_restJson1GetResourcePoliciesCommandError = async (
|
|
1834
|
-
output: __HttpResponse,
|
|
1835
|
-
context: __SerdeContext
|
|
1836
|
-
): Promise<GetResourcePoliciesCommandOutput> => {
|
|
1837
|
-
const parsedOutput: any = {
|
|
1838
|
-
...output,
|
|
1839
|
-
body: await parseBody(output.body, context),
|
|
1840
|
-
};
|
|
1841
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1842
|
-
let errorCode = "UnknownError";
|
|
1843
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1844
|
-
switch (errorCode) {
|
|
1845
|
-
case "AccessDeniedException":
|
|
1846
|
-
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
1847
|
-
response = {
|
|
1848
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1849
|
-
name: errorCode,
|
|
1850
|
-
$metadata: deserializeMetadata(output),
|
|
1851
|
-
};
|
|
1852
|
-
break;
|
|
1853
|
-
case "InternalServerException":
|
|
1854
|
-
case "com.amazonaws.ssmincidents#InternalServerException":
|
|
1855
|
-
response = {
|
|
1856
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1857
|
-
name: errorCode,
|
|
1858
|
-
$metadata: deserializeMetadata(output),
|
|
1859
|
-
};
|
|
1860
|
-
break;
|
|
1861
|
-
case "ResourceNotFoundException":
|
|
1862
|
-
case "com.amazonaws.ssmincidents#ResourceNotFoundException":
|
|
1863
|
-
response = {
|
|
1864
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1865
|
-
name: errorCode,
|
|
1866
|
-
$metadata: deserializeMetadata(output),
|
|
1867
|
-
};
|
|
1868
|
-
break;
|
|
1869
|
-
case "ThrottlingException":
|
|
1870
|
-
case "com.amazonaws.ssmincidents#ThrottlingException":
|
|
1871
|
-
response = {
|
|
1872
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1873
|
-
name: errorCode,
|
|
1874
|
-
$metadata: deserializeMetadata(output),
|
|
1875
|
-
};
|
|
1876
|
-
break;
|
|
1877
|
-
case "ValidationException":
|
|
1878
|
-
case "com.amazonaws.ssmincidents#ValidationException":
|
|
1879
|
-
response = {
|
|
1880
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1881
|
-
name: errorCode,
|
|
1882
|
-
$metadata: deserializeMetadata(output),
|
|
1883
|
-
};
|
|
1884
|
-
break;
|
|
1885
|
-
default:
|
|
1886
|
-
const parsedBody = parsedOutput.body;
|
|
1887
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1888
|
-
response = {
|
|
1889
|
-
...parsedBody,
|
|
1890
|
-
name: `${errorCode}`,
|
|
1891
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1892
|
-
$fault: "client",
|
|
1893
|
-
$metadata: deserializeMetadata(output),
|
|
1894
|
-
} as any;
|
|
1895
|
-
}
|
|
1896
|
-
const message = response.message || response.Message || errorCode;
|
|
1897
|
-
response.message = message;
|
|
1898
|
-
delete response.Message;
|
|
1899
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1900
|
-
};
|
|
1901
|
-
|
|
1902
|
-
export const deserializeAws_restJson1GetResponsePlanCommand = async (
|
|
1903
|
-
output: __HttpResponse,
|
|
1904
|
-
context: __SerdeContext
|
|
1905
|
-
): Promise<GetResponsePlanCommandOutput> => {
|
|
1906
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1907
|
-
return deserializeAws_restJson1GetResponsePlanCommandError(output, context);
|
|
1908
|
-
}
|
|
1909
|
-
const contents: GetResponsePlanCommandOutput = {
|
|
1910
|
-
$metadata: deserializeMetadata(output),
|
|
1911
|
-
actions: undefined,
|
|
1912
|
-
arn: undefined,
|
|
1913
|
-
chatChannel: undefined,
|
|
1914
|
-
displayName: undefined,
|
|
1915
|
-
engagements: undefined,
|
|
1916
|
-
incidentTemplate: undefined,
|
|
1917
|
-
name: undefined,
|
|
1918
|
-
};
|
|
1919
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1920
|
-
if (data.actions !== undefined && data.actions !== null) {
|
|
1921
|
-
contents.actions = deserializeAws_restJson1ActionsList(data.actions, context);
|
|
1922
|
-
}
|
|
1923
|
-
if (data.arn !== undefined && data.arn !== null) {
|
|
1924
|
-
contents.arn = __expectString(data.arn);
|
|
1925
|
-
}
|
|
1926
|
-
if (data.chatChannel !== undefined && data.chatChannel !== null) {
|
|
1927
|
-
contents.chatChannel = deserializeAws_restJson1ChatChannel(__expectUnion(data.chatChannel), context);
|
|
1928
|
-
}
|
|
1929
|
-
if (data.displayName !== undefined && data.displayName !== null) {
|
|
1930
|
-
contents.displayName = __expectString(data.displayName);
|
|
1931
|
-
}
|
|
1932
|
-
if (data.engagements !== undefined && data.engagements !== null) {
|
|
1933
|
-
contents.engagements = deserializeAws_restJson1EngagementSet(data.engagements, context);
|
|
1934
|
-
}
|
|
1935
|
-
if (data.incidentTemplate !== undefined && data.incidentTemplate !== null) {
|
|
1936
|
-
contents.incidentTemplate = deserializeAws_restJson1IncidentTemplate(data.incidentTemplate, context);
|
|
1937
|
-
}
|
|
1938
|
-
if (data.name !== undefined && data.name !== null) {
|
|
1939
|
-
contents.name = __expectString(data.name);
|
|
1940
|
-
}
|
|
1941
|
-
return Promise.resolve(contents);
|
|
1942
|
-
};
|
|
1943
|
-
|
|
1944
|
-
const deserializeAws_restJson1GetResponsePlanCommandError = async (
|
|
1945
|
-
output: __HttpResponse,
|
|
1946
|
-
context: __SerdeContext
|
|
1947
|
-
): Promise<GetResponsePlanCommandOutput> => {
|
|
1948
|
-
const parsedOutput: any = {
|
|
1949
|
-
...output,
|
|
1950
|
-
body: await parseBody(output.body, context),
|
|
1951
|
-
};
|
|
1952
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1953
|
-
let errorCode = "UnknownError";
|
|
1954
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1955
|
-
switch (errorCode) {
|
|
1956
|
-
case "AccessDeniedException":
|
|
1957
|
-
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
1958
|
-
response = {
|
|
1959
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1960
|
-
name: errorCode,
|
|
1961
|
-
$metadata: deserializeMetadata(output),
|
|
1962
|
-
};
|
|
1963
|
-
break;
|
|
1964
|
-
case "InternalServerException":
|
|
1965
|
-
case "com.amazonaws.ssmincidents#InternalServerException":
|
|
1966
|
-
response = {
|
|
1967
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1968
|
-
name: errorCode,
|
|
1969
|
-
$metadata: deserializeMetadata(output),
|
|
1970
|
-
};
|
|
1971
|
-
break;
|
|
1972
|
-
case "ResourceNotFoundException":
|
|
1973
|
-
case "com.amazonaws.ssmincidents#ResourceNotFoundException":
|
|
1974
|
-
response = {
|
|
1975
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1976
|
-
name: errorCode,
|
|
1977
|
-
$metadata: deserializeMetadata(output),
|
|
1978
|
-
};
|
|
1979
|
-
break;
|
|
1980
|
-
case "ThrottlingException":
|
|
1981
|
-
case "com.amazonaws.ssmincidents#ThrottlingException":
|
|
1982
|
-
response = {
|
|
1983
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1984
|
-
name: errorCode,
|
|
1985
|
-
$metadata: deserializeMetadata(output),
|
|
1986
|
-
};
|
|
1987
|
-
break;
|
|
1988
|
-
case "ValidationException":
|
|
1989
|
-
case "com.amazonaws.ssmincidents#ValidationException":
|
|
1990
|
-
response = {
|
|
1991
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1992
|
-
name: errorCode,
|
|
1993
|
-
$metadata: deserializeMetadata(output),
|
|
1994
|
-
};
|
|
1995
|
-
break;
|
|
1996
|
-
default:
|
|
1997
|
-
const parsedBody = parsedOutput.body;
|
|
1998
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1999
|
-
response = {
|
|
2000
|
-
...parsedBody,
|
|
2001
|
-
name: `${errorCode}`,
|
|
2002
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2003
|
-
$fault: "client",
|
|
2004
|
-
$metadata: deserializeMetadata(output),
|
|
2005
|
-
} as any;
|
|
2006
|
-
}
|
|
2007
|
-
const message = response.message || response.Message || errorCode;
|
|
2008
|
-
response.message = message;
|
|
2009
|
-
delete response.Message;
|
|
2010
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2011
|
-
};
|
|
2012
|
-
|
|
2013
|
-
export const deserializeAws_restJson1GetTimelineEventCommand = async (
|
|
2014
|
-
output: __HttpResponse,
|
|
2015
|
-
context: __SerdeContext
|
|
2016
|
-
): Promise<GetTimelineEventCommandOutput> => {
|
|
2017
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2018
|
-
return deserializeAws_restJson1GetTimelineEventCommandError(output, context);
|
|
2019
|
-
}
|
|
2020
|
-
const contents: GetTimelineEventCommandOutput = {
|
|
2021
|
-
$metadata: deserializeMetadata(output),
|
|
2022
|
-
event: undefined,
|
|
2023
|
-
};
|
|
2024
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2025
|
-
if (data.event !== undefined && data.event !== null) {
|
|
2026
|
-
contents.event = deserializeAws_restJson1TimelineEvent(data.event, context);
|
|
2027
|
-
}
|
|
2028
|
-
return Promise.resolve(contents);
|
|
2029
|
-
};
|
|
2030
|
-
|
|
2031
|
-
const deserializeAws_restJson1GetTimelineEventCommandError = async (
|
|
2032
|
-
output: __HttpResponse,
|
|
2033
|
-
context: __SerdeContext
|
|
2034
|
-
): Promise<GetTimelineEventCommandOutput> => {
|
|
2035
|
-
const parsedOutput: any = {
|
|
2036
|
-
...output,
|
|
2037
|
-
body: await parseBody(output.body, context),
|
|
2038
|
-
};
|
|
2039
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2040
|
-
let errorCode = "UnknownError";
|
|
2041
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2042
|
-
switch (errorCode) {
|
|
2043
|
-
case "AccessDeniedException":
|
|
2044
|
-
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
2045
|
-
response = {
|
|
2046
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2047
|
-
name: errorCode,
|
|
2048
|
-
$metadata: deserializeMetadata(output),
|
|
2049
|
-
};
|
|
2050
|
-
break;
|
|
2051
|
-
case "InternalServerException":
|
|
2052
|
-
case "com.amazonaws.ssmincidents#InternalServerException":
|
|
2053
|
-
response = {
|
|
2054
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2055
|
-
name: errorCode,
|
|
2056
|
-
$metadata: deserializeMetadata(output),
|
|
2057
|
-
};
|
|
2058
|
-
break;
|
|
2059
|
-
case "ResourceNotFoundException":
|
|
2060
|
-
case "com.amazonaws.ssmincidents#ResourceNotFoundException":
|
|
2061
|
-
response = {
|
|
2062
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2063
|
-
name: errorCode,
|
|
2064
|
-
$metadata: deserializeMetadata(output),
|
|
2065
|
-
};
|
|
2066
|
-
break;
|
|
2067
|
-
case "ThrottlingException":
|
|
2068
|
-
case "com.amazonaws.ssmincidents#ThrottlingException":
|
|
2069
|
-
response = {
|
|
2070
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2071
|
-
name: errorCode,
|
|
2072
|
-
$metadata: deserializeMetadata(output),
|
|
2073
|
-
};
|
|
2074
|
-
break;
|
|
2075
|
-
case "ValidationException":
|
|
2076
|
-
case "com.amazonaws.ssmincidents#ValidationException":
|
|
2077
|
-
response = {
|
|
2078
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2079
|
-
name: errorCode,
|
|
2080
|
-
$metadata: deserializeMetadata(output),
|
|
2081
|
-
};
|
|
2082
|
-
break;
|
|
2083
|
-
default:
|
|
2084
|
-
const parsedBody = parsedOutput.body;
|
|
2085
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2086
|
-
response = {
|
|
2087
|
-
...parsedBody,
|
|
2088
|
-
name: `${errorCode}`,
|
|
2089
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2090
|
-
$fault: "client",
|
|
2091
|
-
$metadata: deserializeMetadata(output),
|
|
2092
|
-
} as any;
|
|
2093
|
-
}
|
|
2094
|
-
const message = response.message || response.Message || errorCode;
|
|
2095
|
-
response.message = message;
|
|
2096
|
-
delete response.Message;
|
|
2097
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2098
|
-
};
|
|
2099
|
-
|
|
2100
|
-
export const deserializeAws_restJson1ListIncidentRecordsCommand = async (
|
|
2101
|
-
output: __HttpResponse,
|
|
2102
|
-
context: __SerdeContext
|
|
2103
|
-
): Promise<ListIncidentRecordsCommandOutput> => {
|
|
2104
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2105
|
-
return deserializeAws_restJson1ListIncidentRecordsCommandError(output, context);
|
|
2106
|
-
}
|
|
2107
|
-
const contents: ListIncidentRecordsCommandOutput = {
|
|
2108
|
-
$metadata: deserializeMetadata(output),
|
|
2109
|
-
incidentRecordSummaries: undefined,
|
|
2110
|
-
nextToken: undefined,
|
|
2111
|
-
};
|
|
2112
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2113
|
-
if (data.incidentRecordSummaries !== undefined && data.incidentRecordSummaries !== null) {
|
|
2114
|
-
contents.incidentRecordSummaries = deserializeAws_restJson1IncidentRecordSummaryList(
|
|
2115
|
-
data.incidentRecordSummaries,
|
|
2116
|
-
context
|
|
2117
|
-
);
|
|
2118
|
-
}
|
|
2119
|
-
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
2120
|
-
contents.nextToken = __expectString(data.nextToken);
|
|
2121
|
-
}
|
|
2122
|
-
return Promise.resolve(contents);
|
|
2123
|
-
};
|
|
2124
|
-
|
|
2125
|
-
const deserializeAws_restJson1ListIncidentRecordsCommandError = async (
|
|
2126
|
-
output: __HttpResponse,
|
|
2127
|
-
context: __SerdeContext
|
|
2128
|
-
): Promise<ListIncidentRecordsCommandOutput> => {
|
|
2129
|
-
const parsedOutput: any = {
|
|
2130
|
-
...output,
|
|
2131
|
-
body: await parseBody(output.body, context),
|
|
2132
|
-
};
|
|
2133
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2134
|
-
let errorCode = "UnknownError";
|
|
2135
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2136
|
-
switch (errorCode) {
|
|
2137
|
-
case "AccessDeniedException":
|
|
2138
|
-
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
2139
|
-
response = {
|
|
2140
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2141
|
-
name: errorCode,
|
|
2142
|
-
$metadata: deserializeMetadata(output),
|
|
2143
|
-
};
|
|
2144
|
-
break;
|
|
2145
|
-
case "InternalServerException":
|
|
2146
|
-
case "com.amazonaws.ssmincidents#InternalServerException":
|
|
2147
|
-
response = {
|
|
2148
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2149
|
-
name: errorCode,
|
|
2150
|
-
$metadata: deserializeMetadata(output),
|
|
2151
|
-
};
|
|
2152
|
-
break;
|
|
2153
|
-
case "ThrottlingException":
|
|
2154
|
-
case "com.amazonaws.ssmincidents#ThrottlingException":
|
|
2155
|
-
response = {
|
|
2156
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2157
|
-
name: errorCode,
|
|
2158
|
-
$metadata: deserializeMetadata(output),
|
|
2159
|
-
};
|
|
2160
|
-
break;
|
|
2161
|
-
case "ValidationException":
|
|
2162
|
-
case "com.amazonaws.ssmincidents#ValidationException":
|
|
2163
|
-
response = {
|
|
2164
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2165
|
-
name: errorCode,
|
|
2166
|
-
$metadata: deserializeMetadata(output),
|
|
2167
|
-
};
|
|
2168
|
-
break;
|
|
2169
|
-
default:
|
|
2170
|
-
const parsedBody = parsedOutput.body;
|
|
2171
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2172
|
-
response = {
|
|
2173
|
-
...parsedBody,
|
|
2174
|
-
name: `${errorCode}`,
|
|
2175
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2176
|
-
$fault: "client",
|
|
2177
|
-
$metadata: deserializeMetadata(output),
|
|
2178
|
-
} as any;
|
|
2179
|
-
}
|
|
2180
|
-
const message = response.message || response.Message || errorCode;
|
|
2181
|
-
response.message = message;
|
|
2182
|
-
delete response.Message;
|
|
2183
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2184
|
-
};
|
|
2185
|
-
|
|
2186
|
-
export const deserializeAws_restJson1ListRelatedItemsCommand = async (
|
|
2187
|
-
output: __HttpResponse,
|
|
2188
|
-
context: __SerdeContext
|
|
2189
|
-
): Promise<ListRelatedItemsCommandOutput> => {
|
|
2190
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2191
|
-
return deserializeAws_restJson1ListRelatedItemsCommandError(output, context);
|
|
2192
|
-
}
|
|
2193
|
-
const contents: ListRelatedItemsCommandOutput = {
|
|
2194
|
-
$metadata: deserializeMetadata(output),
|
|
2195
|
-
nextToken: undefined,
|
|
2196
|
-
relatedItems: undefined,
|
|
2197
|
-
};
|
|
2198
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2199
|
-
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
2200
|
-
contents.nextToken = __expectString(data.nextToken);
|
|
2201
|
-
}
|
|
2202
|
-
if (data.relatedItems !== undefined && data.relatedItems !== null) {
|
|
2203
|
-
contents.relatedItems = deserializeAws_restJson1RelatedItemList(data.relatedItems, context);
|
|
2204
|
-
}
|
|
2205
|
-
return Promise.resolve(contents);
|
|
2206
|
-
};
|
|
2207
|
-
|
|
2208
|
-
const deserializeAws_restJson1ListRelatedItemsCommandError = async (
|
|
2209
|
-
output: __HttpResponse,
|
|
2210
|
-
context: __SerdeContext
|
|
2211
|
-
): Promise<ListRelatedItemsCommandOutput> => {
|
|
2212
|
-
const parsedOutput: any = {
|
|
2213
|
-
...output,
|
|
2214
|
-
body: await parseBody(output.body, context),
|
|
2215
|
-
};
|
|
2216
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2217
|
-
let errorCode = "UnknownError";
|
|
2218
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2219
|
-
switch (errorCode) {
|
|
2220
|
-
case "AccessDeniedException":
|
|
2221
|
-
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
2222
|
-
response = {
|
|
2223
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2224
|
-
name: errorCode,
|
|
2225
|
-
$metadata: deserializeMetadata(output),
|
|
2226
|
-
};
|
|
2227
|
-
break;
|
|
2228
|
-
case "InternalServerException":
|
|
2229
|
-
case "com.amazonaws.ssmincidents#InternalServerException":
|
|
2230
|
-
response = {
|
|
2231
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2232
|
-
name: errorCode,
|
|
2233
|
-
$metadata: deserializeMetadata(output),
|
|
2234
|
-
};
|
|
2235
|
-
break;
|
|
2236
|
-
case "ThrottlingException":
|
|
2237
|
-
case "com.amazonaws.ssmincidents#ThrottlingException":
|
|
2238
|
-
response = {
|
|
2239
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2240
|
-
name: errorCode,
|
|
2241
|
-
$metadata: deserializeMetadata(output),
|
|
2242
|
-
};
|
|
2243
|
-
break;
|
|
2244
|
-
case "ValidationException":
|
|
2245
|
-
case "com.amazonaws.ssmincidents#ValidationException":
|
|
2246
|
-
response = {
|
|
2247
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2248
|
-
name: errorCode,
|
|
2249
|
-
$metadata: deserializeMetadata(output),
|
|
2250
|
-
};
|
|
2251
|
-
break;
|
|
2252
|
-
default:
|
|
2253
|
-
const parsedBody = parsedOutput.body;
|
|
2254
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2255
|
-
response = {
|
|
2256
|
-
...parsedBody,
|
|
2257
|
-
name: `${errorCode}`,
|
|
2258
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2259
|
-
$fault: "client",
|
|
2260
|
-
$metadata: deserializeMetadata(output),
|
|
2261
|
-
} as any;
|
|
2262
|
-
}
|
|
2263
|
-
const message = response.message || response.Message || errorCode;
|
|
2264
|
-
response.message = message;
|
|
2265
|
-
delete response.Message;
|
|
2266
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2267
|
-
};
|
|
2268
|
-
|
|
2269
|
-
export const deserializeAws_restJson1ListReplicationSetsCommand = async (
|
|
2270
|
-
output: __HttpResponse,
|
|
2271
|
-
context: __SerdeContext
|
|
2272
|
-
): Promise<ListReplicationSetsCommandOutput> => {
|
|
2273
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2274
|
-
return deserializeAws_restJson1ListReplicationSetsCommandError(output, context);
|
|
2275
|
-
}
|
|
2276
|
-
const contents: ListReplicationSetsCommandOutput = {
|
|
2277
|
-
$metadata: deserializeMetadata(output),
|
|
2278
|
-
nextToken: undefined,
|
|
2279
|
-
replicationSetArns: undefined,
|
|
2280
|
-
};
|
|
2281
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2282
|
-
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
2283
|
-
contents.nextToken = __expectString(data.nextToken);
|
|
2284
|
-
}
|
|
2285
|
-
if (data.replicationSetArns !== undefined && data.replicationSetArns !== null) {
|
|
2286
|
-
contents.replicationSetArns = deserializeAws_restJson1ReplicationSetArnList(data.replicationSetArns, context);
|
|
2287
|
-
}
|
|
2288
|
-
return Promise.resolve(contents);
|
|
2289
|
-
};
|
|
2290
|
-
|
|
2291
|
-
const deserializeAws_restJson1ListReplicationSetsCommandError = async (
|
|
2292
|
-
output: __HttpResponse,
|
|
2293
|
-
context: __SerdeContext
|
|
2294
|
-
): Promise<ListReplicationSetsCommandOutput> => {
|
|
2295
|
-
const parsedOutput: any = {
|
|
2296
|
-
...output,
|
|
2297
|
-
body: await parseBody(output.body, context),
|
|
2298
|
-
};
|
|
2299
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2300
|
-
let errorCode = "UnknownError";
|
|
2301
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2302
|
-
switch (errorCode) {
|
|
2303
|
-
case "AccessDeniedException":
|
|
2304
|
-
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
2305
|
-
response = {
|
|
2306
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2307
|
-
name: errorCode,
|
|
2308
|
-
$metadata: deserializeMetadata(output),
|
|
2309
|
-
};
|
|
2310
|
-
break;
|
|
2311
|
-
case "InternalServerException":
|
|
2312
|
-
case "com.amazonaws.ssmincidents#InternalServerException":
|
|
2313
|
-
response = {
|
|
2314
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2315
|
-
name: errorCode,
|
|
2316
|
-
$metadata: deserializeMetadata(output),
|
|
2317
|
-
};
|
|
2318
|
-
break;
|
|
2319
|
-
case "ThrottlingException":
|
|
2320
|
-
case "com.amazonaws.ssmincidents#ThrottlingException":
|
|
2321
|
-
response = {
|
|
2322
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2323
|
-
name: errorCode,
|
|
2324
|
-
$metadata: deserializeMetadata(output),
|
|
2325
|
-
};
|
|
2326
|
-
break;
|
|
2327
|
-
case "ValidationException":
|
|
2328
|
-
case "com.amazonaws.ssmincidents#ValidationException":
|
|
2329
|
-
response = {
|
|
2330
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2331
|
-
name: errorCode,
|
|
2332
|
-
$metadata: deserializeMetadata(output),
|
|
2333
|
-
};
|
|
2334
|
-
break;
|
|
2335
|
-
default:
|
|
2336
|
-
const parsedBody = parsedOutput.body;
|
|
2337
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2338
|
-
response = {
|
|
2339
|
-
...parsedBody,
|
|
2340
|
-
name: `${errorCode}`,
|
|
2341
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2342
|
-
$fault: "client",
|
|
2343
|
-
$metadata: deserializeMetadata(output),
|
|
2344
|
-
} as any;
|
|
2345
|
-
}
|
|
2346
|
-
const message = response.message || response.Message || errorCode;
|
|
2347
|
-
response.message = message;
|
|
2348
|
-
delete response.Message;
|
|
2349
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2350
|
-
};
|
|
2351
|
-
|
|
2352
|
-
export const deserializeAws_restJson1ListResponsePlansCommand = async (
|
|
2353
|
-
output: __HttpResponse,
|
|
2354
|
-
context: __SerdeContext
|
|
2355
|
-
): Promise<ListResponsePlansCommandOutput> => {
|
|
2356
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2357
|
-
return deserializeAws_restJson1ListResponsePlansCommandError(output, context);
|
|
2358
|
-
}
|
|
2359
|
-
const contents: ListResponsePlansCommandOutput = {
|
|
2360
|
-
$metadata: deserializeMetadata(output),
|
|
2361
|
-
nextToken: undefined,
|
|
2362
|
-
responsePlanSummaries: undefined,
|
|
2363
|
-
};
|
|
2364
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2365
|
-
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
2366
|
-
contents.nextToken = __expectString(data.nextToken);
|
|
2367
|
-
}
|
|
2368
|
-
if (data.responsePlanSummaries !== undefined && data.responsePlanSummaries !== null) {
|
|
2369
|
-
contents.responsePlanSummaries = deserializeAws_restJson1ResponsePlanSummaryList(
|
|
2370
|
-
data.responsePlanSummaries,
|
|
2371
|
-
context
|
|
2372
|
-
);
|
|
2373
|
-
}
|
|
2374
|
-
return Promise.resolve(contents);
|
|
2375
|
-
};
|
|
2376
|
-
|
|
2377
|
-
const deserializeAws_restJson1ListResponsePlansCommandError = async (
|
|
2378
|
-
output: __HttpResponse,
|
|
2379
|
-
context: __SerdeContext
|
|
2380
|
-
): Promise<ListResponsePlansCommandOutput> => {
|
|
2381
|
-
const parsedOutput: any = {
|
|
2382
|
-
...output,
|
|
2383
|
-
body: await parseBody(output.body, context),
|
|
2384
|
-
};
|
|
2385
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2386
|
-
let errorCode = "UnknownError";
|
|
2387
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2388
|
-
switch (errorCode) {
|
|
2389
|
-
case "AccessDeniedException":
|
|
2390
|
-
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
2391
|
-
response = {
|
|
2392
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2393
|
-
name: errorCode,
|
|
2394
|
-
$metadata: deserializeMetadata(output),
|
|
2395
|
-
};
|
|
2396
|
-
break;
|
|
2397
|
-
case "InternalServerException":
|
|
2398
|
-
case "com.amazonaws.ssmincidents#InternalServerException":
|
|
2399
|
-
response = {
|
|
2400
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2401
|
-
name: errorCode,
|
|
2402
|
-
$metadata: deserializeMetadata(output),
|
|
2403
|
-
};
|
|
2404
|
-
break;
|
|
2405
|
-
case "ThrottlingException":
|
|
2406
|
-
case "com.amazonaws.ssmincidents#ThrottlingException":
|
|
2407
|
-
response = {
|
|
2408
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2409
|
-
name: errorCode,
|
|
2410
|
-
$metadata: deserializeMetadata(output),
|
|
2411
|
-
};
|
|
2412
|
-
break;
|
|
2413
|
-
case "ValidationException":
|
|
2414
|
-
case "com.amazonaws.ssmincidents#ValidationException":
|
|
2415
|
-
response = {
|
|
2416
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2417
|
-
name: errorCode,
|
|
2418
|
-
$metadata: deserializeMetadata(output),
|
|
2419
|
-
};
|
|
2420
|
-
break;
|
|
2421
|
-
default:
|
|
2422
|
-
const parsedBody = parsedOutput.body;
|
|
2423
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2424
|
-
response = {
|
|
2425
|
-
...parsedBody,
|
|
2426
|
-
name: `${errorCode}`,
|
|
2427
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2428
|
-
$fault: "client",
|
|
2429
|
-
$metadata: deserializeMetadata(output),
|
|
2430
|
-
} as any;
|
|
2431
|
-
}
|
|
2432
|
-
const message = response.message || response.Message || errorCode;
|
|
2433
|
-
response.message = message;
|
|
2434
|
-
delete response.Message;
|
|
2435
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2436
|
-
};
|
|
2437
|
-
|
|
2438
|
-
export const deserializeAws_restJson1ListTagsForResourceCommand = async (
|
|
2439
|
-
output: __HttpResponse,
|
|
2440
|
-
context: __SerdeContext
|
|
2441
|
-
): Promise<ListTagsForResourceCommandOutput> => {
|
|
2442
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2443
|
-
return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
|
|
2444
|
-
}
|
|
2445
|
-
const contents: ListTagsForResourceCommandOutput = {
|
|
2446
|
-
$metadata: deserializeMetadata(output),
|
|
2447
|
-
tags: undefined,
|
|
2448
|
-
};
|
|
2449
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2450
|
-
if (data.tags !== undefined && data.tags !== null) {
|
|
2451
|
-
contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
|
|
2452
|
-
}
|
|
2453
|
-
return Promise.resolve(contents);
|
|
2454
|
-
};
|
|
2455
|
-
|
|
2456
|
-
const deserializeAws_restJson1ListTagsForResourceCommandError = async (
|
|
2457
|
-
output: __HttpResponse,
|
|
2458
|
-
context: __SerdeContext
|
|
2459
|
-
): Promise<ListTagsForResourceCommandOutput> => {
|
|
2460
|
-
const parsedOutput: any = {
|
|
2461
|
-
...output,
|
|
2462
|
-
body: await parseBody(output.body, context),
|
|
2463
|
-
};
|
|
2464
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2465
|
-
let errorCode = "UnknownError";
|
|
2466
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2467
|
-
switch (errorCode) {
|
|
2468
|
-
case "AccessDeniedException":
|
|
2469
|
-
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
2470
|
-
response = {
|
|
2471
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2472
|
-
name: errorCode,
|
|
2473
|
-
$metadata: deserializeMetadata(output),
|
|
2474
|
-
};
|
|
2475
|
-
break;
|
|
2476
|
-
case "InternalServerException":
|
|
2477
|
-
case "com.amazonaws.ssmincidents#InternalServerException":
|
|
2478
|
-
response = {
|
|
2479
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2480
|
-
name: errorCode,
|
|
2481
|
-
$metadata: deserializeMetadata(output),
|
|
2482
|
-
};
|
|
2483
|
-
break;
|
|
2484
|
-
case "ResourceNotFoundException":
|
|
2485
|
-
case "com.amazonaws.ssmincidents#ResourceNotFoundException":
|
|
2486
|
-
response = {
|
|
2487
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2488
|
-
name: errorCode,
|
|
2489
|
-
$metadata: deserializeMetadata(output),
|
|
2490
|
-
};
|
|
2491
|
-
break;
|
|
2492
|
-
case "ThrottlingException":
|
|
2493
|
-
case "com.amazonaws.ssmincidents#ThrottlingException":
|
|
2494
|
-
response = {
|
|
2495
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2496
|
-
name: errorCode,
|
|
2497
|
-
$metadata: deserializeMetadata(output),
|
|
2498
|
-
};
|
|
2499
|
-
break;
|
|
2500
|
-
case "ValidationException":
|
|
2501
|
-
case "com.amazonaws.ssmincidents#ValidationException":
|
|
2502
|
-
response = {
|
|
2503
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2504
|
-
name: errorCode,
|
|
2505
|
-
$metadata: deserializeMetadata(output),
|
|
2506
|
-
};
|
|
2507
|
-
break;
|
|
2508
|
-
default:
|
|
2509
|
-
const parsedBody = parsedOutput.body;
|
|
2510
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2511
|
-
response = {
|
|
2512
|
-
...parsedBody,
|
|
2513
|
-
name: `${errorCode}`,
|
|
2514
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2515
|
-
$fault: "client",
|
|
2516
|
-
$metadata: deserializeMetadata(output),
|
|
2517
|
-
} as any;
|
|
2518
|
-
}
|
|
2519
|
-
const message = response.message || response.Message || errorCode;
|
|
2520
|
-
response.message = message;
|
|
2521
|
-
delete response.Message;
|
|
2522
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2523
|
-
};
|
|
2524
|
-
|
|
2525
|
-
export const deserializeAws_restJson1ListTimelineEventsCommand = async (
|
|
2526
|
-
output: __HttpResponse,
|
|
2527
|
-
context: __SerdeContext
|
|
2528
|
-
): Promise<ListTimelineEventsCommandOutput> => {
|
|
2529
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2530
|
-
return deserializeAws_restJson1ListTimelineEventsCommandError(output, context);
|
|
2531
|
-
}
|
|
2532
|
-
const contents: ListTimelineEventsCommandOutput = {
|
|
2533
|
-
$metadata: deserializeMetadata(output),
|
|
2534
|
-
eventSummaries: undefined,
|
|
2535
|
-
nextToken: undefined,
|
|
2536
|
-
};
|
|
2537
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2538
|
-
if (data.eventSummaries !== undefined && data.eventSummaries !== null) {
|
|
2539
|
-
contents.eventSummaries = deserializeAws_restJson1EventSummaryList(data.eventSummaries, context);
|
|
2540
|
-
}
|
|
2541
|
-
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
2542
|
-
contents.nextToken = __expectString(data.nextToken);
|
|
2543
|
-
}
|
|
2544
|
-
return Promise.resolve(contents);
|
|
2545
|
-
};
|
|
2546
|
-
|
|
2547
|
-
const deserializeAws_restJson1ListTimelineEventsCommandError = async (
|
|
2548
|
-
output: __HttpResponse,
|
|
2549
|
-
context: __SerdeContext
|
|
2550
|
-
): Promise<ListTimelineEventsCommandOutput> => {
|
|
2551
|
-
const parsedOutput: any = {
|
|
2552
|
-
...output,
|
|
2553
|
-
body: await parseBody(output.body, context),
|
|
2554
|
-
};
|
|
2555
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2556
|
-
let errorCode = "UnknownError";
|
|
2557
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2558
|
-
switch (errorCode) {
|
|
2559
|
-
case "AccessDeniedException":
|
|
2560
|
-
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
2561
|
-
response = {
|
|
2562
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2563
|
-
name: errorCode,
|
|
2564
|
-
$metadata: deserializeMetadata(output),
|
|
2565
|
-
};
|
|
2566
|
-
break;
|
|
2567
|
-
case "InternalServerException":
|
|
2568
|
-
case "com.amazonaws.ssmincidents#InternalServerException":
|
|
2569
|
-
response = {
|
|
2570
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2571
|
-
name: errorCode,
|
|
2572
|
-
$metadata: deserializeMetadata(output),
|
|
2573
|
-
};
|
|
2574
|
-
break;
|
|
2575
|
-
case "ThrottlingException":
|
|
2576
|
-
case "com.amazonaws.ssmincidents#ThrottlingException":
|
|
2577
|
-
response = {
|
|
2578
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2579
|
-
name: errorCode,
|
|
2580
|
-
$metadata: deserializeMetadata(output),
|
|
2581
|
-
};
|
|
2582
|
-
break;
|
|
2583
|
-
case "ValidationException":
|
|
2584
|
-
case "com.amazonaws.ssmincidents#ValidationException":
|
|
2585
|
-
response = {
|
|
2586
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2587
|
-
name: errorCode,
|
|
2588
|
-
$metadata: deserializeMetadata(output),
|
|
2589
|
-
};
|
|
2590
|
-
break;
|
|
2591
|
-
default:
|
|
2592
|
-
const parsedBody = parsedOutput.body;
|
|
2593
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2594
|
-
response = {
|
|
2595
|
-
...parsedBody,
|
|
2596
|
-
name: `${errorCode}`,
|
|
2597
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2598
|
-
$fault: "client",
|
|
2599
|
-
$metadata: deserializeMetadata(output),
|
|
2600
|
-
} as any;
|
|
2601
|
-
}
|
|
2602
|
-
const message = response.message || response.Message || errorCode;
|
|
2603
|
-
response.message = message;
|
|
2604
|
-
delete response.Message;
|
|
2605
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2606
|
-
};
|
|
2607
|
-
|
|
2608
|
-
export const deserializeAws_restJson1PutResourcePolicyCommand = async (
|
|
2609
|
-
output: __HttpResponse,
|
|
2610
|
-
context: __SerdeContext
|
|
2611
|
-
): Promise<PutResourcePolicyCommandOutput> => {
|
|
2612
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2613
|
-
return deserializeAws_restJson1PutResourcePolicyCommandError(output, context);
|
|
2614
|
-
}
|
|
2615
|
-
const contents: PutResourcePolicyCommandOutput = {
|
|
2616
|
-
$metadata: deserializeMetadata(output),
|
|
2617
|
-
policyId: undefined,
|
|
2618
|
-
};
|
|
2619
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2620
|
-
if (data.policyId !== undefined && data.policyId !== null) {
|
|
2621
|
-
contents.policyId = __expectString(data.policyId);
|
|
2622
|
-
}
|
|
2623
|
-
return Promise.resolve(contents);
|
|
2624
|
-
};
|
|
2625
|
-
|
|
2626
|
-
const deserializeAws_restJson1PutResourcePolicyCommandError = async (
|
|
2627
|
-
output: __HttpResponse,
|
|
2628
|
-
context: __SerdeContext
|
|
2629
|
-
): Promise<PutResourcePolicyCommandOutput> => {
|
|
2630
|
-
const parsedOutput: any = {
|
|
2631
|
-
...output,
|
|
2632
|
-
body: await parseBody(output.body, context),
|
|
2633
|
-
};
|
|
2634
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2635
|
-
let errorCode = "UnknownError";
|
|
2636
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2637
|
-
switch (errorCode) {
|
|
2638
|
-
case "AccessDeniedException":
|
|
2639
|
-
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
2640
|
-
response = {
|
|
2641
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2642
|
-
name: errorCode,
|
|
2643
|
-
$metadata: deserializeMetadata(output),
|
|
2644
|
-
};
|
|
2645
|
-
break;
|
|
2646
|
-
case "InternalServerException":
|
|
2647
|
-
case "com.amazonaws.ssmincidents#InternalServerException":
|
|
2648
|
-
response = {
|
|
2649
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2650
|
-
name: errorCode,
|
|
2651
|
-
$metadata: deserializeMetadata(output),
|
|
2652
|
-
};
|
|
2653
|
-
break;
|
|
2654
|
-
case "ResourceNotFoundException":
|
|
2655
|
-
case "com.amazonaws.ssmincidents#ResourceNotFoundException":
|
|
2656
|
-
response = {
|
|
2657
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2658
|
-
name: errorCode,
|
|
2659
|
-
$metadata: deserializeMetadata(output),
|
|
2660
|
-
};
|
|
2661
|
-
break;
|
|
2662
|
-
case "ThrottlingException":
|
|
2663
|
-
case "com.amazonaws.ssmincidents#ThrottlingException":
|
|
2664
|
-
response = {
|
|
2665
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2666
|
-
name: errorCode,
|
|
2667
|
-
$metadata: deserializeMetadata(output),
|
|
2668
|
-
};
|
|
2669
|
-
break;
|
|
2670
|
-
case "ValidationException":
|
|
2671
|
-
case "com.amazonaws.ssmincidents#ValidationException":
|
|
2672
|
-
response = {
|
|
2673
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2674
|
-
name: errorCode,
|
|
2675
|
-
$metadata: deserializeMetadata(output),
|
|
2676
|
-
};
|
|
2677
|
-
break;
|
|
2678
|
-
default:
|
|
2679
|
-
const parsedBody = parsedOutput.body;
|
|
2680
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2681
|
-
response = {
|
|
2682
|
-
...parsedBody,
|
|
2683
|
-
name: `${errorCode}`,
|
|
2684
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2685
|
-
$fault: "client",
|
|
2686
|
-
$metadata: deserializeMetadata(output),
|
|
2687
|
-
} as any;
|
|
2688
|
-
}
|
|
2689
|
-
const message = response.message || response.Message || errorCode;
|
|
2690
|
-
response.message = message;
|
|
2691
|
-
delete response.Message;
|
|
2692
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2693
|
-
};
|
|
2694
|
-
|
|
2695
|
-
export const deserializeAws_restJson1StartIncidentCommand = async (
|
|
2696
|
-
output: __HttpResponse,
|
|
2697
|
-
context: __SerdeContext
|
|
2698
|
-
): Promise<StartIncidentCommandOutput> => {
|
|
2699
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2700
|
-
return deserializeAws_restJson1StartIncidentCommandError(output, context);
|
|
2701
|
-
}
|
|
2702
|
-
const contents: StartIncidentCommandOutput = {
|
|
2703
|
-
$metadata: deserializeMetadata(output),
|
|
2704
|
-
incidentRecordArn: undefined,
|
|
2705
|
-
};
|
|
2706
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2707
|
-
if (data.incidentRecordArn !== undefined && data.incidentRecordArn !== null) {
|
|
2708
|
-
contents.incidentRecordArn = __expectString(data.incidentRecordArn);
|
|
2709
|
-
}
|
|
2710
|
-
return Promise.resolve(contents);
|
|
2711
|
-
};
|
|
2712
|
-
|
|
2713
|
-
const deserializeAws_restJson1StartIncidentCommandError = async (
|
|
2714
|
-
output: __HttpResponse,
|
|
2715
|
-
context: __SerdeContext
|
|
2716
|
-
): Promise<StartIncidentCommandOutput> => {
|
|
2717
|
-
const parsedOutput: any = {
|
|
2718
|
-
...output,
|
|
2719
|
-
body: await parseBody(output.body, context),
|
|
2720
|
-
};
|
|
2721
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2722
|
-
let errorCode = "UnknownError";
|
|
2723
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2724
|
-
switch (errorCode) {
|
|
2725
|
-
case "AccessDeniedException":
|
|
2726
|
-
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
2727
|
-
response = {
|
|
2728
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2729
|
-
name: errorCode,
|
|
2730
|
-
$metadata: deserializeMetadata(output),
|
|
2731
|
-
};
|
|
2732
|
-
break;
|
|
2733
|
-
case "ConflictException":
|
|
2734
|
-
case "com.amazonaws.ssmincidents#ConflictException":
|
|
2735
|
-
response = {
|
|
2736
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
2737
|
-
name: errorCode,
|
|
2738
|
-
$metadata: deserializeMetadata(output),
|
|
2739
|
-
};
|
|
2740
|
-
break;
|
|
2741
|
-
case "InternalServerException":
|
|
2742
|
-
case "com.amazonaws.ssmincidents#InternalServerException":
|
|
2743
|
-
response = {
|
|
2744
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2745
|
-
name: errorCode,
|
|
2746
|
-
$metadata: deserializeMetadata(output),
|
|
2747
|
-
};
|
|
2748
|
-
break;
|
|
2749
|
-
case "ResourceNotFoundException":
|
|
2750
|
-
case "com.amazonaws.ssmincidents#ResourceNotFoundException":
|
|
2751
|
-
response = {
|
|
2752
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2753
|
-
name: errorCode,
|
|
2754
|
-
$metadata: deserializeMetadata(output),
|
|
2755
|
-
};
|
|
2756
|
-
break;
|
|
2757
|
-
case "ThrottlingException":
|
|
2758
|
-
case "com.amazonaws.ssmincidents#ThrottlingException":
|
|
2759
|
-
response = {
|
|
2760
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2761
|
-
name: errorCode,
|
|
2762
|
-
$metadata: deserializeMetadata(output),
|
|
2763
|
-
};
|
|
2764
|
-
break;
|
|
2765
|
-
case "ValidationException":
|
|
2766
|
-
case "com.amazonaws.ssmincidents#ValidationException":
|
|
2767
|
-
response = {
|
|
2768
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2769
|
-
name: errorCode,
|
|
2770
|
-
$metadata: deserializeMetadata(output),
|
|
2771
|
-
};
|
|
2772
|
-
break;
|
|
2773
|
-
default:
|
|
2774
|
-
const parsedBody = parsedOutput.body;
|
|
2775
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2776
|
-
response = {
|
|
2777
|
-
...parsedBody,
|
|
2778
|
-
name: `${errorCode}`,
|
|
2779
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2780
|
-
$fault: "client",
|
|
2781
|
-
$metadata: deserializeMetadata(output),
|
|
2782
|
-
} as any;
|
|
2783
|
-
}
|
|
2784
|
-
const message = response.message || response.Message || errorCode;
|
|
2785
|
-
response.message = message;
|
|
2786
|
-
delete response.Message;
|
|
2787
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2788
|
-
};
|
|
2789
|
-
|
|
2790
|
-
export const deserializeAws_restJson1TagResourceCommand = async (
|
|
2791
|
-
output: __HttpResponse,
|
|
2792
|
-
context: __SerdeContext
|
|
2793
|
-
): Promise<TagResourceCommandOutput> => {
|
|
2794
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
2795
|
-
return deserializeAws_restJson1TagResourceCommandError(output, context);
|
|
2796
|
-
}
|
|
2797
|
-
const contents: TagResourceCommandOutput = {
|
|
2798
|
-
$metadata: deserializeMetadata(output),
|
|
2799
|
-
};
|
|
2800
|
-
await collectBody(output.body, context);
|
|
2801
|
-
return Promise.resolve(contents);
|
|
2802
|
-
};
|
|
2803
|
-
|
|
2804
|
-
const deserializeAws_restJson1TagResourceCommandError = async (
|
|
2805
|
-
output: __HttpResponse,
|
|
2806
|
-
context: __SerdeContext
|
|
2807
|
-
): Promise<TagResourceCommandOutput> => {
|
|
2808
|
-
const parsedOutput: any = {
|
|
2809
|
-
...output,
|
|
2810
|
-
body: await parseBody(output.body, context),
|
|
2811
|
-
};
|
|
2812
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2813
|
-
let errorCode = "UnknownError";
|
|
2814
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2815
|
-
switch (errorCode) {
|
|
2816
|
-
case "AccessDeniedException":
|
|
2817
|
-
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
2818
|
-
response = {
|
|
2819
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2820
|
-
name: errorCode,
|
|
2821
|
-
$metadata: deserializeMetadata(output),
|
|
2822
|
-
};
|
|
2823
|
-
break;
|
|
2824
|
-
case "ConflictException":
|
|
2825
|
-
case "com.amazonaws.ssmincidents#ConflictException":
|
|
2826
|
-
response = {
|
|
2827
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
2828
|
-
name: errorCode,
|
|
2829
|
-
$metadata: deserializeMetadata(output),
|
|
2830
|
-
};
|
|
2831
|
-
break;
|
|
2832
|
-
case "InternalServerException":
|
|
2833
|
-
case "com.amazonaws.ssmincidents#InternalServerException":
|
|
2834
|
-
response = {
|
|
2835
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2836
|
-
name: errorCode,
|
|
2837
|
-
$metadata: deserializeMetadata(output),
|
|
2838
|
-
};
|
|
2839
|
-
break;
|
|
2840
|
-
case "ResourceNotFoundException":
|
|
2841
|
-
case "com.amazonaws.ssmincidents#ResourceNotFoundException":
|
|
2842
|
-
response = {
|
|
2843
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2844
|
-
name: errorCode,
|
|
2845
|
-
$metadata: deserializeMetadata(output),
|
|
2846
|
-
};
|
|
2847
|
-
break;
|
|
2848
|
-
case "ServiceQuotaExceededException":
|
|
2849
|
-
case "com.amazonaws.ssmincidents#ServiceQuotaExceededException":
|
|
2850
|
-
response = {
|
|
2851
|
-
...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
2852
|
-
name: errorCode,
|
|
2853
|
-
$metadata: deserializeMetadata(output),
|
|
2854
|
-
};
|
|
2855
|
-
break;
|
|
2856
|
-
case "ThrottlingException":
|
|
2857
|
-
case "com.amazonaws.ssmincidents#ThrottlingException":
|
|
2858
|
-
response = {
|
|
2859
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2860
|
-
name: errorCode,
|
|
2861
|
-
$metadata: deserializeMetadata(output),
|
|
2862
|
-
};
|
|
2863
|
-
break;
|
|
2864
|
-
case "ValidationException":
|
|
2865
|
-
case "com.amazonaws.ssmincidents#ValidationException":
|
|
2866
|
-
response = {
|
|
2867
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2868
|
-
name: errorCode,
|
|
2869
|
-
$metadata: deserializeMetadata(output),
|
|
2870
|
-
};
|
|
2871
|
-
break;
|
|
2872
|
-
default:
|
|
2873
|
-
const parsedBody = parsedOutput.body;
|
|
2874
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2875
|
-
response = {
|
|
2876
|
-
...parsedBody,
|
|
2877
|
-
name: `${errorCode}`,
|
|
2878
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2879
|
-
$fault: "client",
|
|
2880
|
-
$metadata: deserializeMetadata(output),
|
|
2881
|
-
} as any;
|
|
2882
|
-
}
|
|
2883
|
-
const message = response.message || response.Message || errorCode;
|
|
2884
|
-
response.message = message;
|
|
2885
|
-
delete response.Message;
|
|
2886
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2887
|
-
};
|
|
2888
|
-
|
|
2889
|
-
export const deserializeAws_restJson1UntagResourceCommand = async (
|
|
2890
|
-
output: __HttpResponse,
|
|
2891
|
-
context: __SerdeContext
|
|
2892
|
-
): Promise<UntagResourceCommandOutput> => {
|
|
2893
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
2894
|
-
return deserializeAws_restJson1UntagResourceCommandError(output, context);
|
|
2895
|
-
}
|
|
2896
|
-
const contents: UntagResourceCommandOutput = {
|
|
2897
|
-
$metadata: deserializeMetadata(output),
|
|
2898
|
-
};
|
|
2899
|
-
await collectBody(output.body, context);
|
|
2900
|
-
return Promise.resolve(contents);
|
|
2901
|
-
};
|
|
2902
|
-
|
|
2903
|
-
const deserializeAws_restJson1UntagResourceCommandError = async (
|
|
2904
|
-
output: __HttpResponse,
|
|
2905
|
-
context: __SerdeContext
|
|
2906
|
-
): Promise<UntagResourceCommandOutput> => {
|
|
2907
|
-
const parsedOutput: any = {
|
|
2908
|
-
...output,
|
|
2909
|
-
body: await parseBody(output.body, context),
|
|
2910
|
-
};
|
|
2911
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2912
|
-
let errorCode = "UnknownError";
|
|
2913
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2914
|
-
switch (errorCode) {
|
|
2915
|
-
case "AccessDeniedException":
|
|
2916
|
-
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
2917
|
-
response = {
|
|
2918
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2919
|
-
name: errorCode,
|
|
2920
|
-
$metadata: deserializeMetadata(output),
|
|
2921
|
-
};
|
|
2922
|
-
break;
|
|
2923
|
-
case "ConflictException":
|
|
2924
|
-
case "com.amazonaws.ssmincidents#ConflictException":
|
|
2925
|
-
response = {
|
|
2926
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
2927
|
-
name: errorCode,
|
|
2928
|
-
$metadata: deserializeMetadata(output),
|
|
2929
|
-
};
|
|
2930
|
-
break;
|
|
2931
|
-
case "InternalServerException":
|
|
2932
|
-
case "com.amazonaws.ssmincidents#InternalServerException":
|
|
2933
|
-
response = {
|
|
2934
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2935
|
-
name: errorCode,
|
|
2936
|
-
$metadata: deserializeMetadata(output),
|
|
2937
|
-
};
|
|
2938
|
-
break;
|
|
2939
|
-
case "ResourceNotFoundException":
|
|
2940
|
-
case "com.amazonaws.ssmincidents#ResourceNotFoundException":
|
|
2941
|
-
response = {
|
|
2942
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2943
|
-
name: errorCode,
|
|
2944
|
-
$metadata: deserializeMetadata(output),
|
|
2945
|
-
};
|
|
2946
|
-
break;
|
|
2947
|
-
case "ThrottlingException":
|
|
2948
|
-
case "com.amazonaws.ssmincidents#ThrottlingException":
|
|
2949
|
-
response = {
|
|
2950
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2951
|
-
name: errorCode,
|
|
2952
|
-
$metadata: deserializeMetadata(output),
|
|
2953
|
-
};
|
|
2954
|
-
break;
|
|
2955
|
-
case "ValidationException":
|
|
2956
|
-
case "com.amazonaws.ssmincidents#ValidationException":
|
|
2957
|
-
response = {
|
|
2958
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2959
|
-
name: errorCode,
|
|
2960
|
-
$metadata: deserializeMetadata(output),
|
|
2961
|
-
};
|
|
2962
|
-
break;
|
|
2963
|
-
default:
|
|
2964
|
-
const parsedBody = parsedOutput.body;
|
|
2965
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2966
|
-
response = {
|
|
2967
|
-
...parsedBody,
|
|
2968
|
-
name: `${errorCode}`,
|
|
2969
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2970
|
-
$fault: "client",
|
|
2971
|
-
$metadata: deserializeMetadata(output),
|
|
2972
|
-
} as any;
|
|
2973
|
-
}
|
|
2974
|
-
const message = response.message || response.Message || errorCode;
|
|
2975
|
-
response.message = message;
|
|
2976
|
-
delete response.Message;
|
|
2977
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2978
|
-
};
|
|
2979
|
-
|
|
2980
|
-
export const deserializeAws_restJson1UpdateDeletionProtectionCommand = async (
|
|
2981
|
-
output: __HttpResponse,
|
|
2982
|
-
context: __SerdeContext
|
|
2983
|
-
): Promise<UpdateDeletionProtectionCommandOutput> => {
|
|
2984
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
2985
|
-
return deserializeAws_restJson1UpdateDeletionProtectionCommandError(output, context);
|
|
2986
|
-
}
|
|
2987
|
-
const contents: UpdateDeletionProtectionCommandOutput = {
|
|
2988
|
-
$metadata: deserializeMetadata(output),
|
|
2989
|
-
};
|
|
2990
|
-
await collectBody(output.body, context);
|
|
2991
|
-
return Promise.resolve(contents);
|
|
2992
|
-
};
|
|
2993
|
-
|
|
2994
|
-
const deserializeAws_restJson1UpdateDeletionProtectionCommandError = async (
|
|
2995
|
-
output: __HttpResponse,
|
|
2996
|
-
context: __SerdeContext
|
|
2997
|
-
): Promise<UpdateDeletionProtectionCommandOutput> => {
|
|
2998
|
-
const parsedOutput: any = {
|
|
2999
|
-
...output,
|
|
3000
|
-
body: await parseBody(output.body, context),
|
|
3001
|
-
};
|
|
3002
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3003
|
-
let errorCode = "UnknownError";
|
|
3004
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3005
|
-
switch (errorCode) {
|
|
3006
|
-
case "AccessDeniedException":
|
|
3007
|
-
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
3008
|
-
response = {
|
|
3009
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
3010
|
-
name: errorCode,
|
|
3011
|
-
$metadata: deserializeMetadata(output),
|
|
3012
|
-
};
|
|
3013
|
-
break;
|
|
3014
|
-
case "InternalServerException":
|
|
3015
|
-
case "com.amazonaws.ssmincidents#InternalServerException":
|
|
3016
|
-
response = {
|
|
3017
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
3018
|
-
name: errorCode,
|
|
3019
|
-
$metadata: deserializeMetadata(output),
|
|
3020
|
-
};
|
|
3021
|
-
break;
|
|
3022
|
-
case "ResourceNotFoundException":
|
|
3023
|
-
case "com.amazonaws.ssmincidents#ResourceNotFoundException":
|
|
3024
|
-
response = {
|
|
3025
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
3026
|
-
name: errorCode,
|
|
3027
|
-
$metadata: deserializeMetadata(output),
|
|
3028
|
-
};
|
|
3029
|
-
break;
|
|
3030
|
-
case "ThrottlingException":
|
|
3031
|
-
case "com.amazonaws.ssmincidents#ThrottlingException":
|
|
3032
|
-
response = {
|
|
3033
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
3034
|
-
name: errorCode,
|
|
3035
|
-
$metadata: deserializeMetadata(output),
|
|
3036
|
-
};
|
|
3037
|
-
break;
|
|
3038
|
-
case "ValidationException":
|
|
3039
|
-
case "com.amazonaws.ssmincidents#ValidationException":
|
|
3040
|
-
response = {
|
|
3041
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
3042
|
-
name: errorCode,
|
|
3043
|
-
$metadata: deserializeMetadata(output),
|
|
3044
|
-
};
|
|
3045
|
-
break;
|
|
3046
|
-
default:
|
|
3047
|
-
const parsedBody = parsedOutput.body;
|
|
3048
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3049
|
-
response = {
|
|
3050
|
-
...parsedBody,
|
|
3051
|
-
name: `${errorCode}`,
|
|
3052
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3053
|
-
$fault: "client",
|
|
3054
|
-
$metadata: deserializeMetadata(output),
|
|
3055
|
-
} as any;
|
|
3056
|
-
}
|
|
3057
|
-
const message = response.message || response.Message || errorCode;
|
|
3058
|
-
response.message = message;
|
|
3059
|
-
delete response.Message;
|
|
3060
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3061
|
-
};
|
|
3062
|
-
|
|
3063
|
-
export const deserializeAws_restJson1UpdateIncidentRecordCommand = async (
|
|
3064
|
-
output: __HttpResponse,
|
|
3065
|
-
context: __SerdeContext
|
|
3066
|
-
): Promise<UpdateIncidentRecordCommandOutput> => {
|
|
3067
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
3068
|
-
return deserializeAws_restJson1UpdateIncidentRecordCommandError(output, context);
|
|
3069
|
-
}
|
|
3070
|
-
const contents: UpdateIncidentRecordCommandOutput = {
|
|
3071
|
-
$metadata: deserializeMetadata(output),
|
|
3072
|
-
};
|
|
3073
|
-
await collectBody(output.body, context);
|
|
3074
|
-
return Promise.resolve(contents);
|
|
3075
|
-
};
|
|
3076
|
-
|
|
3077
|
-
const deserializeAws_restJson1UpdateIncidentRecordCommandError = async (
|
|
3078
|
-
output: __HttpResponse,
|
|
3079
|
-
context: __SerdeContext
|
|
3080
|
-
): Promise<UpdateIncidentRecordCommandOutput> => {
|
|
3081
|
-
const parsedOutput: any = {
|
|
3082
|
-
...output,
|
|
3083
|
-
body: await parseBody(output.body, context),
|
|
3084
|
-
};
|
|
3085
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3086
|
-
let errorCode = "UnknownError";
|
|
3087
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3088
|
-
switch (errorCode) {
|
|
3089
|
-
case "AccessDeniedException":
|
|
3090
|
-
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
3091
|
-
response = {
|
|
3092
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
3093
|
-
name: errorCode,
|
|
3094
|
-
$metadata: deserializeMetadata(output),
|
|
3095
|
-
};
|
|
3096
|
-
break;
|
|
3097
|
-
case "ConflictException":
|
|
3098
|
-
case "com.amazonaws.ssmincidents#ConflictException":
|
|
3099
|
-
response = {
|
|
3100
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
3101
|
-
name: errorCode,
|
|
3102
|
-
$metadata: deserializeMetadata(output),
|
|
3103
|
-
};
|
|
3104
|
-
break;
|
|
3105
|
-
case "InternalServerException":
|
|
3106
|
-
case "com.amazonaws.ssmincidents#InternalServerException":
|
|
3107
|
-
response = {
|
|
3108
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
3109
|
-
name: errorCode,
|
|
3110
|
-
$metadata: deserializeMetadata(output),
|
|
3111
|
-
};
|
|
3112
|
-
break;
|
|
3113
|
-
case "ResourceNotFoundException":
|
|
3114
|
-
case "com.amazonaws.ssmincidents#ResourceNotFoundException":
|
|
3115
|
-
response = {
|
|
3116
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
3117
|
-
name: errorCode,
|
|
3118
|
-
$metadata: deserializeMetadata(output),
|
|
3119
|
-
};
|
|
3120
|
-
break;
|
|
3121
|
-
case "ThrottlingException":
|
|
3122
|
-
case "com.amazonaws.ssmincidents#ThrottlingException":
|
|
3123
|
-
response = {
|
|
3124
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
3125
|
-
name: errorCode,
|
|
3126
|
-
$metadata: deserializeMetadata(output),
|
|
3127
|
-
};
|
|
3128
|
-
break;
|
|
3129
|
-
case "ValidationException":
|
|
3130
|
-
case "com.amazonaws.ssmincidents#ValidationException":
|
|
3131
|
-
response = {
|
|
3132
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
3133
|
-
name: errorCode,
|
|
3134
|
-
$metadata: deserializeMetadata(output),
|
|
3135
|
-
};
|
|
3136
|
-
break;
|
|
3137
|
-
default:
|
|
3138
|
-
const parsedBody = parsedOutput.body;
|
|
3139
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3140
|
-
response = {
|
|
3141
|
-
...parsedBody,
|
|
3142
|
-
name: `${errorCode}`,
|
|
3143
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3144
|
-
$fault: "client",
|
|
3145
|
-
$metadata: deserializeMetadata(output),
|
|
3146
|
-
} as any;
|
|
3147
|
-
}
|
|
3148
|
-
const message = response.message || response.Message || errorCode;
|
|
3149
|
-
response.message = message;
|
|
3150
|
-
delete response.Message;
|
|
3151
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3152
|
-
};
|
|
3153
|
-
|
|
3154
|
-
export const deserializeAws_restJson1UpdateRelatedItemsCommand = async (
|
|
3155
|
-
output: __HttpResponse,
|
|
3156
|
-
context: __SerdeContext
|
|
3157
|
-
): Promise<UpdateRelatedItemsCommandOutput> => {
|
|
3158
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
3159
|
-
return deserializeAws_restJson1UpdateRelatedItemsCommandError(output, context);
|
|
3160
|
-
}
|
|
3161
|
-
const contents: UpdateRelatedItemsCommandOutput = {
|
|
3162
|
-
$metadata: deserializeMetadata(output),
|
|
3163
|
-
};
|
|
3164
|
-
await collectBody(output.body, context);
|
|
3165
|
-
return Promise.resolve(contents);
|
|
3166
|
-
};
|
|
3167
|
-
|
|
3168
|
-
const deserializeAws_restJson1UpdateRelatedItemsCommandError = async (
|
|
3169
|
-
output: __HttpResponse,
|
|
3170
|
-
context: __SerdeContext
|
|
3171
|
-
): Promise<UpdateRelatedItemsCommandOutput> => {
|
|
3172
|
-
const parsedOutput: any = {
|
|
3173
|
-
...output,
|
|
3174
|
-
body: await parseBody(output.body, context),
|
|
3175
|
-
};
|
|
3176
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3177
|
-
let errorCode = "UnknownError";
|
|
3178
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3179
|
-
switch (errorCode) {
|
|
3180
|
-
case "AccessDeniedException":
|
|
3181
|
-
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
3182
|
-
response = {
|
|
3183
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
3184
|
-
name: errorCode,
|
|
3185
|
-
$metadata: deserializeMetadata(output),
|
|
3186
|
-
};
|
|
3187
|
-
break;
|
|
3188
|
-
case "ConflictException":
|
|
3189
|
-
case "com.amazonaws.ssmincidents#ConflictException":
|
|
3190
|
-
response = {
|
|
3191
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
3192
|
-
name: errorCode,
|
|
3193
|
-
$metadata: deserializeMetadata(output),
|
|
3194
|
-
};
|
|
3195
|
-
break;
|
|
3196
|
-
case "InternalServerException":
|
|
3197
|
-
case "com.amazonaws.ssmincidents#InternalServerException":
|
|
3198
|
-
response = {
|
|
3199
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
3200
|
-
name: errorCode,
|
|
3201
|
-
$metadata: deserializeMetadata(output),
|
|
3202
|
-
};
|
|
3203
|
-
break;
|
|
3204
|
-
case "ResourceNotFoundException":
|
|
3205
|
-
case "com.amazonaws.ssmincidents#ResourceNotFoundException":
|
|
3206
|
-
response = {
|
|
3207
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
3208
|
-
name: errorCode,
|
|
3209
|
-
$metadata: deserializeMetadata(output),
|
|
3210
|
-
};
|
|
3211
|
-
break;
|
|
3212
|
-
case "ThrottlingException":
|
|
3213
|
-
case "com.amazonaws.ssmincidents#ThrottlingException":
|
|
3214
|
-
response = {
|
|
3215
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
3216
|
-
name: errorCode,
|
|
3217
|
-
$metadata: deserializeMetadata(output),
|
|
3218
|
-
};
|
|
3219
|
-
break;
|
|
3220
|
-
case "ValidationException":
|
|
3221
|
-
case "com.amazonaws.ssmincidents#ValidationException":
|
|
3222
|
-
response = {
|
|
3223
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
3224
|
-
name: errorCode,
|
|
3225
|
-
$metadata: deserializeMetadata(output),
|
|
3226
|
-
};
|
|
3227
|
-
break;
|
|
3228
|
-
default:
|
|
3229
|
-
const parsedBody = parsedOutput.body;
|
|
3230
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3231
|
-
response = {
|
|
3232
|
-
...parsedBody,
|
|
3233
|
-
name: `${errorCode}`,
|
|
3234
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3235
|
-
$fault: "client",
|
|
3236
|
-
$metadata: deserializeMetadata(output),
|
|
3237
|
-
} as any;
|
|
3238
|
-
}
|
|
3239
|
-
const message = response.message || response.Message || errorCode;
|
|
3240
|
-
response.message = message;
|
|
3241
|
-
delete response.Message;
|
|
3242
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3243
|
-
};
|
|
3244
|
-
|
|
3245
|
-
export const deserializeAws_restJson1UpdateReplicationSetCommand = async (
|
|
3246
|
-
output: __HttpResponse,
|
|
3247
|
-
context: __SerdeContext
|
|
3248
|
-
): Promise<UpdateReplicationSetCommandOutput> => {
|
|
3249
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
3250
|
-
return deserializeAws_restJson1UpdateReplicationSetCommandError(output, context);
|
|
3251
|
-
}
|
|
3252
|
-
const contents: UpdateReplicationSetCommandOutput = {
|
|
3253
|
-
$metadata: deserializeMetadata(output),
|
|
3254
|
-
};
|
|
3255
|
-
await collectBody(output.body, context);
|
|
3256
|
-
return Promise.resolve(contents);
|
|
3257
|
-
};
|
|
3258
|
-
|
|
3259
|
-
const deserializeAws_restJson1UpdateReplicationSetCommandError = async (
|
|
3260
|
-
output: __HttpResponse,
|
|
3261
|
-
context: __SerdeContext
|
|
3262
|
-
): Promise<UpdateReplicationSetCommandOutput> => {
|
|
3263
|
-
const parsedOutput: any = {
|
|
3264
|
-
...output,
|
|
3265
|
-
body: await parseBody(output.body, context),
|
|
3266
|
-
};
|
|
3267
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3268
|
-
let errorCode = "UnknownError";
|
|
3269
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3270
|
-
switch (errorCode) {
|
|
3271
|
-
case "AccessDeniedException":
|
|
3272
|
-
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
3273
|
-
response = {
|
|
3274
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
3275
|
-
name: errorCode,
|
|
3276
|
-
$metadata: deserializeMetadata(output),
|
|
3277
|
-
};
|
|
3278
|
-
break;
|
|
3279
|
-
case "InternalServerException":
|
|
3280
|
-
case "com.amazonaws.ssmincidents#InternalServerException":
|
|
3281
|
-
response = {
|
|
3282
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
3283
|
-
name: errorCode,
|
|
3284
|
-
$metadata: deserializeMetadata(output),
|
|
3285
|
-
};
|
|
3286
|
-
break;
|
|
3287
|
-
case "ResourceNotFoundException":
|
|
3288
|
-
case "com.amazonaws.ssmincidents#ResourceNotFoundException":
|
|
3289
|
-
response = {
|
|
3290
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
3291
|
-
name: errorCode,
|
|
3292
|
-
$metadata: deserializeMetadata(output),
|
|
3293
|
-
};
|
|
3294
|
-
break;
|
|
3295
|
-
case "ThrottlingException":
|
|
3296
|
-
case "com.amazonaws.ssmincidents#ThrottlingException":
|
|
3297
|
-
response = {
|
|
3298
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
3299
|
-
name: errorCode,
|
|
3300
|
-
$metadata: deserializeMetadata(output),
|
|
3301
|
-
};
|
|
3302
|
-
break;
|
|
3303
|
-
case "ValidationException":
|
|
3304
|
-
case "com.amazonaws.ssmincidents#ValidationException":
|
|
3305
|
-
response = {
|
|
3306
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
3307
|
-
name: errorCode,
|
|
3308
|
-
$metadata: deserializeMetadata(output),
|
|
3309
|
-
};
|
|
3310
|
-
break;
|
|
3311
|
-
default:
|
|
3312
|
-
const parsedBody = parsedOutput.body;
|
|
3313
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3314
|
-
response = {
|
|
3315
|
-
...parsedBody,
|
|
3316
|
-
name: `${errorCode}`,
|
|
3317
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3318
|
-
$fault: "client",
|
|
3319
|
-
$metadata: deserializeMetadata(output),
|
|
3320
|
-
} as any;
|
|
3321
|
-
}
|
|
3322
|
-
const message = response.message || response.Message || errorCode;
|
|
3323
|
-
response.message = message;
|
|
3324
|
-
delete response.Message;
|
|
3325
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3326
|
-
};
|
|
3327
|
-
|
|
3328
|
-
export const deserializeAws_restJson1UpdateResponsePlanCommand = async (
|
|
3329
|
-
output: __HttpResponse,
|
|
3330
|
-
context: __SerdeContext
|
|
3331
|
-
): Promise<UpdateResponsePlanCommandOutput> => {
|
|
3332
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
3333
|
-
return deserializeAws_restJson1UpdateResponsePlanCommandError(output, context);
|
|
3334
|
-
}
|
|
3335
|
-
const contents: UpdateResponsePlanCommandOutput = {
|
|
3336
|
-
$metadata: deserializeMetadata(output),
|
|
3337
|
-
};
|
|
3338
|
-
await collectBody(output.body, context);
|
|
3339
|
-
return Promise.resolve(contents);
|
|
3340
|
-
};
|
|
3341
|
-
|
|
3342
|
-
const deserializeAws_restJson1UpdateResponsePlanCommandError = async (
|
|
3343
|
-
output: __HttpResponse,
|
|
3344
|
-
context: __SerdeContext
|
|
3345
|
-
): Promise<UpdateResponsePlanCommandOutput> => {
|
|
3346
|
-
const parsedOutput: any = {
|
|
3347
|
-
...output,
|
|
3348
|
-
body: await parseBody(output.body, context),
|
|
3349
|
-
};
|
|
3350
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3351
|
-
let errorCode = "UnknownError";
|
|
3352
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3353
|
-
switch (errorCode) {
|
|
3354
|
-
case "AccessDeniedException":
|
|
3355
|
-
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
3356
|
-
response = {
|
|
3357
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
3358
|
-
name: errorCode,
|
|
3359
|
-
$metadata: deserializeMetadata(output),
|
|
3360
|
-
};
|
|
3361
|
-
break;
|
|
3362
|
-
case "ConflictException":
|
|
3363
|
-
case "com.amazonaws.ssmincidents#ConflictException":
|
|
3364
|
-
response = {
|
|
3365
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
3366
|
-
name: errorCode,
|
|
3367
|
-
$metadata: deserializeMetadata(output),
|
|
3368
|
-
};
|
|
3369
|
-
break;
|
|
3370
|
-
case "InternalServerException":
|
|
3371
|
-
case "com.amazonaws.ssmincidents#InternalServerException":
|
|
3372
|
-
response = {
|
|
3373
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
3374
|
-
name: errorCode,
|
|
3375
|
-
$metadata: deserializeMetadata(output),
|
|
3376
|
-
};
|
|
3377
|
-
break;
|
|
3378
|
-
case "ResourceNotFoundException":
|
|
3379
|
-
case "com.amazonaws.ssmincidents#ResourceNotFoundException":
|
|
3380
|
-
response = {
|
|
3381
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
3382
|
-
name: errorCode,
|
|
3383
|
-
$metadata: deserializeMetadata(output),
|
|
3384
|
-
};
|
|
3385
|
-
break;
|
|
3386
|
-
case "ThrottlingException":
|
|
3387
|
-
case "com.amazonaws.ssmincidents#ThrottlingException":
|
|
3388
|
-
response = {
|
|
3389
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
3390
|
-
name: errorCode,
|
|
3391
|
-
$metadata: deserializeMetadata(output),
|
|
3392
|
-
};
|
|
3393
|
-
break;
|
|
3394
|
-
case "ValidationException":
|
|
3395
|
-
case "com.amazonaws.ssmincidents#ValidationException":
|
|
3396
|
-
response = {
|
|
3397
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
3398
|
-
name: errorCode,
|
|
3399
|
-
$metadata: deserializeMetadata(output),
|
|
3400
|
-
};
|
|
3401
|
-
break;
|
|
3402
|
-
default:
|
|
3403
|
-
const parsedBody = parsedOutput.body;
|
|
3404
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3405
|
-
response = {
|
|
3406
|
-
...parsedBody,
|
|
3407
|
-
name: `${errorCode}`,
|
|
3408
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3409
|
-
$fault: "client",
|
|
3410
|
-
$metadata: deserializeMetadata(output),
|
|
3411
|
-
} as any;
|
|
3412
|
-
}
|
|
3413
|
-
const message = response.message || response.Message || errorCode;
|
|
3414
|
-
response.message = message;
|
|
3415
|
-
delete response.Message;
|
|
3416
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3417
|
-
};
|
|
3418
|
-
|
|
3419
|
-
export const deserializeAws_restJson1UpdateTimelineEventCommand = async (
|
|
3420
|
-
output: __HttpResponse,
|
|
3421
|
-
context: __SerdeContext
|
|
3422
|
-
): Promise<UpdateTimelineEventCommandOutput> => {
|
|
3423
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
3424
|
-
return deserializeAws_restJson1UpdateTimelineEventCommandError(output, context);
|
|
3425
|
-
}
|
|
3426
|
-
const contents: UpdateTimelineEventCommandOutput = {
|
|
3427
|
-
$metadata: deserializeMetadata(output),
|
|
3428
|
-
};
|
|
3429
|
-
await collectBody(output.body, context);
|
|
3430
|
-
return Promise.resolve(contents);
|
|
3431
|
-
};
|
|
3432
|
-
|
|
3433
|
-
const deserializeAws_restJson1UpdateTimelineEventCommandError = async (
|
|
3434
|
-
output: __HttpResponse,
|
|
3435
|
-
context: __SerdeContext
|
|
3436
|
-
): Promise<UpdateTimelineEventCommandOutput> => {
|
|
3437
|
-
const parsedOutput: any = {
|
|
3438
|
-
...output,
|
|
3439
|
-
body: await parseBody(output.body, context),
|
|
3440
|
-
};
|
|
3441
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3442
|
-
let errorCode = "UnknownError";
|
|
3443
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3444
|
-
switch (errorCode) {
|
|
3445
|
-
case "AccessDeniedException":
|
|
3446
|
-
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
3447
|
-
response = {
|
|
3448
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
3449
|
-
name: errorCode,
|
|
3450
|
-
$metadata: deserializeMetadata(output),
|
|
3451
|
-
};
|
|
3452
|
-
break;
|
|
3453
|
-
case "ConflictException":
|
|
3454
|
-
case "com.amazonaws.ssmincidents#ConflictException":
|
|
3455
|
-
response = {
|
|
3456
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
3457
|
-
name: errorCode,
|
|
3458
|
-
$metadata: deserializeMetadata(output),
|
|
3459
|
-
};
|
|
3460
|
-
break;
|
|
3461
|
-
case "InternalServerException":
|
|
3462
|
-
case "com.amazonaws.ssmincidents#InternalServerException":
|
|
3463
|
-
response = {
|
|
3464
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
3465
|
-
name: errorCode,
|
|
3466
|
-
$metadata: deserializeMetadata(output),
|
|
3467
|
-
};
|
|
3468
|
-
break;
|
|
3469
|
-
case "ResourceNotFoundException":
|
|
3470
|
-
case "com.amazonaws.ssmincidents#ResourceNotFoundException":
|
|
3471
|
-
response = {
|
|
3472
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
3473
|
-
name: errorCode,
|
|
3474
|
-
$metadata: deserializeMetadata(output),
|
|
3475
|
-
};
|
|
3476
|
-
break;
|
|
3477
|
-
case "ThrottlingException":
|
|
3478
|
-
case "com.amazonaws.ssmincidents#ThrottlingException":
|
|
3479
|
-
response = {
|
|
3480
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
3481
|
-
name: errorCode,
|
|
3482
|
-
$metadata: deserializeMetadata(output),
|
|
3483
|
-
};
|
|
3484
|
-
break;
|
|
3485
|
-
case "ValidationException":
|
|
3486
|
-
case "com.amazonaws.ssmincidents#ValidationException":
|
|
3487
|
-
response = {
|
|
3488
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
3489
|
-
name: errorCode,
|
|
3490
|
-
$metadata: deserializeMetadata(output),
|
|
3491
|
-
};
|
|
3492
|
-
break;
|
|
3493
|
-
default:
|
|
3494
|
-
const parsedBody = parsedOutput.body;
|
|
3495
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3496
|
-
response = {
|
|
3497
|
-
...parsedBody,
|
|
3498
|
-
name: `${errorCode}`,
|
|
3499
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3500
|
-
$fault: "client",
|
|
3501
|
-
$metadata: deserializeMetadata(output),
|
|
3502
|
-
} as any;
|
|
3503
|
-
}
|
|
3504
|
-
const message = response.message || response.Message || errorCode;
|
|
3505
|
-
response.message = message;
|
|
3506
|
-
delete response.Message;
|
|
3507
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3508
|
-
};
|
|
3509
|
-
|
|
3510
|
-
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (
|
|
3511
|
-
parsedOutput: any,
|
|
3512
|
-
context: __SerdeContext
|
|
3513
|
-
): Promise<AccessDeniedException> => {
|
|
3514
|
-
const contents: AccessDeniedException = {
|
|
3515
|
-
name: "AccessDeniedException",
|
|
3516
|
-
$fault: "client",
|
|
3517
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3518
|
-
message: undefined,
|
|
3519
|
-
};
|
|
3520
|
-
const data: any = parsedOutput.body;
|
|
3521
|
-
if (data.message !== undefined && data.message !== null) {
|
|
3522
|
-
contents.message = __expectString(data.message);
|
|
3523
|
-
}
|
|
3524
|
-
return contents;
|
|
3525
|
-
};
|
|
3526
|
-
|
|
3527
|
-
const deserializeAws_restJson1ConflictExceptionResponse = async (
|
|
3528
|
-
parsedOutput: any,
|
|
3529
|
-
context: __SerdeContext
|
|
3530
|
-
): Promise<ConflictException> => {
|
|
3531
|
-
const contents: ConflictException = {
|
|
3532
|
-
name: "ConflictException",
|
|
3533
|
-
$fault: "client",
|
|
3534
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3535
|
-
message: undefined,
|
|
3536
|
-
resourceIdentifier: undefined,
|
|
3537
|
-
resourceType: undefined,
|
|
3538
|
-
};
|
|
3539
|
-
const data: any = parsedOutput.body;
|
|
3540
|
-
if (data.message !== undefined && data.message !== null) {
|
|
3541
|
-
contents.message = __expectString(data.message);
|
|
3542
|
-
}
|
|
3543
|
-
if (data.resourceIdentifier !== undefined && data.resourceIdentifier !== null) {
|
|
3544
|
-
contents.resourceIdentifier = __expectString(data.resourceIdentifier);
|
|
3545
|
-
}
|
|
3546
|
-
if (data.resourceType !== undefined && data.resourceType !== null) {
|
|
3547
|
-
contents.resourceType = __expectString(data.resourceType);
|
|
3548
|
-
}
|
|
3549
|
-
return contents;
|
|
3550
|
-
};
|
|
3551
|
-
|
|
3552
|
-
const deserializeAws_restJson1InternalServerExceptionResponse = async (
|
|
3553
|
-
parsedOutput: any,
|
|
3554
|
-
context: __SerdeContext
|
|
3555
|
-
): Promise<InternalServerException> => {
|
|
3556
|
-
const contents: InternalServerException = {
|
|
3557
|
-
name: "InternalServerException",
|
|
3558
|
-
$fault: "server",
|
|
3559
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3560
|
-
message: undefined,
|
|
3561
|
-
};
|
|
3562
|
-
const data: any = parsedOutput.body;
|
|
3563
|
-
if (data.message !== undefined && data.message !== null) {
|
|
3564
|
-
contents.message = __expectString(data.message);
|
|
3565
|
-
}
|
|
3566
|
-
return contents;
|
|
3567
|
-
};
|
|
3568
|
-
|
|
3569
|
-
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (
|
|
3570
|
-
parsedOutput: any,
|
|
3571
|
-
context: __SerdeContext
|
|
3572
|
-
): Promise<ResourceNotFoundException> => {
|
|
3573
|
-
const contents: ResourceNotFoundException = {
|
|
3574
|
-
name: "ResourceNotFoundException",
|
|
3575
|
-
$fault: "client",
|
|
3576
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3577
|
-
message: undefined,
|
|
3578
|
-
resourceIdentifier: undefined,
|
|
3579
|
-
resourceType: undefined,
|
|
3580
|
-
};
|
|
3581
|
-
const data: any = parsedOutput.body;
|
|
3582
|
-
if (data.message !== undefined && data.message !== null) {
|
|
3583
|
-
contents.message = __expectString(data.message);
|
|
3584
|
-
}
|
|
3585
|
-
if (data.resourceIdentifier !== undefined && data.resourceIdentifier !== null) {
|
|
3586
|
-
contents.resourceIdentifier = __expectString(data.resourceIdentifier);
|
|
3587
|
-
}
|
|
3588
|
-
if (data.resourceType !== undefined && data.resourceType !== null) {
|
|
3589
|
-
contents.resourceType = __expectString(data.resourceType);
|
|
3590
|
-
}
|
|
3591
|
-
return contents;
|
|
3592
|
-
};
|
|
3593
|
-
|
|
3594
|
-
const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (
|
|
3595
|
-
parsedOutput: any,
|
|
3596
|
-
context: __SerdeContext
|
|
3597
|
-
): Promise<ServiceQuotaExceededException> => {
|
|
3598
|
-
const contents: ServiceQuotaExceededException = {
|
|
3599
|
-
name: "ServiceQuotaExceededException",
|
|
3600
|
-
$fault: "client",
|
|
3601
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3602
|
-
message: undefined,
|
|
3603
|
-
quotaCode: undefined,
|
|
3604
|
-
resourceIdentifier: undefined,
|
|
3605
|
-
resourceType: undefined,
|
|
3606
|
-
serviceCode: undefined,
|
|
3607
|
-
};
|
|
3608
|
-
const data: any = parsedOutput.body;
|
|
3609
|
-
if (data.message !== undefined && data.message !== null) {
|
|
3610
|
-
contents.message = __expectString(data.message);
|
|
3611
|
-
}
|
|
3612
|
-
if (data.quotaCode !== undefined && data.quotaCode !== null) {
|
|
3613
|
-
contents.quotaCode = __expectString(data.quotaCode);
|
|
3614
|
-
}
|
|
3615
|
-
if (data.resourceIdentifier !== undefined && data.resourceIdentifier !== null) {
|
|
3616
|
-
contents.resourceIdentifier = __expectString(data.resourceIdentifier);
|
|
3617
|
-
}
|
|
3618
|
-
if (data.resourceType !== undefined && data.resourceType !== null) {
|
|
3619
|
-
contents.resourceType = __expectString(data.resourceType);
|
|
3620
|
-
}
|
|
3621
|
-
if (data.serviceCode !== undefined && data.serviceCode !== null) {
|
|
3622
|
-
contents.serviceCode = __expectString(data.serviceCode);
|
|
3623
|
-
}
|
|
3624
|
-
return contents;
|
|
3625
|
-
};
|
|
3626
|
-
|
|
3627
|
-
const deserializeAws_restJson1ThrottlingExceptionResponse = async (
|
|
3628
|
-
parsedOutput: any,
|
|
3629
|
-
context: __SerdeContext
|
|
3630
|
-
): Promise<ThrottlingException> => {
|
|
3631
|
-
const contents: ThrottlingException = {
|
|
3632
|
-
name: "ThrottlingException",
|
|
3633
|
-
$fault: "client",
|
|
3634
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3635
|
-
message: undefined,
|
|
3636
|
-
quotaCode: undefined,
|
|
3637
|
-
serviceCode: undefined,
|
|
3638
|
-
};
|
|
3639
|
-
const data: any = parsedOutput.body;
|
|
3640
|
-
if (data.message !== undefined && data.message !== null) {
|
|
3641
|
-
contents.message = __expectString(data.message);
|
|
3642
|
-
}
|
|
3643
|
-
if (data.quotaCode !== undefined && data.quotaCode !== null) {
|
|
3644
|
-
contents.quotaCode = __expectString(data.quotaCode);
|
|
3645
|
-
}
|
|
3646
|
-
if (data.serviceCode !== undefined && data.serviceCode !== null) {
|
|
3647
|
-
contents.serviceCode = __expectString(data.serviceCode);
|
|
3648
|
-
}
|
|
3649
|
-
return contents;
|
|
3650
|
-
};
|
|
3651
|
-
|
|
3652
|
-
const deserializeAws_restJson1ValidationExceptionResponse = async (
|
|
3653
|
-
parsedOutput: any,
|
|
3654
|
-
context: __SerdeContext
|
|
3655
|
-
): Promise<ValidationException> => {
|
|
3656
|
-
const contents: ValidationException = {
|
|
3657
|
-
name: "ValidationException",
|
|
3658
|
-
$fault: "client",
|
|
3659
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3660
|
-
message: undefined,
|
|
3661
|
-
};
|
|
3662
|
-
const data: any = parsedOutput.body;
|
|
3663
|
-
if (data.message !== undefined && data.message !== null) {
|
|
3664
|
-
contents.message = __expectString(data.message);
|
|
3665
|
-
}
|
|
3666
|
-
return contents;
|
|
3667
|
-
};
|
|
3668
|
-
|
|
3669
|
-
const serializeAws_restJson1Action = (input: Action, context: __SerdeContext): any => {
|
|
3670
|
-
return Action.visit(input, {
|
|
3671
|
-
ssmAutomation: (value) => ({ ssmAutomation: serializeAws_restJson1SsmAutomation(value, context) }),
|
|
3672
|
-
_: (name, value) => ({ name: value } as any),
|
|
3673
|
-
});
|
|
3674
|
-
};
|
|
3675
|
-
|
|
3676
|
-
const serializeAws_restJson1ActionsList = (input: Action[], context: __SerdeContext): any => {
|
|
3677
|
-
return input
|
|
3678
|
-
.filter((e: any) => e != null)
|
|
3679
|
-
.map((entry) => {
|
|
3680
|
-
if (entry === null) {
|
|
3681
|
-
return null as any;
|
|
3682
|
-
}
|
|
3683
|
-
return serializeAws_restJson1Action(entry, context);
|
|
3684
|
-
});
|
|
3685
|
-
};
|
|
3686
|
-
|
|
3687
|
-
const serializeAws_restJson1AddRegionAction = (input: AddRegionAction, context: __SerdeContext): any => {
|
|
3688
|
-
return {
|
|
3689
|
-
...(input.regionName !== undefined && input.regionName !== null && { regionName: input.regionName }),
|
|
3690
|
-
...(input.sseKmsKeyId !== undefined && input.sseKmsKeyId !== null && { sseKmsKeyId: input.sseKmsKeyId }),
|
|
3691
|
-
};
|
|
3692
|
-
};
|
|
3693
|
-
|
|
3694
|
-
const serializeAws_restJson1AttributeValueList = (input: AttributeValueList, context: __SerdeContext): any => {
|
|
3695
|
-
return AttributeValueList.visit(input, {
|
|
3696
|
-
integerValues: (value) => ({ integerValues: serializeAws_restJson1IntegerList(value, context) }),
|
|
3697
|
-
stringValues: (value) => ({ stringValues: serializeAws_restJson1StringList(value, context) }),
|
|
3698
|
-
_: (name, value) => ({ name: value } as any),
|
|
3699
|
-
});
|
|
3700
|
-
};
|
|
3701
|
-
|
|
3702
|
-
const serializeAws_restJson1ChatbotSnsConfigurationSet = (input: string[], context: __SerdeContext): any => {
|
|
3703
|
-
return input
|
|
3704
|
-
.filter((e: any) => e != null)
|
|
3705
|
-
.map((entry) => {
|
|
3706
|
-
if (entry === null) {
|
|
3707
|
-
return null as any;
|
|
3708
|
-
}
|
|
3709
|
-
return entry;
|
|
3710
|
-
});
|
|
3711
|
-
};
|
|
3712
|
-
|
|
3713
|
-
const serializeAws_restJson1ChatChannel = (input: ChatChannel, context: __SerdeContext): any => {
|
|
3714
|
-
return ChatChannel.visit(input, {
|
|
3715
|
-
chatbotSns: (value) => ({ chatbotSns: serializeAws_restJson1ChatbotSnsConfigurationSet(value, context) }),
|
|
3716
|
-
empty: (value) => ({ empty: serializeAws_restJson1EmptyChatChannel(value, context) }),
|
|
3717
|
-
_: (name, value) => ({ name: value } as any),
|
|
3718
|
-
});
|
|
3719
|
-
};
|
|
3720
|
-
|
|
3721
|
-
const serializeAws_restJson1Condition = (input: Condition, context: __SerdeContext): any => {
|
|
3722
|
-
return Condition.visit(input, {
|
|
3723
|
-
after: (value) => ({ after: Math.round(value.getTime() / 1000) }),
|
|
3724
|
-
before: (value) => ({ before: Math.round(value.getTime() / 1000) }),
|
|
3725
|
-
equals: (value) => ({ equals: serializeAws_restJson1AttributeValueList(value, context) }),
|
|
3726
|
-
_: (name, value) => ({ name: value } as any),
|
|
3727
|
-
});
|
|
3728
|
-
};
|
|
3729
|
-
|
|
3730
|
-
const serializeAws_restJson1DeleteRegionAction = (input: DeleteRegionAction, context: __SerdeContext): any => {
|
|
3731
|
-
return {
|
|
3732
|
-
...(input.regionName !== undefined && input.regionName !== null && { regionName: input.regionName }),
|
|
3733
|
-
};
|
|
3734
|
-
};
|
|
3735
|
-
|
|
3736
|
-
const serializeAws_restJson1EmptyChatChannel = (input: EmptyChatChannel, context: __SerdeContext): any => {
|
|
3737
|
-
return {};
|
|
3738
|
-
};
|
|
3739
|
-
|
|
3740
|
-
const serializeAws_restJson1EngagementSet = (input: string[], context: __SerdeContext): any => {
|
|
3741
|
-
return input
|
|
3742
|
-
.filter((e: any) => e != null)
|
|
3743
|
-
.map((entry) => {
|
|
3744
|
-
if (entry === null) {
|
|
3745
|
-
return null as any;
|
|
3746
|
-
}
|
|
3747
|
-
return entry;
|
|
3748
|
-
});
|
|
3749
|
-
};
|
|
3750
|
-
|
|
3751
|
-
const serializeAws_restJson1Filter = (input: Filter, context: __SerdeContext): any => {
|
|
3752
|
-
return {
|
|
3753
|
-
...(input.condition !== undefined &&
|
|
3754
|
-
input.condition !== null && { condition: serializeAws_restJson1Condition(input.condition, context) }),
|
|
3755
|
-
...(input.key !== undefined && input.key !== null && { key: input.key }),
|
|
3756
|
-
};
|
|
3757
|
-
};
|
|
3758
|
-
|
|
3759
|
-
const serializeAws_restJson1FilterList = (input: Filter[], context: __SerdeContext): any => {
|
|
3760
|
-
return input
|
|
3761
|
-
.filter((e: any) => e != null)
|
|
3762
|
-
.map((entry) => {
|
|
3763
|
-
if (entry === null) {
|
|
3764
|
-
return null as any;
|
|
3765
|
-
}
|
|
3766
|
-
return serializeAws_restJson1Filter(entry, context);
|
|
3767
|
-
});
|
|
3768
|
-
};
|
|
3769
|
-
|
|
3770
|
-
const serializeAws_restJson1IncidentTemplate = (input: IncidentTemplate, context: __SerdeContext): any => {
|
|
3771
|
-
return {
|
|
3772
|
-
...(input.dedupeString !== undefined && input.dedupeString !== null && { dedupeString: input.dedupeString }),
|
|
3773
|
-
...(input.impact !== undefined && input.impact !== null && { impact: input.impact }),
|
|
3774
|
-
...(input.notificationTargets !== undefined &&
|
|
3775
|
-
input.notificationTargets !== null && {
|
|
3776
|
-
notificationTargets: serializeAws_restJson1NotificationTargetSet(input.notificationTargets, context),
|
|
3777
|
-
}),
|
|
3778
|
-
...(input.summary !== undefined && input.summary !== null && { summary: input.summary }),
|
|
3779
|
-
...(input.title !== undefined && input.title !== null && { title: input.title }),
|
|
3780
|
-
};
|
|
3781
|
-
};
|
|
3782
|
-
|
|
3783
|
-
const serializeAws_restJson1IntegerList = (input: number[], context: __SerdeContext): any => {
|
|
3784
|
-
return input
|
|
3785
|
-
.filter((e: any) => e != null)
|
|
3786
|
-
.map((entry) => {
|
|
3787
|
-
if (entry === null) {
|
|
3788
|
-
return null as any;
|
|
3789
|
-
}
|
|
3790
|
-
return entry;
|
|
3791
|
-
});
|
|
3792
|
-
};
|
|
3793
|
-
|
|
3794
|
-
const serializeAws_restJson1ItemIdentifier = (input: ItemIdentifier, context: __SerdeContext): any => {
|
|
3795
|
-
return {
|
|
3796
|
-
...(input.type !== undefined && input.type !== null && { type: input.type }),
|
|
3797
|
-
...(input.value !== undefined &&
|
|
3798
|
-
input.value !== null && { value: serializeAws_restJson1ItemValue(input.value, context) }),
|
|
3799
|
-
};
|
|
3800
|
-
};
|
|
3801
|
-
|
|
3802
|
-
const serializeAws_restJson1ItemValue = (input: ItemValue, context: __SerdeContext): any => {
|
|
3803
|
-
return ItemValue.visit(input, {
|
|
3804
|
-
arn: (value) => ({ arn: value }),
|
|
3805
|
-
metricDefinition: (value) => ({ metricDefinition: value }),
|
|
3806
|
-
url: (value) => ({ url: value }),
|
|
3807
|
-
_: (name, value) => ({ name: value } as any),
|
|
3808
|
-
});
|
|
3809
|
-
};
|
|
3810
|
-
|
|
3811
|
-
const serializeAws_restJson1NotificationTargetItem = (input: NotificationTargetItem, context: __SerdeContext): any => {
|
|
3812
|
-
return NotificationTargetItem.visit(input, {
|
|
3813
|
-
snsTopicArn: (value) => ({ snsTopicArn: value }),
|
|
3814
|
-
_: (name, value) => ({ name: value } as any),
|
|
3815
|
-
});
|
|
3816
|
-
};
|
|
3817
|
-
|
|
3818
|
-
const serializeAws_restJson1NotificationTargetSet = (input: NotificationTargetItem[], context: __SerdeContext): any => {
|
|
3819
|
-
return input
|
|
3820
|
-
.filter((e: any) => e != null)
|
|
3821
|
-
.map((entry) => {
|
|
3822
|
-
if (entry === null) {
|
|
3823
|
-
return null as any;
|
|
3824
|
-
}
|
|
3825
|
-
return serializeAws_restJson1NotificationTargetItem(entry, context);
|
|
3826
|
-
});
|
|
3827
|
-
};
|
|
3828
|
-
|
|
3829
|
-
const serializeAws_restJson1RegionMapInput = (
|
|
3830
|
-
input: { [key: string]: RegionMapInputValue },
|
|
3831
|
-
context: __SerdeContext
|
|
3832
|
-
): any => {
|
|
3833
|
-
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
|
|
3834
|
-
if (value === null) {
|
|
3835
|
-
return acc;
|
|
3836
|
-
}
|
|
3837
|
-
return {
|
|
3838
|
-
...acc,
|
|
3839
|
-
[key]: serializeAws_restJson1RegionMapInputValue(value, context),
|
|
3840
|
-
};
|
|
3841
|
-
}, {});
|
|
3842
|
-
};
|
|
3843
|
-
|
|
3844
|
-
const serializeAws_restJson1RegionMapInputValue = (input: RegionMapInputValue, context: __SerdeContext): any => {
|
|
3845
|
-
return {
|
|
3846
|
-
...(input.sseKmsKeyId !== undefined && input.sseKmsKeyId !== null && { sseKmsKeyId: input.sseKmsKeyId }),
|
|
3847
|
-
};
|
|
3848
|
-
};
|
|
3849
|
-
|
|
3850
|
-
const serializeAws_restJson1RelatedItem = (input: RelatedItem, context: __SerdeContext): any => {
|
|
3851
|
-
return {
|
|
3852
|
-
...(input.identifier !== undefined &&
|
|
3853
|
-
input.identifier !== null && { identifier: serializeAws_restJson1ItemIdentifier(input.identifier, context) }),
|
|
3854
|
-
...(input.title !== undefined && input.title !== null && { title: input.title }),
|
|
3855
|
-
};
|
|
3856
|
-
};
|
|
3857
|
-
|
|
3858
|
-
const serializeAws_restJson1RelatedItemList = (input: RelatedItem[], context: __SerdeContext): any => {
|
|
3859
|
-
return input
|
|
3860
|
-
.filter((e: any) => e != null)
|
|
3861
|
-
.map((entry) => {
|
|
3862
|
-
if (entry === null) {
|
|
3863
|
-
return null as any;
|
|
3864
|
-
}
|
|
3865
|
-
return serializeAws_restJson1RelatedItem(entry, context);
|
|
3866
|
-
});
|
|
3867
|
-
};
|
|
3868
|
-
|
|
3869
|
-
const serializeAws_restJson1RelatedItemsUpdate = (input: RelatedItemsUpdate, context: __SerdeContext): any => {
|
|
3870
|
-
return RelatedItemsUpdate.visit(input, {
|
|
3871
|
-
itemToAdd: (value) => ({ itemToAdd: serializeAws_restJson1RelatedItem(value, context) }),
|
|
3872
|
-
itemToRemove: (value) => ({ itemToRemove: serializeAws_restJson1ItemIdentifier(value, context) }),
|
|
3873
|
-
_: (name, value) => ({ name: value } as any),
|
|
3874
|
-
});
|
|
3875
|
-
};
|
|
3876
|
-
|
|
3877
|
-
const serializeAws_restJson1SsmAutomation = (input: SsmAutomation, context: __SerdeContext): any => {
|
|
3878
|
-
return {
|
|
3879
|
-
...(input.documentName !== undefined && input.documentName !== null && { documentName: input.documentName }),
|
|
3880
|
-
...(input.documentVersion !== undefined &&
|
|
3881
|
-
input.documentVersion !== null && { documentVersion: input.documentVersion }),
|
|
3882
|
-
...(input.parameters !== undefined &&
|
|
3883
|
-
input.parameters !== null && { parameters: serializeAws_restJson1SsmParameters(input.parameters, context) }),
|
|
3884
|
-
...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }),
|
|
3885
|
-
...(input.targetAccount !== undefined && input.targetAccount !== null && { targetAccount: input.targetAccount }),
|
|
3886
|
-
};
|
|
3887
|
-
};
|
|
3888
|
-
|
|
3889
|
-
const serializeAws_restJson1SsmParameters = (input: { [key: string]: string[] }, context: __SerdeContext): any => {
|
|
3890
|
-
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
|
|
3891
|
-
if (value === null) {
|
|
3892
|
-
return acc;
|
|
3893
|
-
}
|
|
3894
|
-
return {
|
|
3895
|
-
...acc,
|
|
3896
|
-
[key]: serializeAws_restJson1SsmParameterValues(value, context),
|
|
3897
|
-
};
|
|
3898
|
-
}, {});
|
|
3899
|
-
};
|
|
3900
|
-
|
|
3901
|
-
const serializeAws_restJson1SsmParameterValues = (input: string[], context: __SerdeContext): any => {
|
|
3902
|
-
return input
|
|
3903
|
-
.filter((e: any) => e != null)
|
|
3904
|
-
.map((entry) => {
|
|
3905
|
-
if (entry === null) {
|
|
3906
|
-
return null as any;
|
|
3907
|
-
}
|
|
3908
|
-
return entry;
|
|
3909
|
-
});
|
|
3910
|
-
};
|
|
3911
|
-
|
|
3912
|
-
const serializeAws_restJson1StringList = (input: string[], context: __SerdeContext): any => {
|
|
3913
|
-
return input
|
|
3914
|
-
.filter((e: any) => e != null)
|
|
3915
|
-
.map((entry) => {
|
|
3916
|
-
if (entry === null) {
|
|
3917
|
-
return null as any;
|
|
3918
|
-
}
|
|
3919
|
-
return entry;
|
|
3920
|
-
});
|
|
3921
|
-
};
|
|
3922
|
-
|
|
3923
|
-
const serializeAws_restJson1TagMap = (input: { [key: string]: string }, context: __SerdeContext): any => {
|
|
3924
|
-
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
|
|
3925
|
-
if (value === null) {
|
|
3926
|
-
return acc;
|
|
3927
|
-
}
|
|
3928
|
-
return {
|
|
3929
|
-
...acc,
|
|
3930
|
-
[key]: value,
|
|
3931
|
-
};
|
|
3932
|
-
}, {});
|
|
3933
|
-
};
|
|
3934
|
-
|
|
3935
|
-
const serializeAws_restJson1TriggerDetails = (input: TriggerDetails, context: __SerdeContext): any => {
|
|
3936
|
-
return {
|
|
3937
|
-
...(input.rawData !== undefined && input.rawData !== null && { rawData: input.rawData }),
|
|
3938
|
-
...(input.source !== undefined && input.source !== null && { source: input.source }),
|
|
3939
|
-
...(input.timestamp !== undefined &&
|
|
3940
|
-
input.timestamp !== null && { timestamp: Math.round(input.timestamp.getTime() / 1000) }),
|
|
3941
|
-
...(input.triggerArn !== undefined && input.triggerArn !== null && { triggerArn: input.triggerArn }),
|
|
3942
|
-
};
|
|
3943
|
-
};
|
|
3944
|
-
|
|
3945
|
-
const serializeAws_restJson1UpdateActionList = (input: UpdateReplicationSetAction[], context: __SerdeContext): any => {
|
|
3946
|
-
return input
|
|
3947
|
-
.filter((e: any) => e != null)
|
|
3948
|
-
.map((entry) => {
|
|
3949
|
-
if (entry === null) {
|
|
3950
|
-
return null as any;
|
|
3951
|
-
}
|
|
3952
|
-
return serializeAws_restJson1UpdateReplicationSetAction(entry, context);
|
|
3953
|
-
});
|
|
3954
|
-
};
|
|
3955
|
-
|
|
3956
|
-
const serializeAws_restJson1UpdateReplicationSetAction = (
|
|
3957
|
-
input: UpdateReplicationSetAction,
|
|
3958
|
-
context: __SerdeContext
|
|
3959
|
-
): any => {
|
|
3960
|
-
return UpdateReplicationSetAction.visit(input, {
|
|
3961
|
-
addRegionAction: (value) => ({ addRegionAction: serializeAws_restJson1AddRegionAction(value, context) }),
|
|
3962
|
-
deleteRegionAction: (value) => ({ deleteRegionAction: serializeAws_restJson1DeleteRegionAction(value, context) }),
|
|
3963
|
-
_: (name, value) => ({ name: value } as any),
|
|
3964
|
-
});
|
|
3965
|
-
};
|
|
3966
|
-
|
|
3967
|
-
const deserializeAws_restJson1Action = (output: any, context: __SerdeContext): Action => {
|
|
3968
|
-
if (output.ssmAutomation !== undefined && output.ssmAutomation !== null) {
|
|
3969
|
-
return {
|
|
3970
|
-
ssmAutomation: deserializeAws_restJson1SsmAutomation(output.ssmAutomation, context),
|
|
3971
|
-
};
|
|
3972
|
-
}
|
|
3973
|
-
return { $unknown: Object.entries(output)[0] };
|
|
3974
|
-
};
|
|
3975
|
-
|
|
3976
|
-
const deserializeAws_restJson1ActionsList = (output: any, context: __SerdeContext): Action[] => {
|
|
3977
|
-
return (output || [])
|
|
3978
|
-
.filter((e: any) => e != null)
|
|
3979
|
-
.map((entry: any) => {
|
|
3980
|
-
if (entry === null) {
|
|
3981
|
-
return null as any;
|
|
3982
|
-
}
|
|
3983
|
-
return deserializeAws_restJson1Action(__expectUnion(entry), context);
|
|
3984
|
-
});
|
|
3985
|
-
};
|
|
3986
|
-
|
|
3987
|
-
const deserializeAws_restJson1AutomationExecution = (output: any, context: __SerdeContext): AutomationExecution => {
|
|
3988
|
-
if (__expectString(output.ssmExecutionArn) !== undefined) {
|
|
3989
|
-
return { ssmExecutionArn: __expectString(output.ssmExecutionArn) as any };
|
|
3990
|
-
}
|
|
3991
|
-
return { $unknown: Object.entries(output)[0] };
|
|
3992
|
-
};
|
|
3993
|
-
|
|
3994
|
-
const deserializeAws_restJson1AutomationExecutionSet = (
|
|
3995
|
-
output: any,
|
|
3996
|
-
context: __SerdeContext
|
|
3997
|
-
): AutomationExecution[] => {
|
|
3998
|
-
const uniqueValues = new Set<any>();
|
|
3999
|
-
return (output || [])
|
|
4000
|
-
.filter((e: any) => e != null)
|
|
4001
|
-
.map((entry: any) => {
|
|
4002
|
-
if (entry === null) {
|
|
4003
|
-
return null as any;
|
|
4004
|
-
}
|
|
4005
|
-
const parsedEntry = deserializeAws_restJson1AutomationExecution(__expectUnion(entry), context);
|
|
4006
|
-
if (uniqueValues.has(parsedEntry)) {
|
|
4007
|
-
throw new TypeError(
|
|
4008
|
-
'All elements of the set "com.amazonaws.ssmincidents#AutomationExecutionSet" must be unique.'
|
|
4009
|
-
);
|
|
4010
|
-
} else {
|
|
4011
|
-
uniqueValues.add(parsedEntry);
|
|
4012
|
-
return parsedEntry;
|
|
4013
|
-
}
|
|
4014
|
-
});
|
|
4015
|
-
};
|
|
4016
|
-
|
|
4017
|
-
const deserializeAws_restJson1ChatbotSnsConfigurationSet = (output: any, context: __SerdeContext): string[] => {
|
|
4018
|
-
const uniqueValues = new Set<any>();
|
|
4019
|
-
return (output || [])
|
|
4020
|
-
.filter((e: any) => e != null)
|
|
4021
|
-
.map((entry: any) => {
|
|
4022
|
-
if (entry === null) {
|
|
4023
|
-
return null as any;
|
|
4024
|
-
}
|
|
4025
|
-
const parsedEntry = __expectString(entry) as any;
|
|
4026
|
-
if (uniqueValues.has(parsedEntry)) {
|
|
4027
|
-
throw new TypeError(
|
|
4028
|
-
'All elements of the set "com.amazonaws.ssmincidents#ChatbotSnsConfigurationSet" must be unique.'
|
|
4029
|
-
);
|
|
4030
|
-
} else {
|
|
4031
|
-
uniqueValues.add(parsedEntry);
|
|
4032
|
-
return parsedEntry;
|
|
4033
|
-
}
|
|
4034
|
-
});
|
|
4035
|
-
};
|
|
4036
|
-
|
|
4037
|
-
const deserializeAws_restJson1ChatChannel = (output: any, context: __SerdeContext): ChatChannel => {
|
|
4038
|
-
if (output.chatbotSns !== undefined && output.chatbotSns !== null) {
|
|
4039
|
-
return {
|
|
4040
|
-
chatbotSns: deserializeAws_restJson1ChatbotSnsConfigurationSet(output.chatbotSns, context),
|
|
4041
|
-
};
|
|
4042
|
-
}
|
|
4043
|
-
if (output.empty !== undefined && output.empty !== null) {
|
|
4044
|
-
return {
|
|
4045
|
-
empty: deserializeAws_restJson1EmptyChatChannel(output.empty, context),
|
|
4046
|
-
};
|
|
4047
|
-
}
|
|
4048
|
-
return { $unknown: Object.entries(output)[0] };
|
|
4049
|
-
};
|
|
4050
|
-
|
|
4051
|
-
const deserializeAws_restJson1EmptyChatChannel = (output: any, context: __SerdeContext): EmptyChatChannel => {
|
|
4052
|
-
return {} as any;
|
|
4053
|
-
};
|
|
4054
|
-
|
|
4055
|
-
const deserializeAws_restJson1EngagementSet = (output: any, context: __SerdeContext): string[] => {
|
|
4056
|
-
const uniqueValues = new Set<any>();
|
|
4057
|
-
return (output || [])
|
|
4058
|
-
.filter((e: any) => e != null)
|
|
4059
|
-
.map((entry: any) => {
|
|
4060
|
-
if (entry === null) {
|
|
4061
|
-
return null as any;
|
|
4062
|
-
}
|
|
4063
|
-
const parsedEntry = __expectString(entry) as any;
|
|
4064
|
-
if (uniqueValues.has(parsedEntry)) {
|
|
4065
|
-
throw new TypeError('All elements of the set "com.amazonaws.ssmincidents#EngagementSet" must be unique.');
|
|
4066
|
-
} else {
|
|
4067
|
-
uniqueValues.add(parsedEntry);
|
|
4068
|
-
return parsedEntry;
|
|
4069
|
-
}
|
|
4070
|
-
});
|
|
4071
|
-
};
|
|
4072
|
-
|
|
4073
|
-
const deserializeAws_restJson1EventSummary = (output: any, context: __SerdeContext): EventSummary => {
|
|
4074
|
-
return {
|
|
4075
|
-
eventId: __expectString(output.eventId),
|
|
4076
|
-
eventTime:
|
|
4077
|
-
output.eventTime !== undefined && output.eventTime !== null
|
|
4078
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.eventTime)))
|
|
4079
|
-
: undefined,
|
|
4080
|
-
eventType: __expectString(output.eventType),
|
|
4081
|
-
eventUpdatedTime:
|
|
4082
|
-
output.eventUpdatedTime !== undefined && output.eventUpdatedTime !== null
|
|
4083
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.eventUpdatedTime)))
|
|
4084
|
-
: undefined,
|
|
4085
|
-
incidentRecordArn: __expectString(output.incidentRecordArn),
|
|
4086
|
-
} as any;
|
|
4087
|
-
};
|
|
4088
|
-
|
|
4089
|
-
const deserializeAws_restJson1EventSummaryList = (output: any, context: __SerdeContext): EventSummary[] => {
|
|
4090
|
-
return (output || [])
|
|
4091
|
-
.filter((e: any) => e != null)
|
|
4092
|
-
.map((entry: any) => {
|
|
4093
|
-
if (entry === null) {
|
|
4094
|
-
return null as any;
|
|
4095
|
-
}
|
|
4096
|
-
return deserializeAws_restJson1EventSummary(entry, context);
|
|
4097
|
-
});
|
|
4098
|
-
};
|
|
4099
|
-
|
|
4100
|
-
const deserializeAws_restJson1IncidentRecord = (output: any, context: __SerdeContext): IncidentRecord => {
|
|
4101
|
-
return {
|
|
4102
|
-
arn: __expectString(output.arn),
|
|
4103
|
-
automationExecutions:
|
|
4104
|
-
output.automationExecutions !== undefined && output.automationExecutions !== null
|
|
4105
|
-
? deserializeAws_restJson1AutomationExecutionSet(output.automationExecutions, context)
|
|
4106
|
-
: undefined,
|
|
4107
|
-
chatChannel:
|
|
4108
|
-
output.chatChannel !== undefined && output.chatChannel !== null
|
|
4109
|
-
? deserializeAws_restJson1ChatChannel(__expectUnion(output.chatChannel), context)
|
|
4110
|
-
: undefined,
|
|
4111
|
-
creationTime:
|
|
4112
|
-
output.creationTime !== undefined && output.creationTime !== null
|
|
4113
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime)))
|
|
4114
|
-
: undefined,
|
|
4115
|
-
dedupeString: __expectString(output.dedupeString),
|
|
4116
|
-
impact: __expectInt32(output.impact),
|
|
4117
|
-
incidentRecordSource:
|
|
4118
|
-
output.incidentRecordSource !== undefined && output.incidentRecordSource !== null
|
|
4119
|
-
? deserializeAws_restJson1IncidentRecordSource(output.incidentRecordSource, context)
|
|
4120
|
-
: undefined,
|
|
4121
|
-
lastModifiedBy: __expectString(output.lastModifiedBy),
|
|
4122
|
-
lastModifiedTime:
|
|
4123
|
-
output.lastModifiedTime !== undefined && output.lastModifiedTime !== null
|
|
4124
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModifiedTime)))
|
|
4125
|
-
: undefined,
|
|
4126
|
-
notificationTargets:
|
|
4127
|
-
output.notificationTargets !== undefined && output.notificationTargets !== null
|
|
4128
|
-
? deserializeAws_restJson1NotificationTargetSet(output.notificationTargets, context)
|
|
4129
|
-
: undefined,
|
|
4130
|
-
resolvedTime:
|
|
4131
|
-
output.resolvedTime !== undefined && output.resolvedTime !== null
|
|
4132
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.resolvedTime)))
|
|
4133
|
-
: undefined,
|
|
4134
|
-
status: __expectString(output.status),
|
|
4135
|
-
summary: __expectString(output.summary),
|
|
4136
|
-
title: __expectString(output.title),
|
|
4137
|
-
} as any;
|
|
4138
|
-
};
|
|
4139
|
-
|
|
4140
|
-
const deserializeAws_restJson1IncidentRecordSource = (output: any, context: __SerdeContext): IncidentRecordSource => {
|
|
4141
|
-
return {
|
|
4142
|
-
createdBy: __expectString(output.createdBy),
|
|
4143
|
-
invokedBy: __expectString(output.invokedBy),
|
|
4144
|
-
resourceArn: __expectString(output.resourceArn),
|
|
4145
|
-
source: __expectString(output.source),
|
|
4146
|
-
} as any;
|
|
4147
|
-
};
|
|
4148
|
-
|
|
4149
|
-
const deserializeAws_restJson1IncidentRecordSummary = (output: any, context: __SerdeContext): IncidentRecordSummary => {
|
|
4150
|
-
return {
|
|
4151
|
-
arn: __expectString(output.arn),
|
|
4152
|
-
creationTime:
|
|
4153
|
-
output.creationTime !== undefined && output.creationTime !== null
|
|
4154
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime)))
|
|
4155
|
-
: undefined,
|
|
4156
|
-
impact: __expectInt32(output.impact),
|
|
4157
|
-
incidentRecordSource:
|
|
4158
|
-
output.incidentRecordSource !== undefined && output.incidentRecordSource !== null
|
|
4159
|
-
? deserializeAws_restJson1IncidentRecordSource(output.incidentRecordSource, context)
|
|
4160
|
-
: undefined,
|
|
4161
|
-
resolvedTime:
|
|
4162
|
-
output.resolvedTime !== undefined && output.resolvedTime !== null
|
|
4163
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.resolvedTime)))
|
|
4164
|
-
: undefined,
|
|
4165
|
-
status: __expectString(output.status),
|
|
4166
|
-
title: __expectString(output.title),
|
|
4167
|
-
} as any;
|
|
4168
|
-
};
|
|
4169
|
-
|
|
4170
|
-
const deserializeAws_restJson1IncidentRecordSummaryList = (
|
|
4171
|
-
output: any,
|
|
4172
|
-
context: __SerdeContext
|
|
4173
|
-
): IncidentRecordSummary[] => {
|
|
4174
|
-
return (output || [])
|
|
4175
|
-
.filter((e: any) => e != null)
|
|
4176
|
-
.map((entry: any) => {
|
|
4177
|
-
if (entry === null) {
|
|
4178
|
-
return null as any;
|
|
4179
|
-
}
|
|
4180
|
-
return deserializeAws_restJson1IncidentRecordSummary(entry, context);
|
|
4181
|
-
});
|
|
4182
|
-
};
|
|
4183
|
-
|
|
4184
|
-
const deserializeAws_restJson1IncidentTemplate = (output: any, context: __SerdeContext): IncidentTemplate => {
|
|
4185
|
-
return {
|
|
4186
|
-
dedupeString: __expectString(output.dedupeString),
|
|
4187
|
-
impact: __expectInt32(output.impact),
|
|
4188
|
-
notificationTargets:
|
|
4189
|
-
output.notificationTargets !== undefined && output.notificationTargets !== null
|
|
4190
|
-
? deserializeAws_restJson1NotificationTargetSet(output.notificationTargets, context)
|
|
4191
|
-
: undefined,
|
|
4192
|
-
summary: __expectString(output.summary),
|
|
4193
|
-
title: __expectString(output.title),
|
|
4194
|
-
} as any;
|
|
4195
|
-
};
|
|
4196
|
-
|
|
4197
|
-
const deserializeAws_restJson1ItemIdentifier = (output: any, context: __SerdeContext): ItemIdentifier => {
|
|
4198
|
-
return {
|
|
4199
|
-
type: __expectString(output.type),
|
|
4200
|
-
value:
|
|
4201
|
-
output.value !== undefined && output.value !== null
|
|
4202
|
-
? deserializeAws_restJson1ItemValue(__expectUnion(output.value), context)
|
|
4203
|
-
: undefined,
|
|
4204
|
-
} as any;
|
|
4205
|
-
};
|
|
4206
|
-
|
|
4207
|
-
const deserializeAws_restJson1ItemValue = (output: any, context: __SerdeContext): ItemValue => {
|
|
4208
|
-
if (__expectString(output.arn) !== undefined) {
|
|
4209
|
-
return { arn: __expectString(output.arn) as any };
|
|
4210
|
-
}
|
|
4211
|
-
if (__expectString(output.metricDefinition) !== undefined) {
|
|
4212
|
-
return { metricDefinition: __expectString(output.metricDefinition) as any };
|
|
4213
|
-
}
|
|
4214
|
-
if (__expectString(output.url) !== undefined) {
|
|
4215
|
-
return { url: __expectString(output.url) as any };
|
|
4216
|
-
}
|
|
4217
|
-
return { $unknown: Object.entries(output)[0] };
|
|
4218
|
-
};
|
|
4219
|
-
|
|
4220
|
-
const deserializeAws_restJson1NotificationTargetItem = (
|
|
4221
|
-
output: any,
|
|
4222
|
-
context: __SerdeContext
|
|
4223
|
-
): NotificationTargetItem => {
|
|
4224
|
-
if (__expectString(output.snsTopicArn) !== undefined) {
|
|
4225
|
-
return { snsTopicArn: __expectString(output.snsTopicArn) as any };
|
|
4226
|
-
}
|
|
4227
|
-
return { $unknown: Object.entries(output)[0] };
|
|
4228
|
-
};
|
|
4229
|
-
|
|
4230
|
-
const deserializeAws_restJson1NotificationTargetSet = (
|
|
4231
|
-
output: any,
|
|
4232
|
-
context: __SerdeContext
|
|
4233
|
-
): NotificationTargetItem[] => {
|
|
4234
|
-
const uniqueValues = new Set<any>();
|
|
4235
|
-
return (output || [])
|
|
4236
|
-
.filter((e: any) => e != null)
|
|
4237
|
-
.map((entry: any) => {
|
|
4238
|
-
if (entry === null) {
|
|
4239
|
-
return null as any;
|
|
4240
|
-
}
|
|
4241
|
-
const parsedEntry = deserializeAws_restJson1NotificationTargetItem(__expectUnion(entry), context);
|
|
4242
|
-
if (uniqueValues.has(parsedEntry)) {
|
|
4243
|
-
throw new TypeError(
|
|
4244
|
-
'All elements of the set "com.amazonaws.ssmincidents#NotificationTargetSet" must be unique.'
|
|
4245
|
-
);
|
|
4246
|
-
} else {
|
|
4247
|
-
uniqueValues.add(parsedEntry);
|
|
4248
|
-
return parsedEntry;
|
|
4249
|
-
}
|
|
4250
|
-
});
|
|
4251
|
-
};
|
|
4252
|
-
|
|
4253
|
-
const deserializeAws_restJson1RegionInfo = (output: any, context: __SerdeContext): RegionInfo => {
|
|
4254
|
-
return {
|
|
4255
|
-
sseKmsKeyId: __expectString(output.sseKmsKeyId),
|
|
4256
|
-
status: __expectString(output.status),
|
|
4257
|
-
statusMessage: __expectString(output.statusMessage),
|
|
4258
|
-
statusUpdateDateTime:
|
|
4259
|
-
output.statusUpdateDateTime !== undefined && output.statusUpdateDateTime !== null
|
|
4260
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.statusUpdateDateTime)))
|
|
4261
|
-
: undefined,
|
|
4262
|
-
} as any;
|
|
4263
|
-
};
|
|
4264
|
-
|
|
4265
|
-
const deserializeAws_restJson1RegionInfoMap = (output: any, context: __SerdeContext): { [key: string]: RegionInfo } => {
|
|
4266
|
-
return Object.entries(output).reduce((acc: { [key: string]: RegionInfo }, [key, value]: [string, any]) => {
|
|
4267
|
-
if (value === null) {
|
|
4268
|
-
return acc;
|
|
4269
|
-
}
|
|
4270
|
-
return {
|
|
4271
|
-
...acc,
|
|
4272
|
-
[key]: deserializeAws_restJson1RegionInfo(value, context),
|
|
4273
|
-
};
|
|
4274
|
-
}, {});
|
|
4275
|
-
};
|
|
4276
|
-
|
|
4277
|
-
const deserializeAws_restJson1RelatedItem = (output: any, context: __SerdeContext): RelatedItem => {
|
|
4278
|
-
return {
|
|
4279
|
-
identifier:
|
|
4280
|
-
output.identifier !== undefined && output.identifier !== null
|
|
4281
|
-
? deserializeAws_restJson1ItemIdentifier(output.identifier, context)
|
|
4282
|
-
: undefined,
|
|
4283
|
-
title: __expectString(output.title),
|
|
4284
|
-
} as any;
|
|
4285
|
-
};
|
|
4286
|
-
|
|
4287
|
-
const deserializeAws_restJson1RelatedItemList = (output: any, context: __SerdeContext): RelatedItem[] => {
|
|
4288
|
-
return (output || [])
|
|
4289
|
-
.filter((e: any) => e != null)
|
|
4290
|
-
.map((entry: any) => {
|
|
4291
|
-
if (entry === null) {
|
|
4292
|
-
return null as any;
|
|
4293
|
-
}
|
|
4294
|
-
return deserializeAws_restJson1RelatedItem(entry, context);
|
|
4295
|
-
});
|
|
4296
|
-
};
|
|
4297
|
-
|
|
4298
|
-
const deserializeAws_restJson1ReplicationSet = (output: any, context: __SerdeContext): ReplicationSet => {
|
|
4299
|
-
return {
|
|
4300
|
-
arn: __expectString(output.arn),
|
|
4301
|
-
createdBy: __expectString(output.createdBy),
|
|
4302
|
-
createdTime:
|
|
4303
|
-
output.createdTime !== undefined && output.createdTime !== null
|
|
4304
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdTime)))
|
|
4305
|
-
: undefined,
|
|
4306
|
-
deletionProtected: __expectBoolean(output.deletionProtected),
|
|
4307
|
-
lastModifiedBy: __expectString(output.lastModifiedBy),
|
|
4308
|
-
lastModifiedTime:
|
|
4309
|
-
output.lastModifiedTime !== undefined && output.lastModifiedTime !== null
|
|
4310
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModifiedTime)))
|
|
4311
|
-
: undefined,
|
|
4312
|
-
regionMap:
|
|
4313
|
-
output.regionMap !== undefined && output.regionMap !== null
|
|
4314
|
-
? deserializeAws_restJson1RegionInfoMap(output.regionMap, context)
|
|
4315
|
-
: undefined,
|
|
4316
|
-
status: __expectString(output.status),
|
|
4317
|
-
} as any;
|
|
4318
|
-
};
|
|
4319
|
-
|
|
4320
|
-
const deserializeAws_restJson1ReplicationSetArnList = (output: any, context: __SerdeContext): string[] => {
|
|
4321
|
-
return (output || [])
|
|
4322
|
-
.filter((e: any) => e != null)
|
|
4323
|
-
.map((entry: any) => {
|
|
4324
|
-
if (entry === null) {
|
|
4325
|
-
return null as any;
|
|
4326
|
-
}
|
|
4327
|
-
return __expectString(entry) as any;
|
|
4328
|
-
});
|
|
4329
|
-
};
|
|
4330
|
-
|
|
4331
|
-
const deserializeAws_restJson1ResourcePolicy = (output: any, context: __SerdeContext): ResourcePolicy => {
|
|
4332
|
-
return {
|
|
4333
|
-
policyDocument: __expectString(output.policyDocument),
|
|
4334
|
-
policyId: __expectString(output.policyId),
|
|
4335
|
-
ramResourceShareRegion: __expectString(output.ramResourceShareRegion),
|
|
4336
|
-
} as any;
|
|
4337
|
-
};
|
|
4338
|
-
|
|
4339
|
-
const deserializeAws_restJson1ResourcePolicyList = (output: any, context: __SerdeContext): ResourcePolicy[] => {
|
|
4340
|
-
return (output || [])
|
|
4341
|
-
.filter((e: any) => e != null)
|
|
4342
|
-
.map((entry: any) => {
|
|
4343
|
-
if (entry === null) {
|
|
4344
|
-
return null as any;
|
|
4345
|
-
}
|
|
4346
|
-
return deserializeAws_restJson1ResourcePolicy(entry, context);
|
|
4347
|
-
});
|
|
4348
|
-
};
|
|
4349
|
-
|
|
4350
|
-
const deserializeAws_restJson1ResponsePlanSummary = (output: any, context: __SerdeContext): ResponsePlanSummary => {
|
|
4351
|
-
return {
|
|
4352
|
-
arn: __expectString(output.arn),
|
|
4353
|
-
displayName: __expectString(output.displayName),
|
|
4354
|
-
name: __expectString(output.name),
|
|
4355
|
-
} as any;
|
|
4356
|
-
};
|
|
4357
|
-
|
|
4358
|
-
const deserializeAws_restJson1ResponsePlanSummaryList = (
|
|
4359
|
-
output: any,
|
|
4360
|
-
context: __SerdeContext
|
|
4361
|
-
): ResponsePlanSummary[] => {
|
|
4362
|
-
return (output || [])
|
|
4363
|
-
.filter((e: any) => e != null)
|
|
4364
|
-
.map((entry: any) => {
|
|
4365
|
-
if (entry === null) {
|
|
4366
|
-
return null as any;
|
|
4367
|
-
}
|
|
4368
|
-
return deserializeAws_restJson1ResponsePlanSummary(entry, context);
|
|
4369
|
-
});
|
|
4370
|
-
};
|
|
4371
|
-
|
|
4372
|
-
const deserializeAws_restJson1SsmAutomation = (output: any, context: __SerdeContext): SsmAutomation => {
|
|
4373
|
-
return {
|
|
4374
|
-
documentName: __expectString(output.documentName),
|
|
4375
|
-
documentVersion: __expectString(output.documentVersion),
|
|
4376
|
-
parameters:
|
|
4377
|
-
output.parameters !== undefined && output.parameters !== null
|
|
4378
|
-
? deserializeAws_restJson1SsmParameters(output.parameters, context)
|
|
4379
|
-
: undefined,
|
|
4380
|
-
roleArn: __expectString(output.roleArn),
|
|
4381
|
-
targetAccount: __expectString(output.targetAccount),
|
|
4382
|
-
} as any;
|
|
4383
|
-
};
|
|
4384
|
-
|
|
4385
|
-
const deserializeAws_restJson1SsmParameters = (output: any, context: __SerdeContext): { [key: string]: string[] } => {
|
|
4386
|
-
return Object.entries(output).reduce((acc: { [key: string]: string[] }, [key, value]: [string, any]) => {
|
|
4387
|
-
if (value === null) {
|
|
4388
|
-
return acc;
|
|
4389
|
-
}
|
|
4390
|
-
return {
|
|
4391
|
-
...acc,
|
|
4392
|
-
[key]: deserializeAws_restJson1SsmParameterValues(value, context),
|
|
4393
|
-
};
|
|
4394
|
-
}, {});
|
|
4395
|
-
};
|
|
4396
|
-
|
|
4397
|
-
const deserializeAws_restJson1SsmParameterValues = (output: any, context: __SerdeContext): string[] => {
|
|
4398
|
-
return (output || [])
|
|
4399
|
-
.filter((e: any) => e != null)
|
|
4400
|
-
.map((entry: any) => {
|
|
4401
|
-
if (entry === null) {
|
|
4402
|
-
return null as any;
|
|
4403
|
-
}
|
|
4404
|
-
return __expectString(entry) as any;
|
|
4405
|
-
});
|
|
4406
|
-
};
|
|
4407
|
-
|
|
4408
|
-
const deserializeAws_restJson1TagMap = (output: any, context: __SerdeContext): { [key: string]: string } => {
|
|
4409
|
-
return Object.entries(output).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => {
|
|
4410
|
-
if (value === null) {
|
|
4411
|
-
return acc;
|
|
4412
|
-
}
|
|
4413
|
-
return {
|
|
4414
|
-
...acc,
|
|
4415
|
-
[key]: __expectString(value) as any,
|
|
4416
|
-
};
|
|
4417
|
-
}, {});
|
|
4418
|
-
};
|
|
4419
|
-
|
|
4420
|
-
const deserializeAws_restJson1TimelineEvent = (output: any, context: __SerdeContext): TimelineEvent => {
|
|
4421
|
-
return {
|
|
4422
|
-
eventData: __expectString(output.eventData),
|
|
4423
|
-
eventId: __expectString(output.eventId),
|
|
4424
|
-
eventTime:
|
|
4425
|
-
output.eventTime !== undefined && output.eventTime !== null
|
|
4426
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.eventTime)))
|
|
4427
|
-
: undefined,
|
|
4428
|
-
eventType: __expectString(output.eventType),
|
|
4429
|
-
eventUpdatedTime:
|
|
4430
|
-
output.eventUpdatedTime !== undefined && output.eventUpdatedTime !== null
|
|
4431
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.eventUpdatedTime)))
|
|
4432
|
-
: undefined,
|
|
4433
|
-
incidentRecordArn: __expectString(output.incidentRecordArn),
|
|
4434
|
-
} as any;
|
|
4435
|
-
};
|
|
4436
|
-
|
|
4437
|
-
const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
|
|
4438
|
-
httpStatusCode: output.statusCode,
|
|
4439
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
4440
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
4441
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
4442
|
-
});
|
|
4443
|
-
|
|
4444
|
-
// Collect low-level response body stream to Uint8Array.
|
|
4445
|
-
const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
|
|
4446
|
-
if (streamBody instanceof Uint8Array) {
|
|
4447
|
-
return Promise.resolve(streamBody);
|
|
4448
|
-
}
|
|
4449
|
-
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
4450
|
-
};
|
|
4451
|
-
|
|
4452
|
-
// Encode Uint8Array data into string with utf-8.
|
|
4453
|
-
const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
|
|
4454
|
-
collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
4455
|
-
|
|
4456
|
-
const isSerializableHeaderValue = (value: any): boolean =>
|
|
4457
|
-
value !== undefined &&
|
|
4458
|
-
value !== null &&
|
|
4459
|
-
value !== "" &&
|
|
4460
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
4461
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
4462
|
-
|
|
4463
|
-
const parseBody = (streamBody: any, context: __SerdeContext): any =>
|
|
4464
|
-
collectBodyString(streamBody, context).then((encoded) => {
|
|
4465
|
-
if (encoded.length) {
|
|
4466
|
-
return JSON.parse(encoded);
|
|
4467
|
-
}
|
|
4468
|
-
return {};
|
|
4469
|
-
});
|
|
4470
|
-
|
|
4471
|
-
/**
|
|
4472
|
-
* Load an error code for the aws.rest-json-1.1 protocol.
|
|
4473
|
-
*/
|
|
4474
|
-
const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string => {
|
|
4475
|
-
const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
4476
|
-
|
|
4477
|
-
const sanitizeErrorCode = (rawValue: string): string => {
|
|
4478
|
-
let cleanValue = rawValue;
|
|
4479
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
4480
|
-
cleanValue = cleanValue.split(":")[0];
|
|
4481
|
-
}
|
|
4482
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
4483
|
-
cleanValue = cleanValue.split("#")[1];
|
|
4484
|
-
}
|
|
4485
|
-
return cleanValue;
|
|
4486
|
-
};
|
|
4487
|
-
|
|
4488
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
4489
|
-
if (headerKey !== undefined) {
|
|
4490
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
4491
|
-
}
|
|
4492
|
-
|
|
4493
|
-
if (data.code !== undefined) {
|
|
4494
|
-
return sanitizeErrorCode(data.code);
|
|
4495
|
-
}
|
|
4496
|
-
|
|
4497
|
-
if (data["__type"] !== undefined) {
|
|
4498
|
-
return sanitizeErrorCode(data["__type"]);
|
|
4499
|
-
}
|
|
4500
|
-
|
|
4501
|
-
return "";
|
|
4502
|
-
};
|