@aws-sdk/client-ssm-guiconnect 3.927.0 → 3.929.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.
@@ -1,221 +0,0 @@
1
- import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
- import { requestBuilder as rb } from "@smithy/core";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, take, withBaseException, } from "@smithy/smithy-client";
4
- import { v4 as generateIdempotencyToken } from "@smithy/uuid";
5
- import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
6
- import { SSMGuiConnectServiceException as __BaseException } from "../models/SSMGuiConnectServiceException";
7
- export const se_DeleteConnectionRecordingPreferencesCommand = async (input, context) => {
8
- const b = rb(input, context);
9
- const headers = {
10
- "content-type": "application/json",
11
- };
12
- b.bp("/DeleteConnectionRecordingPreferences");
13
- let body;
14
- body = JSON.stringify(take(input, {
15
- ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
16
- }));
17
- b.m("POST").h(headers).b(body);
18
- return b.build();
19
- };
20
- export const se_GetConnectionRecordingPreferencesCommand = async (input, context) => {
21
- const b = rb(input, context);
22
- const headers = {};
23
- b.bp("/GetConnectionRecordingPreferences");
24
- let body;
25
- b.m("POST").h(headers).b(body);
26
- return b.build();
27
- };
28
- export const se_UpdateConnectionRecordingPreferencesCommand = async (input, context) => {
29
- const b = rb(input, context);
30
- const headers = {
31
- "content-type": "application/json",
32
- };
33
- b.bp("/UpdateConnectionRecordingPreferences");
34
- let body;
35
- body = JSON.stringify(take(input, {
36
- ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
37
- ConnectionRecordingPreferences: (_) => _json(_),
38
- }));
39
- b.m("POST").h(headers).b(body);
40
- return b.build();
41
- };
42
- export const de_DeleteConnectionRecordingPreferencesCommand = async (output, context) => {
43
- if (output.statusCode !== 200 && output.statusCode >= 300) {
44
- return de_CommandError(output, context);
45
- }
46
- const contents = map({
47
- $metadata: deserializeMetadata(output),
48
- });
49
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
50
- const doc = take(data, {
51
- ClientToken: __expectString,
52
- });
53
- Object.assign(contents, doc);
54
- return contents;
55
- };
56
- export const de_GetConnectionRecordingPreferencesCommand = async (output, context) => {
57
- if (output.statusCode !== 200 && output.statusCode >= 300) {
58
- return de_CommandError(output, context);
59
- }
60
- const contents = map({
61
- $metadata: deserializeMetadata(output),
62
- });
63
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
64
- const doc = take(data, {
65
- ClientToken: __expectString,
66
- ConnectionRecordingPreferences: _json,
67
- });
68
- Object.assign(contents, doc);
69
- return contents;
70
- };
71
- export const de_UpdateConnectionRecordingPreferencesCommand = async (output, context) => {
72
- if (output.statusCode !== 200 && output.statusCode >= 300) {
73
- return de_CommandError(output, context);
74
- }
75
- const contents = map({
76
- $metadata: deserializeMetadata(output),
77
- });
78
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
79
- const doc = take(data, {
80
- ClientToken: __expectString,
81
- ConnectionRecordingPreferences: _json,
82
- });
83
- Object.assign(contents, doc);
84
- return contents;
85
- };
86
- const de_CommandError = async (output, context) => {
87
- const parsedOutput = {
88
- ...output,
89
- body: await parseErrorBody(output.body, context),
90
- };
91
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
92
- switch (errorCode) {
93
- case "AccessDeniedException":
94
- case "com.amazonaws.ssmguiconnect#AccessDeniedException":
95
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
96
- case "ConflictException":
97
- case "com.amazonaws.ssmguiconnect#ConflictException":
98
- throw await de_ConflictExceptionRes(parsedOutput, context);
99
- case "InternalServerException":
100
- case "com.amazonaws.ssmguiconnect#InternalServerException":
101
- throw await de_InternalServerExceptionRes(parsedOutput, context);
102
- case "ResourceNotFoundException":
103
- case "com.amazonaws.ssmguiconnect#ResourceNotFoundException":
104
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
105
- case "ServiceQuotaExceededException":
106
- case "com.amazonaws.ssmguiconnect#ServiceQuotaExceededException":
107
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
108
- case "ThrottlingException":
109
- case "com.amazonaws.ssmguiconnect#ThrottlingException":
110
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
111
- case "ValidationException":
112
- case "com.amazonaws.ssmguiconnect#ValidationException":
113
- throw await de_ValidationExceptionRes(parsedOutput, context);
114
- default:
115
- const parsedBody = parsedOutput.body;
116
- return throwDefaultError({
117
- output,
118
- parsedBody,
119
- errorCode,
120
- });
121
- }
122
- };
123
- const throwDefaultError = withBaseException(__BaseException);
124
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
125
- const contents = map({});
126
- const data = parsedOutput.body;
127
- const doc = take(data, {
128
- message: __expectString,
129
- });
130
- Object.assign(contents, doc);
131
- const exception = new AccessDeniedException({
132
- $metadata: deserializeMetadata(parsedOutput),
133
- ...contents,
134
- });
135
- return __decorateServiceException(exception, parsedOutput.body);
136
- };
137
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
138
- const contents = map({});
139
- const data = parsedOutput.body;
140
- const doc = take(data, {
141
- message: __expectString,
142
- });
143
- Object.assign(contents, doc);
144
- const exception = new ConflictException({
145
- $metadata: deserializeMetadata(parsedOutput),
146
- ...contents,
147
- });
148
- return __decorateServiceException(exception, parsedOutput.body);
149
- };
150
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
151
- const contents = map({});
152
- const data = parsedOutput.body;
153
- const doc = take(data, {
154
- message: __expectString,
155
- });
156
- Object.assign(contents, doc);
157
- const exception = new InternalServerException({
158
- $metadata: deserializeMetadata(parsedOutput),
159
- ...contents,
160
- });
161
- return __decorateServiceException(exception, parsedOutput.body);
162
- };
163
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
164
- const contents = map({});
165
- const data = parsedOutput.body;
166
- const doc = take(data, {
167
- message: __expectString,
168
- });
169
- Object.assign(contents, doc);
170
- const exception = new ResourceNotFoundException({
171
- $metadata: deserializeMetadata(parsedOutput),
172
- ...contents,
173
- });
174
- return __decorateServiceException(exception, parsedOutput.body);
175
- };
176
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
177
- const contents = map({});
178
- const data = parsedOutput.body;
179
- const doc = take(data, {
180
- message: __expectString,
181
- });
182
- Object.assign(contents, doc);
183
- const exception = new ServiceQuotaExceededException({
184
- $metadata: deserializeMetadata(parsedOutput),
185
- ...contents,
186
- });
187
- return __decorateServiceException(exception, parsedOutput.body);
188
- };
189
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
190
- const contents = map({});
191
- const data = parsedOutput.body;
192
- const doc = take(data, {
193
- message: __expectString,
194
- });
195
- Object.assign(contents, doc);
196
- const exception = new ThrottlingException({
197
- $metadata: deserializeMetadata(parsedOutput),
198
- ...contents,
199
- });
200
- return __decorateServiceException(exception, parsedOutput.body);
201
- };
202
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
203
- const contents = map({});
204
- const data = parsedOutput.body;
205
- const doc = take(data, {
206
- message: __expectString,
207
- });
208
- Object.assign(contents, doc);
209
- const exception = new ValidationException({
210
- $metadata: deserializeMetadata(parsedOutput),
211
- ...contents,
212
- });
213
- return __decorateServiceException(exception, parsedOutput.body);
214
- };
215
- const deserializeMetadata = (output) => ({
216
- httpStatusCode: output.statusCode,
217
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
218
- extendedRequestId: output.headers["x-amz-id-2"],
219
- cfId: output.headers["x-amz-cf-id"],
220
- });
221
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
@@ -1,29 +0,0 @@
1
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
2
- import { SerdeContext as __SerdeContext } from "@smithy/types";
3
- import { DeleteConnectionRecordingPreferencesCommandInput, DeleteConnectionRecordingPreferencesCommandOutput } from "../commands/DeleteConnectionRecordingPreferencesCommand";
4
- import { GetConnectionRecordingPreferencesCommandInput, GetConnectionRecordingPreferencesCommandOutput } from "../commands/GetConnectionRecordingPreferencesCommand";
5
- import { UpdateConnectionRecordingPreferencesCommandInput, UpdateConnectionRecordingPreferencesCommandOutput } from "../commands/UpdateConnectionRecordingPreferencesCommand";
6
- /**
7
- * serializeAws_restJson1DeleteConnectionRecordingPreferencesCommand
8
- */
9
- export declare const se_DeleteConnectionRecordingPreferencesCommand: (input: DeleteConnectionRecordingPreferencesCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
10
- /**
11
- * serializeAws_restJson1GetConnectionRecordingPreferencesCommand
12
- */
13
- export declare const se_GetConnectionRecordingPreferencesCommand: (input: GetConnectionRecordingPreferencesCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
14
- /**
15
- * serializeAws_restJson1UpdateConnectionRecordingPreferencesCommand
16
- */
17
- export declare const se_UpdateConnectionRecordingPreferencesCommand: (input: UpdateConnectionRecordingPreferencesCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
18
- /**
19
- * deserializeAws_restJson1DeleteConnectionRecordingPreferencesCommand
20
- */
21
- export declare const de_DeleteConnectionRecordingPreferencesCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<DeleteConnectionRecordingPreferencesCommandOutput>;
22
- /**
23
- * deserializeAws_restJson1GetConnectionRecordingPreferencesCommand
24
- */
25
- export declare const de_GetConnectionRecordingPreferencesCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetConnectionRecordingPreferencesCommandOutput>;
26
- /**
27
- * deserializeAws_restJson1UpdateConnectionRecordingPreferencesCommand
28
- */
29
- export declare const de_UpdateConnectionRecordingPreferencesCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<UpdateConnectionRecordingPreferencesCommandOutput>;
@@ -1,41 +0,0 @@
1
- import {
2
- HttpRequest as __HttpRequest,
3
- HttpResponse as __HttpResponse,
4
- } from "@smithy/protocol-http";
5
- import { SerdeContext as __SerdeContext } from "@smithy/types";
6
- import {
7
- DeleteConnectionRecordingPreferencesCommandInput,
8
- DeleteConnectionRecordingPreferencesCommandOutput,
9
- } from "../commands/DeleteConnectionRecordingPreferencesCommand";
10
- import {
11
- GetConnectionRecordingPreferencesCommandInput,
12
- GetConnectionRecordingPreferencesCommandOutput,
13
- } from "../commands/GetConnectionRecordingPreferencesCommand";
14
- import {
15
- UpdateConnectionRecordingPreferencesCommandInput,
16
- UpdateConnectionRecordingPreferencesCommandOutput,
17
- } from "../commands/UpdateConnectionRecordingPreferencesCommand";
18
- export declare const se_DeleteConnectionRecordingPreferencesCommand: (
19
- input: DeleteConnectionRecordingPreferencesCommandInput,
20
- context: __SerdeContext
21
- ) => Promise<__HttpRequest>;
22
- export declare const se_GetConnectionRecordingPreferencesCommand: (
23
- input: GetConnectionRecordingPreferencesCommandInput,
24
- context: __SerdeContext
25
- ) => Promise<__HttpRequest>;
26
- export declare const se_UpdateConnectionRecordingPreferencesCommand: (
27
- input: UpdateConnectionRecordingPreferencesCommandInput,
28
- context: __SerdeContext
29
- ) => Promise<__HttpRequest>;
30
- export declare const de_DeleteConnectionRecordingPreferencesCommand: (
31
- output: __HttpResponse,
32
- context: __SerdeContext
33
- ) => Promise<DeleteConnectionRecordingPreferencesCommandOutput>;
34
- export declare const de_GetConnectionRecordingPreferencesCommand: (
35
- output: __HttpResponse,
36
- context: __SerdeContext
37
- ) => Promise<GetConnectionRecordingPreferencesCommandOutput>;
38
- export declare const de_UpdateConnectionRecordingPreferencesCommand: (
39
- output: __HttpResponse,
40
- context: __SerdeContext
41
- ) => Promise<UpdateConnectionRecordingPreferencesCommandOutput>;