@aws-sdk/client-eks-auth 3.928.0 → 3.930.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/dist-cjs/index.js +220 -260
- package/dist-cjs/runtimeConfig.shared.js +2 -0
- package/dist-es/EKSAuthClient.js +2 -0
- package/dist-es/commands/AssumeRoleForPodIdentityCommand.js +3 -10
- package/dist-es/models/models_0.js +0 -12
- package/dist-es/runtimeConfig.shared.js +2 -0
- package/dist-es/schemas/schemas_0.js +189 -0
- package/dist-types/EKSAuthClient.d.ts +10 -1
- package/dist-types/models/models_0.d.ts +0 -12
- package/dist-types/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/runtimeConfig.d.ts +1 -0
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/runtimeConfig.shared.d.ts +1 -0
- package/dist-types/schemas/schemas_0.d.ts +19 -0
- package/dist-types/ts3.4/EKSAuthClient.d.ts +4 -0
- package/dist-types/ts3.4/models/models_0.d.ts +0 -7
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +24 -0
- package/package.json +33 -33
- package/dist-es/protocols/Aws_restJson1.js +0 -213
- package/dist-types/protocols/Aws_restJson1.d.ts +0 -11
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -17
|
@@ -1,213 +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, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
|
-
import { EKSAuthServiceException as __BaseException } from "../models/EKSAuthServiceException";
|
|
5
|
-
import { AccessDeniedException, ExpiredTokenException, InternalServerException, InvalidParameterException, InvalidRequestException, InvalidTokenException, ResourceNotFoundException, ServiceUnavailableException, ThrottlingException, } from "../models/models_0";
|
|
6
|
-
export const se_AssumeRoleForPodIdentityCommand = async (input, context) => {
|
|
7
|
-
const b = rb(input, context);
|
|
8
|
-
const headers = {
|
|
9
|
-
"content-type": "application/json",
|
|
10
|
-
};
|
|
11
|
-
b.bp("/clusters/{clusterName}/assume-role-for-pod-identity");
|
|
12
|
-
b.p("clusterName", () => input.clusterName, "{clusterName}", false);
|
|
13
|
-
let body;
|
|
14
|
-
body = JSON.stringify(take(input, {
|
|
15
|
-
token: [],
|
|
16
|
-
}));
|
|
17
|
-
b.m("POST").h(headers).b(body);
|
|
18
|
-
return b.build();
|
|
19
|
-
};
|
|
20
|
-
export const de_AssumeRoleForPodIdentityCommand = async (output, context) => {
|
|
21
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
22
|
-
return de_CommandError(output, context);
|
|
23
|
-
}
|
|
24
|
-
const contents = map({
|
|
25
|
-
$metadata: deserializeMetadata(output),
|
|
26
|
-
});
|
|
27
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
28
|
-
const doc = take(data, {
|
|
29
|
-
assumedRoleUser: _json,
|
|
30
|
-
audience: __expectString,
|
|
31
|
-
credentials: (_) => de_Credentials(_, context),
|
|
32
|
-
podIdentityAssociation: _json,
|
|
33
|
-
subject: _json,
|
|
34
|
-
});
|
|
35
|
-
Object.assign(contents, doc);
|
|
36
|
-
return contents;
|
|
37
|
-
};
|
|
38
|
-
const de_CommandError = async (output, context) => {
|
|
39
|
-
const parsedOutput = {
|
|
40
|
-
...output,
|
|
41
|
-
body: await parseErrorBody(output.body, context),
|
|
42
|
-
};
|
|
43
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
44
|
-
switch (errorCode) {
|
|
45
|
-
case "AccessDeniedException":
|
|
46
|
-
case "com.amazonaws.eksauth#AccessDeniedException":
|
|
47
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
48
|
-
case "ExpiredTokenException":
|
|
49
|
-
case "com.amazonaws.eksauth#ExpiredTokenException":
|
|
50
|
-
throw await de_ExpiredTokenExceptionRes(parsedOutput, context);
|
|
51
|
-
case "InternalServerException":
|
|
52
|
-
case "com.amazonaws.eksauth#InternalServerException":
|
|
53
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
54
|
-
case "InvalidParameterException":
|
|
55
|
-
case "com.amazonaws.eksauth#InvalidParameterException":
|
|
56
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
57
|
-
case "InvalidRequestException":
|
|
58
|
-
case "com.amazonaws.eksauth#InvalidRequestException":
|
|
59
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
60
|
-
case "InvalidTokenException":
|
|
61
|
-
case "com.amazonaws.eksauth#InvalidTokenException":
|
|
62
|
-
throw await de_InvalidTokenExceptionRes(parsedOutput, context);
|
|
63
|
-
case "ResourceNotFoundException":
|
|
64
|
-
case "com.amazonaws.eksauth#ResourceNotFoundException":
|
|
65
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
66
|
-
case "ServiceUnavailableException":
|
|
67
|
-
case "com.amazonaws.eksauth#ServiceUnavailableException":
|
|
68
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
69
|
-
case "ThrottlingException":
|
|
70
|
-
case "com.amazonaws.eksauth#ThrottlingException":
|
|
71
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
72
|
-
default:
|
|
73
|
-
const parsedBody = parsedOutput.body;
|
|
74
|
-
return throwDefaultError({
|
|
75
|
-
output,
|
|
76
|
-
parsedBody,
|
|
77
|
-
errorCode,
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
const throwDefaultError = withBaseException(__BaseException);
|
|
82
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
83
|
-
const contents = map({});
|
|
84
|
-
const data = parsedOutput.body;
|
|
85
|
-
const doc = take(data, {
|
|
86
|
-
message: __expectString,
|
|
87
|
-
});
|
|
88
|
-
Object.assign(contents, doc);
|
|
89
|
-
const exception = new AccessDeniedException({
|
|
90
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
91
|
-
...contents,
|
|
92
|
-
});
|
|
93
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
94
|
-
};
|
|
95
|
-
const de_ExpiredTokenExceptionRes = async (parsedOutput, context) => {
|
|
96
|
-
const contents = map({});
|
|
97
|
-
const data = parsedOutput.body;
|
|
98
|
-
const doc = take(data, {
|
|
99
|
-
message: __expectString,
|
|
100
|
-
});
|
|
101
|
-
Object.assign(contents, doc);
|
|
102
|
-
const exception = new ExpiredTokenException({
|
|
103
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
104
|
-
...contents,
|
|
105
|
-
});
|
|
106
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
107
|
-
};
|
|
108
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
109
|
-
const contents = map({});
|
|
110
|
-
const data = parsedOutput.body;
|
|
111
|
-
const doc = take(data, {
|
|
112
|
-
message: __expectString,
|
|
113
|
-
});
|
|
114
|
-
Object.assign(contents, doc);
|
|
115
|
-
const exception = new InternalServerException({
|
|
116
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
117
|
-
...contents,
|
|
118
|
-
});
|
|
119
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
120
|
-
};
|
|
121
|
-
const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
|
|
122
|
-
const contents = map({});
|
|
123
|
-
const data = parsedOutput.body;
|
|
124
|
-
const doc = take(data, {
|
|
125
|
-
message: __expectString,
|
|
126
|
-
});
|
|
127
|
-
Object.assign(contents, doc);
|
|
128
|
-
const exception = new InvalidParameterException({
|
|
129
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
130
|
-
...contents,
|
|
131
|
-
});
|
|
132
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
133
|
-
};
|
|
134
|
-
const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
|
|
135
|
-
const contents = map({});
|
|
136
|
-
const data = parsedOutput.body;
|
|
137
|
-
const doc = take(data, {
|
|
138
|
-
message: __expectString,
|
|
139
|
-
});
|
|
140
|
-
Object.assign(contents, doc);
|
|
141
|
-
const exception = new InvalidRequestException({
|
|
142
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
143
|
-
...contents,
|
|
144
|
-
});
|
|
145
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
146
|
-
};
|
|
147
|
-
const de_InvalidTokenExceptionRes = async (parsedOutput, context) => {
|
|
148
|
-
const contents = map({});
|
|
149
|
-
const data = parsedOutput.body;
|
|
150
|
-
const doc = take(data, {
|
|
151
|
-
message: __expectString,
|
|
152
|
-
});
|
|
153
|
-
Object.assign(contents, doc);
|
|
154
|
-
const exception = new InvalidTokenException({
|
|
155
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
156
|
-
...contents,
|
|
157
|
-
});
|
|
158
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
159
|
-
};
|
|
160
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
161
|
-
const contents = map({});
|
|
162
|
-
const data = parsedOutput.body;
|
|
163
|
-
const doc = take(data, {
|
|
164
|
-
message: __expectString,
|
|
165
|
-
});
|
|
166
|
-
Object.assign(contents, doc);
|
|
167
|
-
const exception = new ResourceNotFoundException({
|
|
168
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
169
|
-
...contents,
|
|
170
|
-
});
|
|
171
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
172
|
-
};
|
|
173
|
-
const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
174
|
-
const contents = map({});
|
|
175
|
-
const data = parsedOutput.body;
|
|
176
|
-
const doc = take(data, {
|
|
177
|
-
message: __expectString,
|
|
178
|
-
});
|
|
179
|
-
Object.assign(contents, doc);
|
|
180
|
-
const exception = new ServiceUnavailableException({
|
|
181
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
182
|
-
...contents,
|
|
183
|
-
});
|
|
184
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
185
|
-
};
|
|
186
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
187
|
-
const contents = map({});
|
|
188
|
-
const data = parsedOutput.body;
|
|
189
|
-
const doc = take(data, {
|
|
190
|
-
message: __expectString,
|
|
191
|
-
});
|
|
192
|
-
Object.assign(contents, doc);
|
|
193
|
-
const exception = new ThrottlingException({
|
|
194
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
195
|
-
...contents,
|
|
196
|
-
});
|
|
197
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
198
|
-
};
|
|
199
|
-
const de_Credentials = (output, context) => {
|
|
200
|
-
return take(output, {
|
|
201
|
-
accessKeyId: __expectString,
|
|
202
|
-
expiration: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
203
|
-
secretAccessKey: __expectString,
|
|
204
|
-
sessionToken: __expectString,
|
|
205
|
-
});
|
|
206
|
-
};
|
|
207
|
-
const deserializeMetadata = (output) => ({
|
|
208
|
-
httpStatusCode: output.statusCode,
|
|
209
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
210
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
211
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
212
|
-
});
|
|
213
|
-
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
|
|
2
|
-
import { SerdeContext as __SerdeContext } from "@smithy/types";
|
|
3
|
-
import { AssumeRoleForPodIdentityCommandInput, AssumeRoleForPodIdentityCommandOutput } from "../commands/AssumeRoleForPodIdentityCommand";
|
|
4
|
-
/**
|
|
5
|
-
* serializeAws_restJson1AssumeRoleForPodIdentityCommand
|
|
6
|
-
*/
|
|
7
|
-
export declare const se_AssumeRoleForPodIdentityCommand: (input: AssumeRoleForPodIdentityCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
8
|
-
/**
|
|
9
|
-
* deserializeAws_restJson1AssumeRoleForPodIdentityCommand
|
|
10
|
-
*/
|
|
11
|
-
export declare const de_AssumeRoleForPodIdentityCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<AssumeRoleForPodIdentityCommandOutput>;
|
|
@@ -1,17 +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
|
-
AssumeRoleForPodIdentityCommandInput,
|
|
8
|
-
AssumeRoleForPodIdentityCommandOutput,
|
|
9
|
-
} from "../commands/AssumeRoleForPodIdentityCommand";
|
|
10
|
-
export declare const se_AssumeRoleForPodIdentityCommand: (
|
|
11
|
-
input: AssumeRoleForPodIdentityCommandInput,
|
|
12
|
-
context: __SerdeContext
|
|
13
|
-
) => Promise<__HttpRequest>;
|
|
14
|
-
export declare const de_AssumeRoleForPodIdentityCommand: (
|
|
15
|
-
output: __HttpResponse,
|
|
16
|
-
context: __SerdeContext
|
|
17
|
-
) => Promise<AssumeRoleForPodIdentityCommandOutput>;
|