@aws-sdk/middleware-sdk-ec2
Advanced tools
Comparing version 3.199.0 to 3.200.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [3.200.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.199.0...v3.200.0) (2022-10-31) | ||
### Bug Fixes | ||
* **endpoint:** instruct rds middleware to wait for endpoint resolution ([#4120](https://github.com/aws/aws-sdk-js-v3/issues/4120)) ([7cabc1e](https://github.com/aws/aws-sdk-js-v3/commit/7cabc1ebe4f1f8c37b29b421572b69cf57d2eb4b)) | ||
# [3.199.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.198.0...v3.199.0) (2022-10-28) | ||
@@ -8,0 +19,0 @@ |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getCopySnapshotPresignedUrlPlugin = exports.copySnapshotPresignedUrlMiddlewareOptions = exports.copySnapshotPresignedUrlMiddleware = void 0; | ||
const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); | ||
const protocol_http_1 = require("@aws-sdk/protocol-http"); | ||
@@ -9,7 +10,7 @@ const signature_v4_1 = require("@aws-sdk/signature-v4"); | ||
function copySnapshotPresignedUrlMiddleware(options) { | ||
return (next) => async (args) => { | ||
return (next, context) => async (args) => { | ||
const { input } = args; | ||
if (!input.PresignedUrl) { | ||
const region = await options.region(); | ||
const resolvedEndpoint = await options.endpoint(); | ||
const resolvedEndpoint = typeof options.endpoint === "function" ? await options.endpoint() : (0, middleware_endpoint_1.toEndpointV1)(context.endpointV2); | ||
if (typeof options.regionInfoProvider === "function") { | ||
@@ -60,6 +61,8 @@ const regionInfo = await options.regionInfoProvider(input.SourceRegion); | ||
exports.copySnapshotPresignedUrlMiddlewareOptions = { | ||
step: "initialize", | ||
step: "serialize", | ||
tags: ["CROSS_REGION_PRESIGNED_URL"], | ||
name: "crossRegionPresignedUrlMiddleware", | ||
override: true, | ||
relation: "after", | ||
toMiddleware: "endpointV2Middleware", | ||
}; | ||
@@ -66,0 +69,0 @@ const getCopySnapshotPresignedUrlPlugin = (config) => ({ |
@@ -0,1 +1,2 @@ | ||
import { toEndpointV1 } from "@aws-sdk/middleware-endpoint"; | ||
import { HttpRequest } from "@aws-sdk/protocol-http"; | ||
@@ -6,7 +7,7 @@ import { SignatureV4 } from "@aws-sdk/signature-v4"; | ||
export function copySnapshotPresignedUrlMiddleware(options) { | ||
return (next) => async (args) => { | ||
return (next, context) => async (args) => { | ||
const { input } = args; | ||
if (!input.PresignedUrl) { | ||
const region = await options.region(); | ||
const resolvedEndpoint = await options.endpoint(); | ||
const resolvedEndpoint = typeof options.endpoint === "function" ? await options.endpoint() : toEndpointV1(context.endpointV2); | ||
if (typeof options.regionInfoProvider === "function") { | ||
@@ -56,6 +57,8 @@ const regionInfo = await options.regionInfoProvider(input.SourceRegion); | ||
export const copySnapshotPresignedUrlMiddlewareOptions = { | ||
step: "initialize", | ||
step: "serialize", | ||
tags: ["CROSS_REGION_PRESIGNED_URL"], | ||
name: "crossRegionPresignedUrlMiddleware", | ||
override: true, | ||
relation: "after", | ||
toMiddleware: "endpointV2Middleware", | ||
}; | ||
@@ -62,0 +65,0 @@ export const getCopySnapshotPresignedUrlPlugin = (config) => ({ |
@@ -1,5 +0,5 @@ | ||
import { Credentials, Endpoint, HashConstructor, InitializeHandlerOptions, InitializeMiddleware, MemoizedProvider, Pluggable, Provider, RegionInfoProvider } from "@aws-sdk/types"; | ||
import { Credentials, Endpoint, HashConstructor, InitializeMiddleware, MemoizedProvider, Pluggable, Provider, RegionInfoProvider, RelativeMiddlewareOptions, SerializeHandlerOptions } from "@aws-sdk/types"; | ||
interface PreviouslyResolved { | ||
credentials: MemoizedProvider<Credentials>; | ||
endpoint: Provider<Endpoint>; | ||
endpoint?: Provider<Endpoint>; | ||
region: Provider<string>; | ||
@@ -11,4 +11,4 @@ sha256: HashConstructor; | ||
export declare function copySnapshotPresignedUrlMiddleware(options: PreviouslyResolved): InitializeMiddleware<any, any>; | ||
export declare const copySnapshotPresignedUrlMiddlewareOptions: InitializeHandlerOptions; | ||
export declare const copySnapshotPresignedUrlMiddlewareOptions: SerializeHandlerOptions & RelativeMiddlewareOptions; | ||
export declare const getCopySnapshotPresignedUrlPlugin: (config: PreviouslyResolved) => Pluggable<any, any>; | ||
export {}; |
@@ -5,3 +5,2 @@ import { | ||
HashConstructor, | ||
InitializeHandlerOptions, | ||
InitializeMiddleware, | ||
@@ -12,6 +11,8 @@ MemoizedProvider, | ||
RegionInfoProvider, | ||
RelativeMiddlewareOptions, | ||
SerializeHandlerOptions, | ||
} from "@aws-sdk/types"; | ||
interface PreviouslyResolved { | ||
credentials: MemoizedProvider<Credentials>; | ||
endpoint: Provider<Endpoint>; | ||
endpoint?: Provider<Endpoint>; | ||
region: Provider<string>; | ||
@@ -25,3 +26,4 @@ sha256: HashConstructor; | ||
): InitializeMiddleware<any, any>; | ||
export declare const copySnapshotPresignedUrlMiddlewareOptions: InitializeHandlerOptions; | ||
export declare const copySnapshotPresignedUrlMiddlewareOptions: SerializeHandlerOptions & | ||
RelativeMiddlewareOptions; | ||
export declare const getCopySnapshotPresignedUrlPlugin: ( | ||
@@ -28,0 +30,0 @@ config: PreviouslyResolved |
{ | ||
"name": "@aws-sdk/middleware-sdk-ec2", | ||
"version": "3.199.0", | ||
"version": "3.200.0", | ||
"scripts": { | ||
@@ -23,6 +23,7 @@ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", | ||
"dependencies": { | ||
"@aws-sdk/protocol-http": "3.198.0", | ||
"@aws-sdk/signature-v4": "3.198.0", | ||
"@aws-sdk/types": "3.198.0", | ||
"@aws-sdk/util-format-url": "3.199.0", | ||
"@aws-sdk/middleware-endpoint": "3.200.0", | ||
"@aws-sdk/protocol-http": "3.200.0", | ||
"@aws-sdk/signature-v4": "3.200.0", | ||
"@aws-sdk/types": "3.200.0", | ||
"@aws-sdk/util-format-url": "3.200.0", | ||
"tslib": "^2.3.1" | ||
@@ -29,0 +30,0 @@ }, |
54736
258
6
+ Added@aws-sdk/middleware-endpoint@3.200.0(transitive)
+ Added@aws-sdk/middleware-serde@3.200.0(transitive)
+ Added@aws-sdk/protocol-http@3.200.0(transitive)
+ Added@aws-sdk/querystring-builder@3.200.0(transitive)
+ Added@aws-sdk/querystring-parser@3.200.0(transitive)
+ Added@aws-sdk/signature-v4@3.200.0(transitive)
+ Added@aws-sdk/types@3.200.0(transitive)
+ Added@aws-sdk/url-parser@3.200.0(transitive)
+ Added@aws-sdk/util-config-provider@3.188.0(transitive)
+ Added@aws-sdk/util-format-url@3.200.0(transitive)
+ Added@aws-sdk/util-middleware@3.200.0(transitive)
- Removed@aws-sdk/protocol-http@3.198.0(transitive)
- Removed@aws-sdk/querystring-builder@3.199.0(transitive)
- Removed@aws-sdk/signature-v4@3.198.0(transitive)
- Removed@aws-sdk/types@3.198.0(transitive)
- Removed@aws-sdk/util-format-url@3.199.0(transitive)
- Removed@aws-sdk/util-middleware@3.198.0(transitive)
Updated@aws-sdk/types@3.200.0