@aws-sdk/middleware-sdk-ec2
Advanced tools
Comparing version 3.15.0 to 3.18.0
@@ -6,2 +6,10 @@ # Change Log | ||
# [3.18.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.17.0...v3.18.0) (2021-06-04) | ||
**Note:** Version bump only for package @aws-sdk/middleware-sdk-ec2 | ||
# [3.15.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.14.0...v3.15.0) (2021-05-10) | ||
@@ -8,0 +16,0 @@ |
@@ -66,2 +66,2 @@ "use strict"; | ||
exports.getCopySnapshotPresignedUrlPlugin = getCopySnapshotPresignedUrlPlugin; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsMERBQXFEO0FBQ3JELHdEQUFvRDtBQWNwRCw4REFBcUQ7QUFDckQsOERBQXFEO0FBVXJELE1BQU0sT0FBTyxHQUFHLFlBQVksQ0FBQztBQUU3QixxREFBcUQ7QUFDckQsU0FBZ0Isa0NBQWtDLENBQUMsT0FBMkI7SUFDNUUsT0FBTyxDQUNMLElBQW9DLEVBQ0osRUFBRSxDQUFDLEtBQUssRUFDeEMsSUFBcUMsRUFDSyxFQUFFO1FBQzVDLE1BQU0sRUFBRSxLQUFLLEVBQUUsR0FBRyxJQUFJLENBQUM7UUFDdkIsSUFBSSxDQUFDLEtBQUssQ0FBQyxZQUFZLEVBQUU7WUFDdkIsTUFBTSxNQUFNLEdBQUcsTUFBTSxPQUFPLENBQUMsTUFBTSxFQUFFLENBQUM7WUFDdEMsTUFBTSxnQkFBZ0IsR0FBRyxNQUFNLE9BQU8sQ0FBQyxRQUFRLEVBQUUsQ0FBQztZQUNsRCxnQkFBZ0IsQ0FBQyxRQUFRLEdBQUcsT0FBTyxLQUFLLENBQUMsWUFBWSxnQkFBZ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gIGFyZ3MgPSB7XG4gICAgICAgICAgLi4uYXJncyxcbiAgICAgICAgICBpbnB1dDoge1xuICAgICAgICAgICAgLi4uYXJncy5pbnB1dCxcbiAgICAgICAgICAgIERlc3RpbmF0aW9uUmVnaW9uOiByZWdpb24sXG4gICAgICAgICAgICBQcmVzaWduZWRVcmw6IGVzY2FwZVVyaShmb3JtYXRVcmwocHJlc2lnbmVkUmVxdWVzdCkpLFxuICAgICAgICAgIH0sXG4gICAgICAgIH07XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBuZXh0KGFyZ3MpO1xuICAgIH07XG59XG5cbmV4cG9ydCBjb25zdCBjb3B5U25hcHNob3RQcmVzaWduZWRVcmxNaWRkbGV3YXJlT3B0aW9uczogSW5pdGlhbGl6ZUhhbmRsZXJPcHRpb25zID0ge1xuICBzdGVwOiBcImluaXRpYWxpemVcIixcbiAgdGFnczogW1wiQ1JPU1NfUkVHSU9OX1BSRVNJR05FRF9VUkxcIl0sXG4gIG5hbWU6IFwiY3Jvc3NSZWdpb25QcmVzaWduZWRVcmxNaWRkbGV3YXJlXCIsXG4gIG92ZXJyaWRlOiB0cnVlLFxufTtcblxuZXhwb3J0IGNvbnN0IGdldENvcHlTbmFwc2hvdFByZXNpZ25lZFVybFBsdWdpbiA9IChjb25maWc6IFByZXZpb3VzbHlSZXNvbHZlZCk6IFBsdWdnYWJsZTxhbnksIGFueT4gPT4gKHtcbiAgYXBwbHlUb1N0YWNrOiAoY2xpZW50U3RhY2spID0+IHtcbiAgICBjbGllbnRTdGFjay5hZGQoY29weVNuYXBzaG90UHJlc2lnbmVkVXJsTWlkZGxld2FyZShjb25maWcpLCBjb3B5U25hcHNob3RQcmVzaWduZWRVcmxNaWRkbGV3YXJlT3B0aW9ucyk7XG4gIH0sXG59KTtcbiJdfQ== |
@@ -10,43 +10,45 @@ import { __assign, __awaiter, __generator } from "tslib"; | ||
var _this = this; | ||
return function (next) { return function (args) { return __awaiter(_this, void 0, void 0, function () { | ||
var input, region, resolvedEndpoint, request, signer, presignedRequest; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
input = args.input; | ||
if (!!input.PresignedUrl) return [3 /*break*/, 4]; | ||
return [4 /*yield*/, options.region()]; | ||
case 1: | ||
region = _a.sent(); | ||
return [4 /*yield*/, options.endpoint()]; | ||
case 2: | ||
resolvedEndpoint = _a.sent(); | ||
resolvedEndpoint.hostname = "ec2." + input.SourceRegion + ".amazonaws.com"; | ||
request = new HttpRequest(__assign(__assign({}, resolvedEndpoint), { protocol: "https", headers: { | ||
host: resolvedEndpoint.hostname, | ||
}, query: { | ||
Action: "CopySnapshot", | ||
Version: version, | ||
SourceRegion: input.SourceRegion, | ||
SourceSnapshotId: input.SourceSnapshotId, | ||
DestinationRegion: region, | ||
} })); | ||
signer = new SignatureV4({ | ||
credentials: options.credentials, | ||
region: input.SourceRegion, | ||
service: "ec2", | ||
sha256: options.sha256, | ||
uriEscapePath: options.signingEscapePath, | ||
}); | ||
return [4 /*yield*/, signer.presign(request, { | ||
expiresIn: 3600, | ||
})]; | ||
case 3: | ||
presignedRequest = _a.sent(); | ||
args = __assign(__assign({}, args), { input: __assign(__assign({}, args.input), { DestinationRegion: region, PresignedUrl: escapeUri(formatUrl(presignedRequest)) }) }); | ||
_a.label = 4; | ||
case 4: return [2 /*return*/, next(args)]; | ||
} | ||
}); | ||
}); }; }; | ||
return function (next) { | ||
return function (args) { return __awaiter(_this, void 0, void 0, function () { | ||
var input, region, resolvedEndpoint, request, signer, presignedRequest; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
input = args.input; | ||
if (!!input.PresignedUrl) return [3 /*break*/, 4]; | ||
return [4 /*yield*/, options.region()]; | ||
case 1: | ||
region = _a.sent(); | ||
return [4 /*yield*/, options.endpoint()]; | ||
case 2: | ||
resolvedEndpoint = _a.sent(); | ||
resolvedEndpoint.hostname = "ec2." + input.SourceRegion + ".amazonaws.com"; | ||
request = new HttpRequest(__assign(__assign({}, resolvedEndpoint), { protocol: "https", headers: { | ||
host: resolvedEndpoint.hostname, | ||
}, query: { | ||
Action: "CopySnapshot", | ||
Version: version, | ||
SourceRegion: input.SourceRegion, | ||
SourceSnapshotId: input.SourceSnapshotId, | ||
DestinationRegion: region, | ||
} })); | ||
signer = new SignatureV4({ | ||
credentials: options.credentials, | ||
region: input.SourceRegion, | ||
service: "ec2", | ||
sha256: options.sha256, | ||
uriEscapePath: options.signingEscapePath, | ||
}); | ||
return [4 /*yield*/, signer.presign(request, { | ||
expiresIn: 3600, | ||
})]; | ||
case 3: | ||
presignedRequest = _a.sent(); | ||
args = __assign(__assign({}, args), { input: __assign(__assign({}, args.input), { DestinationRegion: region, PresignedUrl: escapeUri(formatUrl(presignedRequest)) }) }); | ||
_a.label = 4; | ||
case 4: return [2 /*return*/, next(args)]; | ||
} | ||
}); | ||
}); }; | ||
}; | ||
} | ||
@@ -64,2 +66,2 @@ export var copySnapshotPresignedUrlMiddlewareOptions = { | ||
}); }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQztBQUNyRCxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFjcEQsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBQ3JELE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQVVyRCxJQUFNLE9BQU8sR0FBRyxZQUFZLENBQUM7QUFFN0IscURBQXFEO0FBQ3JELE1BQU0sVUFBVSxrQ0FBa0MsQ0FBQyxPQUEyQjtJQUE5RSxpQkFnREM7SUEvQ0MsT0F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ZXhwb3J0IGNvbnN0IGdldENvcHlTbmFwc2hvdFByZXNpZ25lZFVybFBsdWdpbiA9IChjb25maWc6IFByZXZpb3VzbHlSZXNvbHZlZCk6IFBsdWdnYWJsZTxhbnksIGFueT4gPT4gKHtcbiAgYXBwbHlUb1N0YWNrOiAoY2xpZW50U3RhY2spID0+IHtcbiAgICBjbGllbnRTdGFjay5hZGQoY29weVNuYXBzaG90UHJlc2lnbmVkVXJsTWlkZGxld2FyZShjb25maWcpLCBjb3B5U25hcHNob3RQcmVzaWduZWRVcmxNaWRkbGV3YXJlT3B0aW9ucyk7XG4gIH0sXG59KTtcbiJdfQ== |
{ | ||
"name": "@aws-sdk/middleware-sdk-ec2", | ||
"version": "3.15.0", | ||
"version": "3.18.0", | ||
"scripts": { | ||
@@ -20,7 +20,7 @@ "prepublishOnly": "yarn build && downlevel-dts dist/types dist/types/ts3.4", | ||
"dependencies": { | ||
"@aws-sdk/protocol-http": "3.15.0", | ||
"@aws-sdk/signature-v4": "3.15.0", | ||
"@aws-sdk/types": "3.15.0", | ||
"@aws-sdk/util-format-url": "3.15.0", | ||
"@aws-sdk/util-uri-escape": "3.13.1", | ||
"@aws-sdk/protocol-http": "3.18.0", | ||
"@aws-sdk/signature-v4": "3.18.0", | ||
"@aws-sdk/types": "3.18.0", | ||
"@aws-sdk/util-format-url": "3.18.0", | ||
"@aws-sdk/util-uri-escape": "3.18.0", | ||
"tslib": "^2.0.0" | ||
@@ -31,3 +31,3 @@ }, | ||
"jest": "^26.1.0", | ||
"typescript": "~4.2.4" | ||
"typescript": "~4.3.2" | ||
}, | ||
@@ -34,0 +34,0 @@ "engines": { |
@@ -31,49 +31,46 @@ import { HttpRequest } from "@aws-sdk/protocol-http"; | ||
export function copySnapshotPresignedUrlMiddleware(options: PreviouslyResolved): InitializeMiddleware<any, any> { | ||
return <Output extends MetadataBearer>( | ||
next: InitializeHandler<any, Output> | ||
): InitializeHandler<any, Output> => async ( | ||
args: InitializeHandlerArguments<any> | ||
): Promise<InitializeHandlerOutput<Output>> => { | ||
const { input } = args; | ||
if (!input.PresignedUrl) { | ||
const region = await options.region(); | ||
const resolvedEndpoint = await options.endpoint(); | ||
resolvedEndpoint.hostname = `ec2.${input.SourceRegion}.amazonaws.com`; | ||
const request = new HttpRequest({ | ||
...resolvedEndpoint, | ||
protocol: "https", | ||
headers: { | ||
host: resolvedEndpoint.hostname, | ||
}, | ||
query: { | ||
Action: "CopySnapshot", | ||
Version: version, | ||
SourceRegion: input.SourceRegion, | ||
SourceSnapshotId: input.SourceSnapshotId, | ||
DestinationRegion: region, | ||
}, | ||
}); | ||
const signer = new SignatureV4({ | ||
credentials: options.credentials, | ||
region: input.SourceRegion, | ||
service: "ec2", | ||
sha256: options.sha256, | ||
uriEscapePath: options.signingEscapePath, | ||
}); | ||
const presignedRequest = await signer.presign(request, { | ||
expiresIn: 3600, | ||
}); | ||
return <Output extends MetadataBearer>(next: InitializeHandler<any, Output>): InitializeHandler<any, Output> => | ||
async (args: InitializeHandlerArguments<any>): Promise<InitializeHandlerOutput<Output>> => { | ||
const { input } = args; | ||
if (!input.PresignedUrl) { | ||
const region = await options.region(); | ||
const resolvedEndpoint = await options.endpoint(); | ||
resolvedEndpoint.hostname = `ec2.${input.SourceRegion}.amazonaws.com`; | ||
const request = new HttpRequest({ | ||
...resolvedEndpoint, | ||
protocol: "https", | ||
headers: { | ||
host: resolvedEndpoint.hostname, | ||
}, | ||
query: { | ||
Action: "CopySnapshot", | ||
Version: version, | ||
SourceRegion: input.SourceRegion, | ||
SourceSnapshotId: input.SourceSnapshotId, | ||
DestinationRegion: region, | ||
}, | ||
}); | ||
const signer = new SignatureV4({ | ||
credentials: options.credentials, | ||
region: input.SourceRegion, | ||
service: "ec2", | ||
sha256: options.sha256, | ||
uriEscapePath: options.signingEscapePath, | ||
}); | ||
const presignedRequest = await signer.presign(request, { | ||
expiresIn: 3600, | ||
}); | ||
args = { | ||
...args, | ||
input: { | ||
...args.input, | ||
DestinationRegion: region, | ||
PresignedUrl: escapeUri(formatUrl(presignedRequest)), | ||
}, | ||
}; | ||
} | ||
args = { | ||
...args, | ||
input: { | ||
...args.input, | ||
DestinationRegion: region, | ||
PresignedUrl: escapeUri(formatUrl(presignedRequest)), | ||
}, | ||
}; | ||
} | ||
return next(args); | ||
}; | ||
return next(args); | ||
}; | ||
} | ||
@@ -80,0 +77,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
63836
337
+ Added@aws-sdk/is-array-buffer@3.18.0(transitive)
+ Added@aws-sdk/protocol-http@3.18.0(transitive)
+ Added@aws-sdk/querystring-builder@3.18.0(transitive)
+ Added@aws-sdk/signature-v4@3.18.0(transitive)
+ Added@aws-sdk/types@3.18.0(transitive)
+ Added@aws-sdk/util-format-url@3.18.0(transitive)
+ Added@aws-sdk/util-hex-encoding@3.18.0(transitive)
+ Added@aws-sdk/util-uri-escape@3.18.0(transitive)
- Removed@aws-sdk/is-array-buffer@3.13.1(transitive)
- Removed@aws-sdk/protocol-http@3.15.0(transitive)
- Removed@aws-sdk/querystring-builder@3.15.0(transitive)
- Removed@aws-sdk/signature-v4@3.15.0(transitive)
- Removed@aws-sdk/types@3.15.0(transitive)
- Removed@aws-sdk/util-format-url@3.15.0(transitive)
- Removed@aws-sdk/util-hex-encoding@3.13.1(transitive)
- Removed@aws-sdk/util-uri-escape@3.13.1(transitive)
Updated@aws-sdk/signature-v4@3.18.0
Updated@aws-sdk/types@3.18.0