@aws-sdk/client-ec2 3.1075.0 → 3.1076.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 +34424 -14
- package/dist-es/models/enums.js +1 -0
- package/dist-es/schemas/schemas_0.js +10 -7
- package/dist-types/commands/CreatePlacementGroupCommand.d.ts +7 -3
- package/dist-types/commands/DeletePlacementGroupCommand.d.ts +3 -1
- package/dist-types/commands/DescribePlacementGroupsCommand.d.ts +2 -1
- package/dist-types/models/enums.d.ts +1 -0
- package/dist-types/models/models_1.d.ts +11 -0
- package/dist-types/models/models_4.d.ts +1 -1
- package/dist-types/runtimeConfig.browser.d.ts +1 -1
- package/dist-types/runtimeConfig.d.ts +1 -1
- package/dist-types/runtimeConfig.native.d.ts +1 -1
- package/dist-types/ts3.4/models/enums.d.ts +1 -0
- package/dist-types/ts3.4/models/models_1.d.ts +2 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +7 -1
- package/dist-types/ts3.4/runtimeConfig.d.ts +7 -1
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +7 -1
- package/package.json +10 -10
- package/dist-cjs/auth/httpAuthSchemeProvider.js +0 -40
- package/dist-cjs/endpoint/bdd.js +0 -49
- package/dist-cjs/endpoint/endpointResolver.js +0 -14
- package/dist-cjs/models/EC2ServiceException.js +0 -8
- package/dist-cjs/runtimeConfig.browser.js +0 -32
- package/dist-cjs/runtimeConfig.js +0 -45
- package/dist-cjs/runtimeConfig.native.js +0 -12
- package/dist-cjs/runtimeConfig.shared.js +0 -39
- package/dist-cjs/schemas/schemas_0.js +0 -33485
package/dist-es/models/enums.js
CHANGED
|
@@ -4501,8 +4501,9 @@ const _PFS = "PreviousFleetState";
|
|
|
4501
4501
|
const _PFa = "PathFilter";
|
|
4502
4502
|
const _PG = "PlacementGroup";
|
|
4503
4503
|
const _PGA = "PlacementGroupArn";
|
|
4504
|
-
const _PGI = "
|
|
4504
|
+
const _PGI = "ParentGroupId";
|
|
4505
4505
|
const _PGISL = "PlacementGroupIdStringList";
|
|
4506
|
+
const _PGIl = "PlacementGroupInfo";
|
|
4506
4507
|
const _PGL = "PlacementGroupList";
|
|
4507
4508
|
const _PGSL = "PlacementGroupStrategyList";
|
|
4508
4509
|
const _PGl = "PlacementGroups";
|
|
@@ -7477,6 +7478,7 @@ const _pFS = "previousFleetState";
|
|
|
7477
7478
|
const _pG = "placementGroup";
|
|
7478
7479
|
const _pGA = "placementGroupArn";
|
|
7479
7480
|
const _pGI = "placementGroupInfo";
|
|
7481
|
+
const _pGIa = "parentGroupId";
|
|
7480
7482
|
const _pGS = "placementGroupSet";
|
|
7481
7483
|
const _pHP = "perHourPartition";
|
|
7482
7484
|
const _pHS = "packetHeaderStatement";
|
|
@@ -10888,8 +10890,8 @@ export var CreateNetworkInterfaceResult$ = [3, n0, _CNIRr,
|
|
|
10888
10890
|
];
|
|
10889
10891
|
export var CreatePlacementGroupRequest$ = [3, n0, _CPGR,
|
|
10890
10892
|
0,
|
|
10891
|
-
[_PCa, _TS, _SLp, _LGIi, _Op, _DR, _GN, _Str],
|
|
10892
|
-
[1, [() => TagSpecificationList, { [_xN]: _TSa }], 0, 0, () => OperatorRequest$, [2, { [_eQN]: `DryRun`,
|
|
10893
|
+
[_PCa, _TS, _SLp, _LGIi, _Op, _PGI, _DR, _GN, _Str],
|
|
10894
|
+
[1, [() => TagSpecificationList, { [_xN]: _TSa }], 0, 0, () => OperatorRequest$, 0, [2, { [_eQN]: `DryRun`,
|
|
10893
10895
|
[_xN]: _dR }], [0, { [_eQN]: `GroupName`,
|
|
10894
10896
|
[_xN]: _gN }], [0, { [_eQN]: `Strategy`,
|
|
10895
10897
|
[_xN]: _str }]]
|
|
@@ -18841,7 +18843,7 @@ export var InstanceTopology$ = [3, n0, _ITnstanc,
|
|
|
18841
18843
|
];
|
|
18842
18844
|
export var InstanceTypeInfo$ = [3, n0, _ITIn,
|
|
18843
18845
|
0,
|
|
18844
|
-
[_IT, _CGur, _FTE, _SUC, _SRDT, _SVT, _BMa, _Hy, _PIro, _VCIpu, _MIe, _ISSn, _ISIns, _EIb, _NIetw, _GIp, _FIpga,
|
|
18846
|
+
[_IT, _CGur, _FTE, _SUC, _SRDT, _SVT, _BMa, _Hy, _PIro, _VCIpu, _MIe, _ISSn, _ISIns, _EIb, _NIetw, _GIp, _FIpga, _PGIl, _IAIn, _HS, _BPS, _DHS, _ARS, _SBM, _NES, _NTS, _NTI, _MAIe, _NIeu, _PSh, _RMS, _SIRu],
|
|
18845
18847
|
[[0, { [_eQN]: `InstanceType`,
|
|
18846
18848
|
[_xN]: _iT }], [2, { [_eQN]: `CurrentGeneration`,
|
|
18847
18849
|
[_xN]: _cGur }], [2, { [_eQN]: `FreeTierEligible`,
|
|
@@ -21824,7 +21826,7 @@ export var Placement$ = [3, n0, _Pla,
|
|
|
21824
21826
|
];
|
|
21825
21827
|
export var PlacementGroup$ = [3, n0, _PG,
|
|
21826
21828
|
0,
|
|
21827
|
-
[_GN, _St, _Str, _PCa, _GIr, _T, _GA, _SLp, _LGIi, _Op],
|
|
21829
|
+
[_GN, _St, _Str, _PCa, _GIr, _T, _GA, _SLp, _LGIi, _Op, _PGI],
|
|
21828
21830
|
[[0, { [_eQN]: `GroupName`,
|
|
21829
21831
|
[_xN]: _gN }], [0, { [_eQN]: `State`,
|
|
21830
21832
|
[_xN]: _st }], [0, { [_eQN]: `Strategy`,
|
|
@@ -21835,9 +21837,10 @@ export var PlacementGroup$ = [3, n0, _PG,
|
|
|
21835
21837
|
[_xN]: _gA }], [0, { [_eQN]: `SpreadLevel`,
|
|
21836
21838
|
[_xN]: _sLp }], [0, { [_eQN]: `LinkedGroupId`,
|
|
21837
21839
|
[_xN]: _lGIi }], [() => OperatorResponse$, { [_eQN]: `Operator`,
|
|
21838
|
-
[_xN]: _ope }]]
|
|
21840
|
+
[_xN]: _ope }], [0, { [_eQN]: `ParentGroupId`,
|
|
21841
|
+
[_xN]: _pGIa }]]
|
|
21839
21842
|
];
|
|
21840
|
-
export var PlacementGroupInfo$ = [3, n0,
|
|
21843
|
+
export var PlacementGroupInfo$ = [3, n0, _PGIl,
|
|
21841
21844
|
0,
|
|
21842
21845
|
[_SSu],
|
|
21843
21846
|
[[() => PlacementGroupStrategyList, { [_eQN]: `SupportedStrategies`,
|
|
@@ -36,7 +36,9 @@ declare const CreatePlacementGroupCommand_base: {
|
|
|
36
36
|
* A <code>spread</code> placement group places instances on distinct hardware. A
|
|
37
37
|
* <code>partition</code> placement group places groups of instances in different
|
|
38
38
|
* partitions, where instances in one partition do not share the same hardware with
|
|
39
|
-
* instances in another partition
|
|
39
|
+
* instances in another partition. A <code>precision-time</code> placement group places
|
|
40
|
+
* instances on supported hardware with direct access to high-precision time sources in
|
|
41
|
+
* AWS infrastructure.</p>
|
|
40
42
|
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html">Placement groups</a> in the
|
|
41
43
|
* <i>Amazon EC2 User Guide</i>.</p>
|
|
42
44
|
* @example
|
|
@@ -65,9 +67,10 @@ declare const CreatePlacementGroupCommand_base: {
|
|
|
65
67
|
* Operator: { // OperatorRequest
|
|
66
68
|
* Principal: "STRING_VALUE",
|
|
67
69
|
* },
|
|
70
|
+
* ParentGroupId: "STRING_VALUE",
|
|
68
71
|
* DryRun: true || false,
|
|
69
72
|
* GroupName: "STRING_VALUE",
|
|
70
|
-
* Strategy: "cluster" || "spread" || "partition",
|
|
73
|
+
* Strategy: "cluster" || "spread" || "partition" || "precision-time",
|
|
71
74
|
* };
|
|
72
75
|
* const command = new CreatePlacementGroupCommand(input);
|
|
73
76
|
* const response = await client.send(command);
|
|
@@ -75,7 +78,7 @@ declare const CreatePlacementGroupCommand_base: {
|
|
|
75
78
|
* // PlacementGroup: { // PlacementGroup
|
|
76
79
|
* // GroupName: "STRING_VALUE",
|
|
77
80
|
* // State: "pending" || "available" || "deleting" || "deleted",
|
|
78
|
-
* // Strategy: "cluster" || "spread" || "partition",
|
|
81
|
+
* // Strategy: "cluster" || "spread" || "partition" || "precision-time",
|
|
79
82
|
* // PartitionCount: Number("int"),
|
|
80
83
|
* // GroupId: "STRING_VALUE",
|
|
81
84
|
* // Tags: [ // TagList
|
|
@@ -92,6 +95,7 @@ declare const CreatePlacementGroupCommand_base: {
|
|
|
92
95
|
* // Principal: "STRING_VALUE",
|
|
93
96
|
* // HiddenByDefault: true || false,
|
|
94
97
|
* // },
|
|
98
|
+
* // ParentGroupId: "STRING_VALUE",
|
|
95
99
|
* // },
|
|
96
100
|
* // };
|
|
97
101
|
*
|
|
@@ -30,7 +30,9 @@ declare const DeletePlacementGroupCommand_base: {
|
|
|
30
30
|
};
|
|
31
31
|
/**
|
|
32
32
|
* <p>Deletes the specified placement group. You must terminate all instances in the
|
|
33
|
-
* placement group before you can delete the placement group.
|
|
33
|
+
* placement group before you can delete the placement group. You cannot delete a
|
|
34
|
+
* placement group that is a parent of a cluster placement group. Delete the cluster
|
|
35
|
+
* placement groups first. For more information, see
|
|
34
36
|
* <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html">Placement groups</a> in the <i>Amazon EC2 User Guide</i>.</p>
|
|
35
37
|
* @example
|
|
36
38
|
* Use a bare-bones client and the command you need to make an API call.
|
|
@@ -71,7 +71,7 @@ declare const DescribePlacementGroupsCommand_base: {
|
|
|
71
71
|
* // { // PlacementGroup
|
|
72
72
|
* // GroupName: "STRING_VALUE",
|
|
73
73
|
* // State: "pending" || "available" || "deleting" || "deleted",
|
|
74
|
-
* // Strategy: "cluster" || "spread" || "partition",
|
|
74
|
+
* // Strategy: "cluster" || "spread" || "partition" || "precision-time",
|
|
75
75
|
* // PartitionCount: Number("int"),
|
|
76
76
|
* // GroupId: "STRING_VALUE",
|
|
77
77
|
* // Tags: [ // TagList
|
|
@@ -88,6 +88,7 @@ declare const DescribePlacementGroupsCommand_base: {
|
|
|
88
88
|
* // Principal: "STRING_VALUE",
|
|
89
89
|
* // HiddenByDefault: true || false,
|
|
90
90
|
* // },
|
|
91
|
+
* // ParentGroupId: "STRING_VALUE",
|
|
91
92
|
* // },
|
|
92
93
|
* // ],
|
|
93
94
|
* // };
|
|
@@ -4051,6 +4051,7 @@ export type SpreadLevel = (typeof SpreadLevel)[keyof typeof SpreadLevel];
|
|
|
4051
4051
|
export declare const PlacementStrategy: {
|
|
4052
4052
|
readonly cluster: "cluster";
|
|
4053
4053
|
readonly partition: "partition";
|
|
4054
|
+
readonly precision_time: "precision-time";
|
|
4054
4055
|
readonly spread: "spread";
|
|
4055
4056
|
};
|
|
4056
4057
|
/**
|
|
@@ -11647,6 +11647,12 @@ export interface CreatePlacementGroupRequest {
|
|
|
11647
11647
|
* @public
|
|
11648
11648
|
*/
|
|
11649
11649
|
Operator?: OperatorRequest | undefined;
|
|
11650
|
+
/**
|
|
11651
|
+
* <p>The ID of a parent placement group. Valid only when <b>Strategy</b>
|
|
11652
|
+
* is set to <code>cluster</code>.</p>
|
|
11653
|
+
* @public
|
|
11654
|
+
*/
|
|
11655
|
+
ParentGroupId?: string | undefined;
|
|
11650
11656
|
/**
|
|
11651
11657
|
* <p>Checks whether you have the required permissions for the operation, without actually making the
|
|
11652
11658
|
* request, and provides an error response. If you have the required permissions, the error response is
|
|
@@ -11724,6 +11730,11 @@ export interface PlacementGroup {
|
|
|
11724
11730
|
* @public
|
|
11725
11731
|
*/
|
|
11726
11732
|
Operator?: OperatorResponse | undefined;
|
|
11733
|
+
/**
|
|
11734
|
+
* <p>The ID of the parent placement group.</p>
|
|
11735
|
+
* @public
|
|
11736
|
+
*/
|
|
11737
|
+
ParentGroupId?: string | undefined;
|
|
11727
11738
|
}
|
|
11728
11739
|
/**
|
|
11729
11740
|
* @public
|
|
@@ -8183,7 +8183,7 @@ export interface DescribePlacementGroupsRequest {
|
|
|
8183
8183
|
* <p>
|
|
8184
8184
|
* <code>strategy</code> - The strategy of the placement group
|
|
8185
8185
|
* (<code>cluster</code> | <code>spread</code> |
|
|
8186
|
-
* <code>partition</code>).</p>
|
|
8186
|
+
* <code>partition</code> | <code>precision-time</code>).</p>
|
|
8187
8187
|
* </li>
|
|
8188
8188
|
* <li>
|
|
8189
8189
|
* <p>
|
|
@@ -14,7 +14,7 @@ export declare const getRuntimeConfig: (config: EC2ClientConfig) => {
|
|
|
14
14
|
requestHandler: import("@smithy/core/protocols").HttpHandler<any> | RequestHandler;
|
|
15
15
|
retryMode: string | import("@smithy/types").Provider<string>;
|
|
16
16
|
sha256: import("@smithy/types").HashConstructor;
|
|
17
|
-
streamCollector: import("
|
|
17
|
+
streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream | ReadableStream | Blob) => Promise<Uint8Array>;
|
|
18
18
|
useDualstackEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
|
|
19
19
|
useFipsEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
|
|
20
20
|
cacheMiddleware?: boolean | undefined;
|
|
@@ -15,7 +15,7 @@ export declare const getRuntimeConfig: (config: EC2ClientConfig) => {
|
|
|
15
15
|
requestHandler: RequestHandler | import("@smithy/core/protocols").HttpHandler<any>;
|
|
16
16
|
retryMode: string | import("@smithy/types").Provider<string>;
|
|
17
17
|
sha256: import("@smithy/types").HashConstructor;
|
|
18
|
-
streamCollector: import("
|
|
18
|
+
streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream | ReadableStream | Blob) => Promise<Uint8Array>;
|
|
19
19
|
useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
|
20
20
|
useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
|
21
21
|
userAgentAppId: string | import("@smithy/types").Provider<string | undefined>;
|
|
@@ -15,7 +15,7 @@ export declare const getRuntimeConfig: (config: EC2ClientConfig) => {
|
|
|
15
15
|
apiVersion: string;
|
|
16
16
|
urlParser: import("@smithy/types").UrlParser;
|
|
17
17
|
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
|
|
18
|
-
streamCollector: import("
|
|
18
|
+
streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream | ReadableStream | Blob) => Promise<Uint8Array>;
|
|
19
19
|
base64Decoder: import("@smithy/types").Decoder;
|
|
20
20
|
base64Encoder: (_input: Uint8Array | string) => string;
|
|
21
21
|
utf8Decoder: import("@smithy/types").Decoder;
|
|
@@ -2837,6 +2837,7 @@ export type SpreadLevel = (typeof SpreadLevel)[keyof typeof SpreadLevel];
|
|
|
2837
2837
|
export declare const PlacementStrategy: {
|
|
2838
2838
|
readonly cluster: "cluster";
|
|
2839
2839
|
readonly partition: "partition";
|
|
2840
|
+
readonly precision_time: "precision-time";
|
|
2840
2841
|
readonly spread: "spread";
|
|
2841
2842
|
};
|
|
2842
2843
|
export type PlacementStrategy =
|
|
@@ -2098,6 +2098,7 @@ export interface CreatePlacementGroupRequest {
|
|
|
2098
2098
|
SpreadLevel?: SpreadLevel | undefined;
|
|
2099
2099
|
LinkedGroupId?: string | undefined;
|
|
2100
2100
|
Operator?: OperatorRequest | undefined;
|
|
2101
|
+
ParentGroupId?: string | undefined;
|
|
2101
2102
|
DryRun?: boolean | undefined;
|
|
2102
2103
|
GroupName?: string | undefined;
|
|
2103
2104
|
Strategy?: PlacementStrategy | undefined;
|
|
@@ -2113,6 +2114,7 @@ export interface PlacementGroup {
|
|
|
2113
2114
|
SpreadLevel?: SpreadLevel | undefined;
|
|
2114
2115
|
LinkedGroupId?: string | undefined;
|
|
2115
2116
|
Operator?: OperatorResponse | undefined;
|
|
2117
|
+
ParentGroupId?: string | undefined;
|
|
2116
2118
|
}
|
|
2117
2119
|
export interface CreatePlacementGroupResult {
|
|
2118
2120
|
PlacementGroup?: PlacementGroup | undefined;
|
|
@@ -21,7 +21,13 @@ export declare const getRuntimeConfig: (config: EC2ClientConfig) => {
|
|
|
21
21
|
| RequestHandler;
|
|
22
22
|
retryMode: string | import("@smithy/types").Provider<string>;
|
|
23
23
|
sha256: import("@smithy/types").HashConstructor;
|
|
24
|
-
streamCollector:
|
|
24
|
+
streamCollector: (
|
|
25
|
+
stream:
|
|
26
|
+
| import("stream").Readable
|
|
27
|
+
| import("stream/web").ReadableStream
|
|
28
|
+
| ReadableStream
|
|
29
|
+
| Blob
|
|
30
|
+
) => Promise<Uint8Array>;
|
|
25
31
|
useDualstackEndpoint: (boolean | import("@smithy/types").Provider<boolean>) &
|
|
26
32
|
(boolean | import("@smithy/types").Provider<boolean | undefined>);
|
|
27
33
|
useFipsEndpoint: (boolean | import("@smithy/types").Provider<boolean>) &
|
|
@@ -22,7 +22,13 @@ export declare const getRuntimeConfig: (config: EC2ClientConfig) => {
|
|
|
22
22
|
| import("@smithy/core/protocols").HttpHandler<any>;
|
|
23
23
|
retryMode: string | import("@smithy/types").Provider<string>;
|
|
24
24
|
sha256: import("@smithy/types").HashConstructor;
|
|
25
|
-
streamCollector:
|
|
25
|
+
streamCollector: (
|
|
26
|
+
stream:
|
|
27
|
+
| import("stream").Readable
|
|
28
|
+
| import("stream/web").ReadableStream
|
|
29
|
+
| ReadableStream
|
|
30
|
+
| Blob
|
|
31
|
+
) => Promise<Uint8Array>;
|
|
26
32
|
useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
|
27
33
|
useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
|
28
34
|
userAgentAppId: string | import("@smithy/types").Provider<string | undefined>;
|
|
@@ -20,7 +20,13 @@ export declare const getRuntimeConfig: (config: EC2ClientConfig) => {
|
|
|
20
20
|
apiVersion: string;
|
|
21
21
|
urlParser: import("@smithy/types").UrlParser;
|
|
22
22
|
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
|
|
23
|
-
streamCollector:
|
|
23
|
+
streamCollector: (
|
|
24
|
+
stream:
|
|
25
|
+
| import("stream").Readable
|
|
26
|
+
| import("stream/web").ReadableStream
|
|
27
|
+
| ReadableStream
|
|
28
|
+
| Blob
|
|
29
|
+
) => Promise<Uint8Array>;
|
|
24
30
|
base64Decoder: import("@smithy/types").Decoder;
|
|
25
31
|
base64Encoder: (_input: Uint8Array | string) => string;
|
|
26
32
|
utf8Decoder: import("@smithy/types").Decoder;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-ec2",
|
|
3
3
|
"description": "AWS SDK for JavaScript Ec2 Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.1076.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline",
|
|
@@ -27,18 +27,18 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
29
29
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
30
|
-
"@aws-sdk/core": "^3.974.
|
|
31
|
-
"@aws-sdk/credential-provider-node": "^3.972.
|
|
32
|
-
"@aws-sdk/middleware-sdk-ec2": "^3.972.
|
|
33
|
-
"@aws-sdk/types": "^3.973.
|
|
34
|
-
"@smithy/core": "^3.
|
|
35
|
-
"@smithy/fetch-http-handler": "^5.
|
|
36
|
-
"@smithy/node-http-handler": "^4.
|
|
37
|
-
"@smithy/types": "^4.
|
|
30
|
+
"@aws-sdk/core": "^3.974.24",
|
|
31
|
+
"@aws-sdk/credential-provider-node": "^3.972.59",
|
|
32
|
+
"@aws-sdk/middleware-sdk-ec2": "^3.972.38",
|
|
33
|
+
"@aws-sdk/types": "^3.973.14",
|
|
34
|
+
"@smithy/core": "^3.27.0",
|
|
35
|
+
"@smithy/fetch-http-handler": "^5.6.0",
|
|
36
|
+
"@smithy/node-http-handler": "^4.9.0",
|
|
37
|
+
"@smithy/types": "^4.15.0",
|
|
38
38
|
"tslib": "^2.6.2"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@smithy/snapshot-testing": "^2.
|
|
41
|
+
"@smithy/snapshot-testing": "^2.2.3",
|
|
42
42
|
"@tsconfig/node20": "20.1.8",
|
|
43
43
|
"@types/node": "^20.14.8",
|
|
44
44
|
"concurrently": "7.0.0",
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
const { resolveAwsSdkSigV4Config } = require("@aws-sdk/core/httpAuthSchemes");
|
|
2
|
-
const { getSmithyContext, normalizeProvider } = require("@smithy/core/client");
|
|
3
|
-
exports.defaultEC2HttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
4
|
-
return {
|
|
5
|
-
operation: getSmithyContext(context).operation,
|
|
6
|
-
region: await normalizeProvider(config.region)() || (() => {
|
|
7
|
-
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
8
|
-
})(),
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
|
12
|
-
return {
|
|
13
|
-
schemeId: "aws.auth#sigv4",
|
|
14
|
-
signingProperties: {
|
|
15
|
-
name: "ec2",
|
|
16
|
-
region: authParameters.region,
|
|
17
|
-
},
|
|
18
|
-
propertiesExtractor: (config, context) => ({
|
|
19
|
-
signingProperties: {
|
|
20
|
-
config,
|
|
21
|
-
context,
|
|
22
|
-
},
|
|
23
|
-
}),
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
exports.defaultEC2HttpAuthSchemeProvider = (authParameters) => {
|
|
27
|
-
const options = [];
|
|
28
|
-
switch (authParameters.operation) {
|
|
29
|
-
default: {
|
|
30
|
-
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
return options;
|
|
34
|
-
};
|
|
35
|
-
exports.resolveHttpAuthSchemeConfig = (config) => {
|
|
36
|
-
const config_0 = resolveAwsSdkSigV4Config(config);
|
|
37
|
-
return Object.assign(config_0, {
|
|
38
|
-
authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
|
|
39
|
-
});
|
|
40
|
-
};
|
package/dist-cjs/endpoint/bdd.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
const { BinaryDecisionDiagram } = require("@smithy/core/endpoints");
|
|
2
|
-
const k = "ref";
|
|
3
|
-
const a = -1, b = true, c = "isSet", d = "PartitionResult", e = "booleanEquals", f = "getAttr", g = { [k]: "Endpoint" }, h = { [k]: d }, i = {}, j = [{ [k]: "Region" }];
|
|
4
|
-
const _data = {
|
|
5
|
-
conditions: [
|
|
6
|
-
[c, [g]],
|
|
7
|
-
[c, j],
|
|
8
|
-
["aws.partition", j, d],
|
|
9
|
-
[e, [{ [k]: "UseFIPS" }, b]],
|
|
10
|
-
[e, [{ [k]: "UseDualStack" }, b]],
|
|
11
|
-
[e, [{ fn: f, argv: [h, "supportsDualStack"] }, b]],
|
|
12
|
-
[e, [{ fn: f, argv: [h, "supportsFIPS"] }, b]],
|
|
13
|
-
["stringEquals", [{ fn: f, argv: [h, "name"] }, "aws-us-gov"]]
|
|
14
|
-
],
|
|
15
|
-
results: [
|
|
16
|
-
[a],
|
|
17
|
-
[a, "Invalid Configuration: FIPS and custom endpoint are not supported"],
|
|
18
|
-
[a, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
|
|
19
|
-
[g, i],
|
|
20
|
-
["https://ec2-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
|
|
21
|
-
[a, "FIPS and DualStack are enabled, but this partition does not support one or both"],
|
|
22
|
-
["https://ec2.{Region}.amazonaws.com", i],
|
|
23
|
-
["https://ec2-fips.{Region}.{PartitionResult#dnsSuffix}", i],
|
|
24
|
-
[a, "FIPS is enabled but this partition does not support FIPS"],
|
|
25
|
-
["https://ec2.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
|
|
26
|
-
[a, "DualStack is enabled but this partition does not support DualStack"],
|
|
27
|
-
["https://ec2.{Region}.{PartitionResult#dnsSuffix}", i],
|
|
28
|
-
[a, "Invalid Configuration: Missing Region"]
|
|
29
|
-
]
|
|
30
|
-
};
|
|
31
|
-
const root = 2;
|
|
32
|
-
const r = 100_000_000;
|
|
33
|
-
const nodes = new Int32Array([
|
|
34
|
-
-1, 1, -1,
|
|
35
|
-
0, 13, 3,
|
|
36
|
-
1, 4, r + 12,
|
|
37
|
-
2, 5, r + 12,
|
|
38
|
-
3, 8, 6,
|
|
39
|
-
4, 7, r + 11,
|
|
40
|
-
5, r + 9, r + 10,
|
|
41
|
-
4, 11, 9,
|
|
42
|
-
6, 10, r + 8,
|
|
43
|
-
7, r + 6, r + 7,
|
|
44
|
-
5, 12, r + 5,
|
|
45
|
-
6, r + 4, r + 5,
|
|
46
|
-
3, r + 1, 14,
|
|
47
|
-
4, r + 2, r + 3,
|
|
48
|
-
]);
|
|
49
|
-
exports.bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
const { awsEndpointFunctions } = require("@aws-sdk/core/client");
|
|
2
|
-
const { customEndpointFunctions, decideEndpoint, EndpointCache } = require("@smithy/core/endpoints");
|
|
3
|
-
const { bdd } = require("./bdd");
|
|
4
|
-
const cache = new EndpointCache({
|
|
5
|
-
size: 50,
|
|
6
|
-
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
|
|
7
|
-
});
|
|
8
|
-
exports.defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
9
|
-
return cache.get(endpointParams, () => decideEndpoint(bdd, {
|
|
10
|
-
endpointParams: endpointParams,
|
|
11
|
-
logger: context.logger,
|
|
12
|
-
}));
|
|
13
|
-
};
|
|
14
|
-
customEndpointFunctions.aws = awsEndpointFunctions;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
const { ServiceException: __ServiceException } = require("@smithy/core/client");
|
|
2
|
-
exports.__ServiceException = __ServiceException;
|
|
3
|
-
exports.EC2ServiceException = class EC2ServiceException extends __ServiceException {
|
|
4
|
-
constructor(options) {
|
|
5
|
-
super(options);
|
|
6
|
-
Object.setPrototypeOf(this, EC2ServiceException.prototype);
|
|
7
|
-
}
|
|
8
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
const packageInfo = require("../package.json");
|
|
2
|
-
const { Sha256 } = require("@aws-crypto/sha256-browser");
|
|
3
|
-
const { createDefaultUserAgentProvider } = require("@aws-sdk/core/client");
|
|
4
|
-
const { invalidProvider, loadConfigsForDefaultMode } = require("@smithy/core/client");
|
|
5
|
-
const { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT, resolveDefaultsModeConfig } = require("@smithy/core/config");
|
|
6
|
-
const { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } = require("@smithy/core/retry");
|
|
7
|
-
const { calculateBodyLength } = require("@smithy/core/serde");
|
|
8
|
-
const { FetchHttpHandler: RequestHandler, streamCollector } = require("@smithy/fetch-http-handler");
|
|
9
|
-
const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
|
|
10
|
-
const getRuntimeConfig = (config) => {
|
|
11
|
-
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
12
|
-
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
13
|
-
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
14
|
-
return {
|
|
15
|
-
...clientSharedValues,
|
|
16
|
-
...config,
|
|
17
|
-
runtime: "browser",
|
|
18
|
-
defaultsMode,
|
|
19
|
-
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
20
|
-
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
21
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
22
|
-
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
23
|
-
region: config?.region ?? invalidProvider("Region is missing"),
|
|
24
|
-
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
25
|
-
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
|
|
26
|
-
sha256: config?.sha256 ?? Sha256,
|
|
27
|
-
streamCollector: config?.streamCollector ?? streamCollector,
|
|
28
|
-
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
29
|
-
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
const packageInfo = require("../package.json");
|
|
2
|
-
const { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion: awsCheckVersion, NODE_APP_ID_CONFIG_OPTIONS } = require("@aws-sdk/core/client");
|
|
3
|
-
const { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require("@aws-sdk/core/httpAuthSchemes");
|
|
4
|
-
const { defaultProvider: credentialDefaultProvider } = require("@aws-sdk/credential-provider-node");
|
|
5
|
-
const { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } = require("@smithy/core/client");
|
|
6
|
-
const { loadConfig: loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig } = require("@smithy/core/config");
|
|
7
|
-
const { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } = require("@smithy/core/retry");
|
|
8
|
-
const { calculateBodyLength, Hash } = require("@smithy/core/serde");
|
|
9
|
-
const { NodeHttpHandler: RequestHandler, streamCollector } = require("@smithy/node-http-handler");
|
|
10
|
-
const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
|
|
11
|
-
const getRuntimeConfig = (config) => {
|
|
12
|
-
emitWarningIfUnsupportedVersion(process.version);
|
|
13
|
-
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
14
|
-
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
15
|
-
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
16
|
-
awsCheckVersion(process.version);
|
|
17
|
-
const loaderConfig = {
|
|
18
|
-
profile: config?.profile,
|
|
19
|
-
logger: clientSharedValues.logger,
|
|
20
|
-
};
|
|
21
|
-
return {
|
|
22
|
-
...clientSharedValues,
|
|
23
|
-
...config,
|
|
24
|
-
runtime: "node",
|
|
25
|
-
defaultsMode,
|
|
26
|
-
authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
|
27
|
-
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
28
|
-
credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
|
|
29
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
30
|
-
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
31
|
-
region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
|
32
|
-
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
33
|
-
retryMode: config?.retryMode ??
|
|
34
|
-
loadNodeConfig({
|
|
35
|
-
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
36
|
-
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
37
|
-
}, config),
|
|
38
|
-
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
39
|
-
streamCollector: config?.streamCollector ?? streamCollector,
|
|
40
|
-
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
41
|
-
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
42
|
-
userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
const { Sha256 } = require("@aws-crypto/sha256-js");
|
|
2
|
-
const { getRuntimeConfig: getBrowserRuntimeConfig } = require("./runtimeConfig.browser");
|
|
3
|
-
const getRuntimeConfig = (config) => {
|
|
4
|
-
const browserDefaults = getBrowserRuntimeConfig(config);
|
|
5
|
-
return {
|
|
6
|
-
...browserDefaults,
|
|
7
|
-
...config,
|
|
8
|
-
runtime: "react-native",
|
|
9
|
-
sha256: config?.sha256 ?? Sha256,
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
const { AwsSdkSigV4Signer } = require("@aws-sdk/core/httpAuthSchemes");
|
|
2
|
-
const { AwsEc2QueryProtocol } = require("@aws-sdk/core/protocols");
|
|
3
|
-
const { NoOpLogger } = require("@smithy/core/client");
|
|
4
|
-
const { parseUrl } = require("@smithy/core/protocols");
|
|
5
|
-
const { fromBase64, fromUtf8, toBase64, toUtf8 } = require("@smithy/core/serde");
|
|
6
|
-
const { defaultEC2HttpAuthSchemeProvider } = require("./auth/httpAuthSchemeProvider");
|
|
7
|
-
const { defaultEndpointResolver } = require("./endpoint/endpointResolver");
|
|
8
|
-
const { errorTypeRegistries } = require("./schemas/schemas_0");
|
|
9
|
-
exports.getRuntimeConfig = (config) => {
|
|
10
|
-
return {
|
|
11
|
-
apiVersion: "2016-11-15",
|
|
12
|
-
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
13
|
-
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
14
|
-
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
15
|
-
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
16
|
-
extensions: config?.extensions ?? [],
|
|
17
|
-
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultEC2HttpAuthSchemeProvider,
|
|
18
|
-
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
19
|
-
{
|
|
20
|
-
schemeId: "aws.auth#sigv4",
|
|
21
|
-
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
22
|
-
signer: new AwsSdkSigV4Signer(),
|
|
23
|
-
},
|
|
24
|
-
],
|
|
25
|
-
logger: config?.logger ?? new NoOpLogger(),
|
|
26
|
-
protocol: config?.protocol ?? AwsEc2QueryProtocol,
|
|
27
|
-
protocolSettings: config?.protocolSettings ?? {
|
|
28
|
-
defaultNamespace: "com.amazonaws.ec2",
|
|
29
|
-
errorTypeRegistries,
|
|
30
|
-
xmlNamespace: "http://ec2.amazonaws.com/doc/2016-11-15",
|
|
31
|
-
version: "2016-11-15",
|
|
32
|
-
serviceTarget: "AmazonEC2",
|
|
33
|
-
},
|
|
34
|
-
serviceId: config?.serviceId ?? "EC2",
|
|
35
|
-
urlParser: config?.urlParser ?? parseUrl,
|
|
36
|
-
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
37
|
-
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
38
|
-
};
|
|
39
|
-
};
|