From 9aaa1daa91b40ce855e24cd45fb39b2ca18aeaf1 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 5 Oct 2021 03:04:58 +0000 Subject: [PATCH] chore: Update dist --- dist/cleanup/index.js | 1099 ++++++++++++++++++++++++++++++++++++++++- dist/index.js | 1070 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 2164 insertions(+), 5 deletions(-) diff --git a/dist/cleanup/index.js b/dist/cleanup/index.js index 4e6a695..2859e28 100644 --- a/dist/cleanup/index.js +++ b/dist/cleanup/index.js @@ -49,6 +49,13 @@ module.exports = /************************************************************************/ /******/ ({ +/***/ 16: +/***/ (function(module) { + +module.exports = require("tls"); + +/***/ }), + /***/ 82: /***/ (function(__unusedmodule, exports) { @@ -84,6 +91,7 @@ function toCommandProperties(annotationProperties) { } return { title: annotationProperties.title, + file: annotationProperties.file, line: annotationProperties.startLine, endLine: annotationProperties.endLine, col: annotationProperties.startColumn, @@ -149,6 +157,278 @@ function issueCommand(command, message) { exports.issueCommand = issueCommand; //# sourceMappingURL=file-command.js.map +/***/ }), + +/***/ 141: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + + +var net = __webpack_require__(631); +var tls = __webpack_require__(16); +var http = __webpack_require__(605); +var https = __webpack_require__(211); +var events = __webpack_require__(614); +var assert = __webpack_require__(357); +var util = __webpack_require__(669); + + +exports.httpOverHttp = httpOverHttp; +exports.httpsOverHttp = httpsOverHttp; +exports.httpOverHttps = httpOverHttps; +exports.httpsOverHttps = httpsOverHttps; + + +function httpOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + return agent; +} + +function httpsOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; +} + +function httpOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + return agent; +} + +function httpsOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; +} + + +function TunnelingAgent(options) { + var self = this; + self.options = options || {}; + self.proxyOptions = self.options.proxy || {}; + self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; + self.requests = []; + self.sockets = []; + + self.on('free', function onFree(socket, host, port, localAddress) { + var options = toOptions(host, port, localAddress); + for (var i = 0, len = self.requests.length; i < len; ++i) { + var pending = self.requests[i]; + if (pending.host === options.host && pending.port === options.port) { + // Detect the request to connect same origin server, + // reuse the connection. + self.requests.splice(i, 1); + pending.request.onSocket(socket); + return; + } + } + socket.destroy(); + self.removeSocket(socket); + }); +} +util.inherits(TunnelingAgent, events.EventEmitter); + +TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { + var self = this; + var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress)); + + if (self.sockets.length >= this.maxSockets) { + // We are over limit so we'll add it to the queue. + self.requests.push(options); + return; + } + + // If we are under maxSockets create a new one. + self.createSocket(options, function(socket) { + socket.on('free', onFree); + socket.on('close', onCloseOrRemove); + socket.on('agentRemove', onCloseOrRemove); + req.onSocket(socket); + + function onFree() { + self.emit('free', socket, options); + } + + function onCloseOrRemove(err) { + self.removeSocket(socket); + socket.removeListener('free', onFree); + socket.removeListener('close', onCloseOrRemove); + socket.removeListener('agentRemove', onCloseOrRemove); + } + }); +}; + +TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { + var self = this; + var placeholder = {}; + self.sockets.push(placeholder); + + var connectOptions = mergeOptions({}, self.proxyOptions, { + method: 'CONNECT', + path: options.host + ':' + options.port, + agent: false, + headers: { + host: options.host + ':' + options.port + } + }); + if (options.localAddress) { + connectOptions.localAddress = options.localAddress; + } + if (connectOptions.proxyAuth) { + connectOptions.headers = connectOptions.headers || {}; + connectOptions.headers['Proxy-Authorization'] = 'Basic ' + + new Buffer(connectOptions.proxyAuth).toString('base64'); + } + + debug('making CONNECT request'); + var connectReq = self.request(connectOptions); + connectReq.useChunkedEncodingByDefault = false; // for v0.6 + connectReq.once('response', onResponse); // for v0.6 + connectReq.once('upgrade', onUpgrade); // for v0.6 + connectReq.once('connect', onConnect); // for v0.7 or later + connectReq.once('error', onError); + connectReq.end(); + + function onResponse(res) { + // Very hacky. This is necessary to avoid http-parser leaks. + res.upgrade = true; + } + + function onUpgrade(res, socket, head) { + // Hacky. + process.nextTick(function() { + onConnect(res, socket, head); + }); + } + + function onConnect(res, socket, head) { + connectReq.removeAllListeners(); + socket.removeAllListeners(); + + if (res.statusCode !== 200) { + debug('tunneling socket could not be established, statusCode=%d', + res.statusCode); + socket.destroy(); + var error = new Error('tunneling socket could not be established, ' + + 'statusCode=' + res.statusCode); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + return; + } + if (head.length > 0) { + debug('got illegal response body from proxy'); + socket.destroy(); + var error = new Error('got illegal response body from proxy'); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + return; + } + debug('tunneling connection has established'); + self.sockets[self.sockets.indexOf(placeholder)] = socket; + return cb(socket); + } + + function onError(cause) { + connectReq.removeAllListeners(); + + debug('tunneling socket could not be established, cause=%s\n', + cause.message, cause.stack); + var error = new Error('tunneling socket could not be established, ' + + 'cause=' + cause.message); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + } +}; + +TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { + var pos = this.sockets.indexOf(socket) + if (pos === -1) { + return; + } + this.sockets.splice(pos, 1); + + var pending = this.requests.shift(); + if (pending) { + // If we have pending requests and a socket gets closed a new one + // needs to be created to take over in the pool for the one that closed. + this.createSocket(pending, function(socket) { + pending.request.onSocket(socket); + }); + } +}; + +function createSecureSocket(options, cb) { + var self = this; + TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { + var hostHeader = options.request.getHeader('host'); + var tlsOptions = mergeOptions({}, self.options, { + socket: socket, + servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host + }); + + // 0 is dummy port for v0.6 + var secureSocket = tls.connect(0, tlsOptions); + self.sockets[self.sockets.indexOf(socket)] = secureSocket; + cb(secureSocket); + }); +} + + +function toOptions(host, port, localAddress) { + if (typeof host === 'string') { // since v0.10 + return { + host: host, + port: port, + localAddress: localAddress + }; + } + return host; // for v0.11 or later +} + +function mergeOptions(target) { + for (var i = 1, len = arguments.length; i < len; ++i) { + var overrides = arguments[i]; + if (typeof overrides === 'object') { + var keys = Object.keys(overrides); + for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { + var k = keys[j]; + if (overrides[k] !== undefined) { + target[k] = overrides[k]; + } + } + } + } + return target; +} + + +var debug; +if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { + debug = function() { + var args = Array.prototype.slice.call(arguments); + if (typeof args[0] === 'string') { + args[0] = 'TUNNEL: ' + args[0]; + } else { + args.unshift('TUNNEL:'); + } + console.error.apply(console, args); + } +} else { + debug = function() {}; +} +exports.debug = debug; // for test + + /***/ }), /***/ 175: @@ -192,6 +472,94 @@ if (require.main === require.cache[eval('__filename')]) { } +/***/ }), + +/***/ 211: +/***/ (function(module) { + +module.exports = require("https"); + +/***/ }), + +/***/ 226: +/***/ (function(__unusedmodule, exports) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +class BasicCredentialHandler { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + options.headers['Authorization'] = + 'Basic ' + + Buffer.from(this.username + ':' + this.password).toString('base64'); + } + // This handler cannot handle 401 + canHandleAuthentication(response) { + return false; + } + handleAuthentication(httpClient, requestInfo, objs) { + return null; + } +} +exports.BasicCredentialHandler = BasicCredentialHandler; +class BearerCredentialHandler { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + options.headers['Authorization'] = 'Bearer ' + this.token; + } + // This handler cannot handle 401 + canHandleAuthentication(response) { + return false; + } + handleAuthentication(httpClient, requestInfo, objs) { + return null; + } +} +exports.BearerCredentialHandler = BearerCredentialHandler; +class PersonalAccessTokenCredentialHandler { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + options.headers['Authorization'] = + 'Basic ' + Buffer.from('PAT:' + this.token).toString('base64'); + } + // This handler cannot handle 401 + canHandleAuthentication(response) { + return false; + } + handleAuthentication(httpClient, requestInfo, objs) { + return null; + } +} +exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + + +/***/ }), + +/***/ 357: +/***/ (function(module) { + +module.exports = require("assert"); + +/***/ }), + +/***/ 413: +/***/ (function(module, __unusedexports, __webpack_require__) { + +module.exports = __webpack_require__(141); + + /***/ }), /***/ 431: @@ -327,12 +695,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; +exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; const command_1 = __webpack_require__(431); const file_command_1 = __webpack_require__(102); const utils_1 = __webpack_require__(82); const os = __importStar(__webpack_require__(87)); const path = __importStar(__webpack_require__(622)); +const oidc_utils_1 = __webpack_require__(742); /** * The code to exit an action */ @@ -601,10 +970,575 @@ function getState(name) { return process.env[`STATE_${name}`] || ''; } exports.getState = getState; +function getIDToken(aud) { + return __awaiter(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); +} +exports.getIDToken = getIDToken; //# sourceMappingURL=core.js.map /***/ }), +/***/ 539: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +const http = __webpack_require__(605); +const https = __webpack_require__(211); +const pm = __webpack_require__(950); +let tunnel; +var HttpCodes; +(function (HttpCodes) { + HttpCodes[HttpCodes["OK"] = 200] = "OK"; + HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; + HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; + HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; + HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; + HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; + HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; + HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; + HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; + HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; + HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; +})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); +var Headers; +(function (Headers) { + Headers["Accept"] = "accept"; + Headers["ContentType"] = "content-type"; +})(Headers = exports.Headers || (exports.Headers = {})); +var MediaTypes; +(function (MediaTypes) { + MediaTypes["ApplicationJson"] = "application/json"; +})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); +/** + * Returns the proxy URL, depending upon the supplied url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ +function getProxyUrl(serverUrl) { + let proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ''; +} +exports.getProxyUrl = getProxyUrl; +const HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect +]; +const HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout +]; +const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD']; +const ExponentialBackoffCeiling = 10; +const ExponentialBackoffTimeSlice = 5; +class HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = 'HttpClientError'; + this.statusCode = statusCode; + Object.setPrototypeOf(this, HttpClientError.prototype); + } +} +exports.HttpClientError = HttpClientError; +class HttpClientResponse { + constructor(message) { + this.message = message; + } + readBody() { + return new Promise(async (resolve, reject) => { + let output = Buffer.alloc(0); + this.message.on('data', (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on('end', () => { + resolve(output.toString()); + }); + }); + } +} +exports.HttpClientResponse = HttpClientResponse; +function isHttps(requestUrl) { + let parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === 'https:'; +} +exports.isHttps = isHttps; +class HttpClient { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); + } + get(requestUrl, additionalHeaders) { + return this.request('GET', requestUrl, null, additionalHeaders || {}); + } + del(requestUrl, additionalHeaders) { + return this.request('DELETE', requestUrl, null, additionalHeaders || {}); + } + post(requestUrl, data, additionalHeaders) { + return this.request('POST', requestUrl, data, additionalHeaders || {}); + } + patch(requestUrl, data, additionalHeaders) { + return this.request('PATCH', requestUrl, data, additionalHeaders || {}); + } + put(requestUrl, data, additionalHeaders) { + return this.request('PUT', requestUrl, data, additionalHeaders || {}); + } + head(requestUrl, additionalHeaders) { + return this.request('HEAD', requestUrl, null, additionalHeaders || {}); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return this.request(verb, requestUrl, stream, additionalHeaders); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + async getJson(requestUrl, additionalHeaders = {}) { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + let res = await this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + } + async postJson(requestUrl, obj, additionalHeaders = {}) { + let data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + let res = await this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + } + async putJson(requestUrl, obj, additionalHeaders = {}) { + let data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + let res = await this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + } + async patchJson(requestUrl, obj, additionalHeaders = {}) { + let data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + let res = await this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + async request(verb, requestUrl, data, headers) { + if (this._disposed) { + throw new Error('Client has already been disposed.'); + } + let parsedUrl = new URL(requestUrl); + let info = this._prepareRequest(verb, parsedUrl, headers); + // Only perform retries on reads since writes may not be idempotent. + let maxTries = this._allowRetries && RetryableHttpVerbs.indexOf(verb) != -1 + ? this._maxRetries + 1 + : 1; + let numTries = 0; + let response; + while (numTries < maxTries) { + response = await this.requestRaw(info, data); + // Check if it's an authentication challenge + if (response && + response.message && + response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (let i = 0; i < this.handlers.length; i++) { + if (this.handlers[i].canHandleAuthentication(response)) { + authenticationHandler = this.handlers[i]; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info, data); + } + else { + // We have received an unauthorized response but have no handlers to handle it. + // Let the response return to the caller. + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (HttpRedirectCodes.indexOf(response.message.statusCode) != -1 && + this._allowRedirects && + redirectsRemaining > 0) { + const redirectUrl = response.message.headers['location']; + if (!redirectUrl) { + // if there's no location to redirect to, we won't + break; + } + let parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol == 'https:' && + parsedUrl.protocol != parsedRedirectUrl.protocol && + !this._allowRedirectDowngrade) { + throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.'); + } + // we need to finish reading the response before reassigning response + // which will leak the open socket. + await response.readBody(); + // strip authorization header if redirected to a different hostname + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (let header in headers) { + // header names are case insensitive + if (header.toLowerCase() === 'authorization') { + delete headers[header]; + } + } + } + // let's make the request with the new redirectUrl + info = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = await this.requestRaw(info, data); + redirectsRemaining--; + } + if (HttpResponseRetryCodes.indexOf(response.message.statusCode) == -1) { + // If not a retry code, return immediately instead of retrying + return response; + } + numTries += 1; + if (numTries < maxTries) { + await response.readBody(); + await this._performExponentialBackoff(numTries); + } + } + return response; + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info, data) { + return new Promise((resolve, reject) => { + let callbackForResult = function (err, res) { + if (err) { + reject(err); + } + resolve(res); + }; + this.requestRawWithCallback(info, data, callbackForResult); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info, data, onResult) { + let socket; + if (typeof data === 'string') { + info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8'); + } + let callbackCalled = false; + let handleResult = (err, res) => { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + }; + let req = info.httpModule.request(info.options, (msg) => { + let res = new HttpClientResponse(msg); + handleResult(null, res); + }); + req.on('socket', sock => { + socket = sock; + }); + // If we ever get disconnected, we want the socket to timeout eventually + req.setTimeout(this._socketTimeout || 3 * 60000, () => { + if (socket) { + socket.end(); + } + handleResult(new Error('Request timeout: ' + info.options.path), null); + }); + req.on('error', function (err) { + // err has statusCode property + // res should have headers + handleResult(err, null); + }); + if (data && typeof data === 'string') { + req.write(data, 'utf8'); + } + if (data && typeof data !== 'string') { + data.on('close', function () { + req.end(); + }); + data.pipe(req); + } + else { + req.end(); + } + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + let parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info = {}; + info.parsedUrl = requestUrl; + const usingSsl = info.parsedUrl.protocol === 'https:'; + info.httpModule = usingSsl ? https : http; + const defaultPort = usingSsl ? 443 : 80; + info.options = {}; + info.options.host = info.parsedUrl.hostname; + info.options.port = info.parsedUrl.port + ? parseInt(info.parsedUrl.port) + : defaultPort; + info.options.path = + (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); + info.options.method = method; + info.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info.options.headers['user-agent'] = this.userAgent; + } + info.options.agent = this._getAgent(info.parsedUrl); + // gives handlers an opportunity to participate + if (this.handlers) { + this.handlers.forEach(handler => { + handler.prepareRequest(info.options); + }); + } + return info; + } + _mergeHeaders(headers) { + const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers)); + } + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default) { + const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + } + return additionalHeaders[header] || clientHeader || _default; + } + _getAgent(parsedUrl) { + let agent; + let proxyUrl = pm.getProxyUrl(parsedUrl); + let useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (this._keepAlive && !useProxy) { + agent = this._agent; + } + // if agent is already assigned use that agent. + if (!!agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === 'https:'; + let maxSockets = 100; + if (!!this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + if (useProxy) { + // If using proxy, need tunnel + if (!tunnel) { + tunnel = __webpack_require__(413); + } + const agentOptions = { + maxSockets: maxSockets, + keepAlive: this._keepAlive, + proxy: { + ...((proxyUrl.username || proxyUrl.password) && { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` + }), + host: proxyUrl.hostname, + port: proxyUrl.port + } + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === 'https:'; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } + else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + // if reusing agent across request and tunneling agent isn't assigned create a new agent + if (this._keepAlive && !agent) { + const options = { keepAlive: this._keepAlive, maxSockets: maxSockets }; + agent = usingSsl ? new https.Agent(options) : new http.Agent(options); + this._agent = agent; + } + // if not using private agent and tunnel agent isn't setup then use global agent + if (!agent) { + agent = usingSsl ? https.globalAgent : http.globalAgent; + } + if (usingSsl && this._ignoreSslError) { + // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process + // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options + // we have to cast it to any and change it directly + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); + } + return agent; + } + _performExponentialBackoff(retryNumber) { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise(resolve => setTimeout(() => resolve(), ms)); + } + static dateTimeDeserializer(key, value) { + if (typeof value === 'string') { + let a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + async _processResponse(res, options) { + return new Promise(async (resolve, reject) => { + const statusCode = res.message.statusCode; + const response = { + statusCode: statusCode, + result: null, + headers: {} + }; + // not found leads to null obj returned + if (statusCode == HttpCodes.NotFound) { + resolve(response); + } + let obj; + let contents; + // get the result from the body + try { + contents = await res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, HttpClient.dateTimeDeserializer); + } + else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } + catch (err) { + // Invalid resource (contents not json); leaving result obj null + } + // note that 3xx redirects are handled by the http layer. + if (statusCode > 299) { + let msg; + // if exception/error in body, attempt to get better error + if (obj && obj.message) { + msg = obj.message; + } + else if (contents && contents.length > 0) { + // it may be the case that the exception is in the body message as string + msg = contents; + } + else { + msg = 'Failed request: (' + statusCode + ')'; + } + let err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } + else { + resolve(response); + } + }); + } +} +exports.HttpClient = HttpClient; + + +/***/ }), + +/***/ 605: +/***/ (function(module) { + +module.exports = require("http"); + +/***/ }), + +/***/ 614: +/***/ (function(module) { + +module.exports = require("events"); + +/***/ }), + /***/ 622: /***/ (function(module) { @@ -612,11 +1546,174 @@ module.exports = require("path"); /***/ }), +/***/ 631: +/***/ (function(module) { + +module.exports = require("net"); + +/***/ }), + +/***/ 669: +/***/ (function(module) { + +module.exports = require("util"); + +/***/ }), + +/***/ 742: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.OidcClient = void 0; +const http_client_1 = __webpack_require__(539); +const auth_1 = __webpack_require__(226); +const core_1 = __webpack_require__(470); +class OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN']; + if (!token) { + throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable'); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL']; + if (!runtimeUrl) { + throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable'); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter(this, void 0, void 0, function* () { + const httpclient = OidcClient.createHttpClient(); + const res = yield httpclient + .getJson(id_token_url) + .catch(error => { + throw new Error(`Failed to get ID Token. \n + Error Code : ${error.statusCode}\n + Error Message: ${error.result.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error('Response json body do not have ID Token field'); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter(this, void 0, void 0, function* () { + try { + // New ID Token is requested from action service + let id_token_url = OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + core_1.debug(`ID token url is ${id_token_url}`); + const id_token = yield OidcClient.getCall(id_token_url); + core_1.setSecret(id_token); + return id_token; + } + catch (error) { + throw new Error(`Error message: ${error.message}`); + } + }); + } +} +exports.OidcClient = OidcClient; +//# sourceMappingURL=oidc-utils.js.map + +/***/ }), + /***/ 747: /***/ (function(module) { module.exports = require("fs"); +/***/ }), + +/***/ 950: +/***/ (function(__unusedmodule, exports) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +function getProxyUrl(reqUrl) { + let usingSsl = reqUrl.protocol === 'https:'; + let proxyUrl; + if (checkBypass(reqUrl)) { + return proxyUrl; + } + let proxyVar; + if (usingSsl) { + proxyVar = process.env['https_proxy'] || process.env['HTTPS_PROXY']; + } + else { + proxyVar = process.env['http_proxy'] || process.env['HTTP_PROXY']; + } + if (proxyVar) { + proxyUrl = new URL(proxyVar); + } + return proxyUrl; +} +exports.getProxyUrl = getProxyUrl; +function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + let noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; + if (!noProxy) { + return false; + } + // Determine the request port + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } + else if (reqUrl.protocol === 'http:') { + reqPort = 80; + } + else if (reqUrl.protocol === 'https:') { + reqPort = 443; + } + // Format the request hostname and hostname with port + let upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === 'number') { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + // Compare request host against noproxy + for (let upperNoProxyItem of noProxy + .split(',') + .map(x => x.trim().toUpperCase()) + .filter(x => x)) { + if (upperReqHosts.some(x => x === upperNoProxyItem)) { + return true; + } + } + return false; +} +exports.checkBypass = checkBypass; + + /***/ }) /******/ }); \ No newline at end of file diff --git a/dist/index.js b/dist/index.js index ac8fcbe..5866b55 100644 --- a/dist/index.js +++ b/dist/index.js @@ -6168,6 +6168,13 @@ module.exports = {"version":2,"waiters":{"CacheClusterAvailable":{"acceptors":[{ /***/ }), +/***/ 1631: +/***/ (function(module) { + +module.exports = require("net"); + +/***/ }), + /***/ 1632: /***/ (function(__unusedmodule, __unusedexports, __webpack_require__) { @@ -8569,6 +8576,13 @@ module.exports = require("os"); /***/ }), +/***/ 2091: +/***/ (function(module) { + +module.exports = {"version":"2.0","metadata":{"apiVersion":"2018-08-20","endpointPrefix":"s3-control","protocol":"rest-xml","serviceFullName":"AWS S3 Control","serviceId":"S3 Control","signatureVersion":"s3v4","signingName":"s3","uid":"s3control-2018-08-20"},"operations":{"CreateAccessPoint":{"http":{"method":"PUT","requestUri":"/v20180820/accesspoint/{name}"},"input":{"locationName":"CreateAccessPointRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","Name","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"},"Bucket":{},"VpcConfiguration":{"shape":"S5"},"PublicAccessBlockConfiguration":{"shape":"S7"}}},"output":{"type":"structure","members":{"AccessPointArn":{},"Alias":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"CreateAccessPointForObjectLambda":{"http":{"method":"PUT","requestUri":"/v20180820/accesspointforobjectlambda/{name}"},"input":{"locationName":"CreateAccessPointForObjectLambdaRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","Name","Configuration"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"},"Configuration":{"shape":"Se"}}},"output":{"type":"structure","members":{"ObjectLambdaAccessPointArn":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"CreateBucket":{"http":{"method":"PUT","requestUri":"/v20180820/bucket/{name}"},"input":{"type":"structure","required":["Bucket"],"members":{"ACL":{"location":"header","locationName":"x-amz-acl"},"Bucket":{"location":"uri","locationName":"name"},"CreateBucketConfiguration":{"locationName":"CreateBucketConfiguration","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","members":{"LocationConstraint":{}}},"GrantFullControl":{"location":"header","locationName":"x-amz-grant-full-control"},"GrantRead":{"location":"header","locationName":"x-amz-grant-read"},"GrantReadACP":{"location":"header","locationName":"x-amz-grant-read-acp"},"GrantWrite":{"location":"header","locationName":"x-amz-grant-write"},"GrantWriteACP":{"location":"header","locationName":"x-amz-grant-write-acp"},"ObjectLockEnabledForBucket":{"location":"header","locationName":"x-amz-bucket-object-lock-enabled","type":"boolean"},"OutpostId":{"location":"header","locationName":"x-amz-outpost-id"}},"payload":"CreateBucketConfiguration"},"output":{"type":"structure","members":{"Location":{"location":"header","locationName":"Location"},"BucketArn":{}}},"httpChecksumRequired":true},"CreateJob":{"http":{"requestUri":"/v20180820/jobs"},"input":{"locationName":"CreateJobRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","Operation","Report","ClientRequestToken","Manifest","Priority","RoleArn"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"ConfirmationRequired":{"type":"boolean"},"Operation":{"shape":"S19"},"Report":{"shape":"S2e"},"ClientRequestToken":{"idempotencyToken":true},"Manifest":{"shape":"S2i"},"Description":{},"Priority":{"type":"integer"},"RoleArn":{},"Tags":{"shape":"S1r"}}},"output":{"type":"structure","members":{"JobId":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"CreateMultiRegionAccessPoint":{"http":{"requestUri":"/v20180820/async-requests/mrap/create"},"input":{"locationName":"CreateMultiRegionAccessPointRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","ClientToken","Details"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"ClientToken":{"idempotencyToken":true},"Details":{"shape":"S2x"}}},"output":{"type":"structure","members":{"RequestTokenARN":{}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"DeleteAccessPoint":{"http":{"method":"DELETE","requestUri":"/v20180820/accesspoint/{name}"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteAccessPointForObjectLambda":{"http":{"method":"DELETE","requestUri":"/v20180820/accesspointforobjectlambda/{name}"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteAccessPointPolicy":{"http":{"method":"DELETE","requestUri":"/v20180820/accesspoint/{name}/policy"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteAccessPointPolicyForObjectLambda":{"http":{"method":"DELETE","requestUri":"/v20180820/accesspointforobjectlambda/{name}/policy"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteBucket":{"http":{"method":"DELETE","requestUri":"/v20180820/bucket/{name}"},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteBucketLifecycleConfiguration":{"http":{"method":"DELETE","requestUri":"/v20180820/bucket/{name}/lifecycleconfiguration"},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteBucketPolicy":{"http":{"method":"DELETE","requestUri":"/v20180820/bucket/{name}/policy"},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteBucketTagging":{"http":{"method":"DELETE","requestUri":"/v20180820/bucket/{name}/tagging","responseCode":204},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteJobTagging":{"http":{"method":"DELETE","requestUri":"/v20180820/jobs/{id}/tagging"},"input":{"type":"structure","required":["AccountId","JobId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"JobId":{"location":"uri","locationName":"id"}}},"output":{"type":"structure","members":{}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteMultiRegionAccessPoint":{"http":{"requestUri":"/v20180820/async-requests/mrap/delete"},"input":{"locationName":"DeleteMultiRegionAccessPointRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","ClientToken","Details"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"ClientToken":{"idempotencyToken":true},"Details":{"shape":"S3e"}}},"output":{"type":"structure","members":{"RequestTokenARN":{}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"DeletePublicAccessBlock":{"http":{"method":"DELETE","requestUri":"/v20180820/configuration/publicAccessBlock"},"input":{"type":"structure","required":["AccountId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteStorageLensConfiguration":{"http":{"method":"DELETE","requestUri":"/v20180820/storagelens/{storagelensid}"},"input":{"type":"structure","required":["ConfigId","AccountId"],"members":{"ConfigId":{"location":"uri","locationName":"storagelensid"},"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteStorageLensConfigurationTagging":{"http":{"method":"DELETE","requestUri":"/v20180820/storagelens/{storagelensid}/tagging"},"input":{"type":"structure","required":["ConfigId","AccountId"],"members":{"ConfigId":{"location":"uri","locationName":"storagelensid"},"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"}}},"output":{"type":"structure","members":{}},"endpoint":{"hostPrefix":"{AccountId}."}},"DescribeJob":{"http":{"method":"GET","requestUri":"/v20180820/jobs/{id}"},"input":{"type":"structure","required":["AccountId","JobId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"JobId":{"location":"uri","locationName":"id"}}},"output":{"type":"structure","members":{"Job":{"type":"structure","members":{"JobId":{},"ConfirmationRequired":{"type":"boolean"},"Description":{},"JobArn":{},"Status":{},"Manifest":{"shape":"S2i"},"Operation":{"shape":"S19"},"Priority":{"type":"integer"},"ProgressSummary":{"shape":"S3q"},"StatusUpdateReason":{},"FailureReasons":{"type":"list","member":{"type":"structure","members":{"FailureCode":{},"FailureReason":{}}}},"Report":{"shape":"S2e"},"CreationTime":{"type":"timestamp"},"TerminationDate":{"type":"timestamp"},"RoleArn":{},"SuspendedDate":{"type":"timestamp"},"SuspendedCause":{}}}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DescribeMultiRegionAccessPointOperation":{"http":{"method":"GET","requestUri":"/v20180820/async-requests/mrap/{request_token+}"},"input":{"type":"structure","required":["AccountId","RequestTokenARN"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"RequestTokenARN":{"location":"uri","locationName":"request_token"}}},"output":{"type":"structure","members":{"AsyncOperation":{"type":"structure","members":{"CreationTime":{"type":"timestamp"},"Operation":{},"RequestTokenARN":{},"RequestParameters":{"type":"structure","members":{"CreateMultiRegionAccessPointRequest":{"shape":"S2x"},"DeleteMultiRegionAccessPointRequest":{"shape":"S3e"},"PutMultiRegionAccessPointPolicyRequest":{"shape":"S49"}}},"RequestStatus":{},"ResponseDetails":{"type":"structure","members":{"MultiRegionAccessPointDetails":{"type":"structure","members":{"Regions":{"type":"list","member":{"locationName":"Region","type":"structure","members":{"Name":{},"RequestStatus":{}}}}}},"ErrorDetails":{"type":"structure","members":{"Code":{},"Message":{},"Resource":{},"RequestId":{}}}}}}}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"GetAccessPoint":{"http":{"method":"GET","requestUri":"/v20180820/accesspoint/{name}"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Name":{},"Bucket":{},"NetworkOrigin":{},"VpcConfiguration":{"shape":"S5"},"PublicAccessBlockConfiguration":{"shape":"S7"},"CreationDate":{"type":"timestamp"},"Alias":{},"AccessPointArn":{},"Endpoints":{"type":"map","key":{},"value":{}}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetAccessPointConfigurationForObjectLambda":{"http":{"method":"GET","requestUri":"/v20180820/accesspointforobjectlambda/{name}/configuration"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Configuration":{"shape":"Se"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetAccessPointForObjectLambda":{"http":{"method":"GET","requestUri":"/v20180820/accesspointforobjectlambda/{name}"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Name":{},"PublicAccessBlockConfiguration":{"shape":"S7"},"CreationDate":{"type":"timestamp"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetAccessPointPolicy":{"http":{"method":"GET","requestUri":"/v20180820/accesspoint/{name}/policy"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Policy":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetAccessPointPolicyForObjectLambda":{"http":{"method":"GET","requestUri":"/v20180820/accesspointforobjectlambda/{name}/policy"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Policy":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetAccessPointPolicyStatus":{"http":{"method":"GET","requestUri":"/v20180820/accesspoint/{name}/policyStatus"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"PolicyStatus":{"shape":"S4y"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetAccessPointPolicyStatusForObjectLambda":{"http":{"method":"GET","requestUri":"/v20180820/accesspointforobjectlambda/{name}/policyStatus"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"PolicyStatus":{"shape":"S4y"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetBucket":{"http":{"method":"GET","requestUri":"/v20180820/bucket/{name}"},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Bucket":{},"PublicAccessBlockEnabled":{"type":"boolean"},"CreationDate":{"type":"timestamp"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetBucketLifecycleConfiguration":{"http":{"method":"GET","requestUri":"/v20180820/bucket/{name}/lifecycleconfiguration"},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Rules":{"shape":"S57"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetBucketPolicy":{"http":{"method":"GET","requestUri":"/v20180820/bucket/{name}/policy"},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Policy":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetBucketTagging":{"http":{"method":"GET","requestUri":"/v20180820/bucket/{name}/tagging"},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","required":["TagSet"],"members":{"TagSet":{"shape":"S1r"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetJobTagging":{"http":{"method":"GET","requestUri":"/v20180820/jobs/{id}/tagging"},"input":{"type":"structure","required":["AccountId","JobId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"JobId":{"location":"uri","locationName":"id"}}},"output":{"type":"structure","members":{"Tags":{"shape":"S1r"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetMultiRegionAccessPoint":{"http":{"method":"GET","requestUri":"/v20180820/mrap/instances/{name}"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"AccessPoint":{"shape":"S5y"}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"GetMultiRegionAccessPointPolicy":{"http":{"method":"GET","requestUri":"/v20180820/mrap/instances/{name}/policy"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Policy":{"type":"structure","members":{"Established":{"type":"structure","members":{"Policy":{}}},"Proposed":{"type":"structure","members":{"Policy":{}}}}}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"GetMultiRegionAccessPointPolicyStatus":{"http":{"method":"GET","requestUri":"/v20180820/mrap/instances/{name}/policystatus"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Established":{"shape":"S4y"}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"GetPublicAccessBlock":{"http":{"method":"GET","requestUri":"/v20180820/configuration/publicAccessBlock"},"input":{"type":"structure","required":["AccountId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"}}},"output":{"type":"structure","members":{"PublicAccessBlockConfiguration":{"shape":"S7"}},"payload":"PublicAccessBlockConfiguration"},"endpoint":{"hostPrefix":"{AccountId}."}},"GetStorageLensConfiguration":{"http":{"method":"GET","requestUri":"/v20180820/storagelens/{storagelensid}"},"input":{"type":"structure","required":["ConfigId","AccountId"],"members":{"ConfigId":{"location":"uri","locationName":"storagelensid"},"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"}}},"output":{"type":"structure","members":{"StorageLensConfiguration":{"shape":"S6f"}},"payload":"StorageLensConfiguration"},"endpoint":{"hostPrefix":"{AccountId}."}},"GetStorageLensConfigurationTagging":{"http":{"method":"GET","requestUri":"/v20180820/storagelens/{storagelensid}/tagging"},"input":{"type":"structure","required":["ConfigId","AccountId"],"members":{"ConfigId":{"location":"uri","locationName":"storagelensid"},"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"}}},"output":{"type":"structure","members":{"Tags":{"shape":"S78"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"ListAccessPoints":{"http":{"method":"GET","requestUri":"/v20180820/accesspoint"},"input":{"type":"structure","required":["AccountId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"querystring","locationName":"bucket"},"NextToken":{"location":"querystring","locationName":"nextToken"},"MaxResults":{"location":"querystring","locationName":"maxResults","type":"integer"}}},"output":{"type":"structure","members":{"AccessPointList":{"type":"list","member":{"locationName":"AccessPoint","type":"structure","required":["Name","NetworkOrigin","Bucket"],"members":{"Name":{},"NetworkOrigin":{},"VpcConfiguration":{"shape":"S5"},"Bucket":{},"AccessPointArn":{},"Alias":{}}}},"NextToken":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"ListAccessPointsForObjectLambda":{"http":{"method":"GET","requestUri":"/v20180820/accesspointforobjectlambda"},"input":{"type":"structure","required":["AccountId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"NextToken":{"location":"querystring","locationName":"nextToken"},"MaxResults":{"location":"querystring","locationName":"maxResults","type":"integer"}}},"output":{"type":"structure","members":{"ObjectLambdaAccessPointList":{"type":"list","member":{"locationName":"ObjectLambdaAccessPoint","type":"structure","required":["Name"],"members":{"Name":{},"ObjectLambdaAccessPointArn":{}}}},"NextToken":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"ListJobs":{"http":{"method":"GET","requestUri":"/v20180820/jobs"},"input":{"type":"structure","required":["AccountId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"JobStatuses":{"location":"querystring","locationName":"jobStatuses","type":"list","member":{}},"NextToken":{"location":"querystring","locationName":"nextToken"},"MaxResults":{"location":"querystring","locationName":"maxResults","type":"integer"}}},"output":{"type":"structure","members":{"NextToken":{},"Jobs":{"type":"list","member":{"type":"structure","members":{"JobId":{},"Description":{},"Operation":{},"Priority":{"type":"integer"},"Status":{},"CreationTime":{"type":"timestamp"},"TerminationDate":{"type":"timestamp"},"ProgressSummary":{"shape":"S3q"}}}}}},"endpoint":{"hostPrefix":"{AccountId}."}},"ListMultiRegionAccessPoints":{"http":{"method":"GET","requestUri":"/v20180820/mrap/instances"},"input":{"type":"structure","required":["AccountId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"NextToken":{"location":"querystring","locationName":"nextToken"},"MaxResults":{"location":"querystring","locationName":"maxResults","type":"integer"}}},"output":{"type":"structure","members":{"AccessPoints":{"type":"list","member":{"shape":"S5y","locationName":"AccessPoint"}},"NextToken":{}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"ListRegionalBuckets":{"http":{"method":"GET","requestUri":"/v20180820/bucket"},"input":{"type":"structure","required":["AccountId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"NextToken":{"location":"querystring","locationName":"nextToken"},"MaxResults":{"location":"querystring","locationName":"maxResults","type":"integer"},"OutpostId":{"location":"header","locationName":"x-amz-outpost-id"}}},"output":{"type":"structure","members":{"RegionalBucketList":{"type":"list","member":{"locationName":"RegionalBucket","type":"structure","required":["Bucket","PublicAccessBlockEnabled","CreationDate"],"members":{"Bucket":{},"BucketArn":{},"PublicAccessBlockEnabled":{"type":"boolean"},"CreationDate":{"type":"timestamp"},"OutpostId":{}}}},"NextToken":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"ListStorageLensConfigurations":{"http":{"method":"GET","requestUri":"/v20180820/storagelens"},"input":{"type":"structure","required":["AccountId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"NextToken":{"location":"querystring","locationName":"nextToken"}}},"output":{"type":"structure","members":{"NextToken":{},"StorageLensConfigurationList":{"type":"list","member":{"locationName":"StorageLensConfiguration","type":"structure","required":["Id","StorageLensArn","HomeRegion"],"members":{"Id":{},"StorageLensArn":{},"HomeRegion":{},"IsEnabled":{"type":"boolean"}}},"flattened":true}}},"endpoint":{"hostPrefix":"{AccountId}."}},"PutAccessPointConfigurationForObjectLambda":{"http":{"method":"PUT","requestUri":"/v20180820/accesspointforobjectlambda/{name}/configuration"},"input":{"locationName":"PutAccessPointConfigurationForObjectLambdaRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","Name","Configuration"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"},"Configuration":{"shape":"Se"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"PutAccessPointPolicy":{"http":{"method":"PUT","requestUri":"/v20180820/accesspoint/{name}/policy"},"input":{"locationName":"PutAccessPointPolicyRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","Name","Policy"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"},"Policy":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"PutAccessPointPolicyForObjectLambda":{"http":{"method":"PUT","requestUri":"/v20180820/accesspointforobjectlambda/{name}/policy"},"input":{"locationName":"PutAccessPointPolicyForObjectLambdaRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","Name","Policy"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"},"Policy":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"PutBucketLifecycleConfiguration":{"http":{"method":"PUT","requestUri":"/v20180820/bucket/{name}/lifecycleconfiguration"},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"},"LifecycleConfiguration":{"locationName":"LifecycleConfiguration","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","members":{"Rules":{"shape":"S57"}}}},"payload":"LifecycleConfiguration"},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"PutBucketPolicy":{"http":{"method":"PUT","requestUri":"/v20180820/bucket/{name}/policy"},"input":{"locationName":"PutBucketPolicyRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","Bucket","Policy"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"},"ConfirmRemoveSelfBucketAccess":{"location":"header","locationName":"x-amz-confirm-remove-self-bucket-access","type":"boolean"},"Policy":{}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"PutBucketTagging":{"http":{"method":"PUT","requestUri":"/v20180820/bucket/{name}/tagging"},"input":{"type":"structure","required":["AccountId","Bucket","Tagging"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"},"Tagging":{"locationName":"Tagging","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["TagSet"],"members":{"TagSet":{"shape":"S1r"}}}},"payload":"Tagging"},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"PutJobTagging":{"http":{"method":"PUT","requestUri":"/v20180820/jobs/{id}/tagging"},"input":{"locationName":"PutJobTaggingRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","JobId","Tags"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"JobId":{"location":"uri","locationName":"id"},"Tags":{"shape":"S1r"}}},"output":{"type":"structure","members":{}},"endpoint":{"hostPrefix":"{AccountId}."}},"PutMultiRegionAccessPointPolicy":{"http":{"requestUri":"/v20180820/async-requests/mrap/put-policy"},"input":{"locationName":"PutMultiRegionAccessPointPolicyRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","ClientToken","Details"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"ClientToken":{"idempotencyToken":true},"Details":{"shape":"S49"}}},"output":{"type":"structure","members":{"RequestTokenARN":{}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"PutPublicAccessBlock":{"http":{"method":"PUT","requestUri":"/v20180820/configuration/publicAccessBlock"},"input":{"type":"structure","required":["PublicAccessBlockConfiguration","AccountId"],"members":{"PublicAccessBlockConfiguration":{"shape":"S7","locationName":"PublicAccessBlockConfiguration","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"}},"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"}},"payload":"PublicAccessBlockConfiguration"},"endpoint":{"hostPrefix":"{AccountId}."}},"PutStorageLensConfiguration":{"http":{"method":"PUT","requestUri":"/v20180820/storagelens/{storagelensid}"},"input":{"locationName":"PutStorageLensConfigurationRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["ConfigId","AccountId","StorageLensConfiguration"],"members":{"ConfigId":{"location":"uri","locationName":"storagelensid"},"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"StorageLensConfiguration":{"shape":"S6f"},"Tags":{"shape":"S78"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"PutStorageLensConfigurationTagging":{"http":{"method":"PUT","requestUri":"/v20180820/storagelens/{storagelensid}/tagging"},"input":{"locationName":"PutStorageLensConfigurationTaggingRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["ConfigId","AccountId","Tags"],"members":{"ConfigId":{"location":"uri","locationName":"storagelensid"},"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Tags":{"shape":"S78"}}},"output":{"type":"structure","members":{}},"endpoint":{"hostPrefix":"{AccountId}."}},"UpdateJobPriority":{"http":{"requestUri":"/v20180820/jobs/{id}/priority"},"input":{"type":"structure","required":["AccountId","JobId","Priority"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"JobId":{"location":"uri","locationName":"id"},"Priority":{"location":"querystring","locationName":"priority","type":"integer"}}},"output":{"type":"structure","required":["JobId","Priority"],"members":{"JobId":{},"Priority":{"type":"integer"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"UpdateJobStatus":{"http":{"requestUri":"/v20180820/jobs/{id}/status"},"input":{"type":"structure","required":["AccountId","JobId","RequestedJobStatus"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"JobId":{"location":"uri","locationName":"id"},"RequestedJobStatus":{"location":"querystring","locationName":"requestedJobStatus"},"StatusUpdateReason":{"location":"querystring","locationName":"statusUpdateReason"}}},"output":{"type":"structure","members":{"JobId":{},"Status":{},"StatusUpdateReason":{}}},"endpoint":{"hostPrefix":"{AccountId}."}}},"shapes":{"S5":{"type":"structure","required":["VpcId"],"members":{"VpcId":{}}},"S7":{"type":"structure","members":{"BlockPublicAcls":{"locationName":"BlockPublicAcls","type":"boolean"},"IgnorePublicAcls":{"locationName":"IgnorePublicAcls","type":"boolean"},"BlockPublicPolicy":{"locationName":"BlockPublicPolicy","type":"boolean"},"RestrictPublicBuckets":{"locationName":"RestrictPublicBuckets","type":"boolean"}}},"Se":{"type":"structure","required":["SupportingAccessPoint","TransformationConfigurations"],"members":{"SupportingAccessPoint":{},"CloudWatchMetricsEnabled":{"type":"boolean"},"AllowedFeatures":{"type":"list","member":{"locationName":"AllowedFeature"}},"TransformationConfigurations":{"type":"list","member":{"locationName":"TransformationConfiguration","type":"structure","required":["Actions","ContentTransformation"],"members":{"Actions":{"type":"list","member":{"locationName":"Action"}},"ContentTransformation":{"type":"structure","members":{"AwsLambda":{"type":"structure","required":["FunctionArn"],"members":{"FunctionArn":{},"FunctionPayload":{}}}},"union":true}}}}}},"S19":{"type":"structure","members":{"LambdaInvoke":{"type":"structure","members":{"FunctionArn":{}}},"S3PutObjectCopy":{"type":"structure","members":{"TargetResource":{},"CannedAccessControlList":{},"AccessControlGrants":{"shape":"S1e"},"MetadataDirective":{},"ModifiedSinceConstraint":{"type":"timestamp"},"NewObjectMetadata":{"type":"structure","members":{"CacheControl":{},"ContentDisposition":{},"ContentEncoding":{},"ContentLanguage":{},"UserMetadata":{"type":"map","key":{},"value":{}},"ContentLength":{"type":"long"},"ContentMD5":{},"ContentType":{},"HttpExpiresDate":{"type":"timestamp"},"RequesterCharged":{"type":"boolean"},"SSEAlgorithm":{}}},"NewObjectTagging":{"shape":"S1r"},"RedirectLocation":{},"RequesterPays":{"type":"boolean"},"StorageClass":{},"UnModifiedSinceConstraint":{"type":"timestamp"},"SSEAwsKmsKeyId":{},"TargetKeyPrefix":{},"ObjectLockLegalHoldStatus":{},"ObjectLockMode":{},"ObjectLockRetainUntilDate":{"type":"timestamp"},"BucketKeyEnabled":{"type":"boolean"}}},"S3PutObjectAcl":{"type":"structure","members":{"AccessControlPolicy":{"type":"structure","members":{"AccessControlList":{"type":"structure","required":["Owner"],"members":{"Owner":{"type":"structure","members":{"ID":{},"DisplayName":{}}},"Grants":{"shape":"S1e"}}},"CannedAccessControlList":{}}}}},"S3PutObjectTagging":{"type":"structure","members":{"TagSet":{"shape":"S1r"}}},"S3DeleteObjectTagging":{"type":"structure","members":{}},"S3InitiateRestoreObject":{"type":"structure","members":{"ExpirationInDays":{"type":"integer"},"GlacierJobTier":{}}},"S3PutObjectLegalHold":{"type":"structure","required":["LegalHold"],"members":{"LegalHold":{"type":"structure","required":["Status"],"members":{"Status":{}}}}},"S3PutObjectRetention":{"type":"structure","required":["Retention"],"members":{"BypassGovernanceRetention":{"type":"boolean"},"Retention":{"type":"structure","members":{"RetainUntilDate":{"type":"timestamp"},"Mode":{}}}}}}},"S1e":{"type":"list","member":{"type":"structure","members":{"Grantee":{"type":"structure","members":{"TypeIdentifier":{},"Identifier":{},"DisplayName":{}}},"Permission":{}}}},"S1r":{"type":"list","member":{"shape":"S1s"}},"S1s":{"type":"structure","required":["Key","Value"],"members":{"Key":{},"Value":{}}},"S2e":{"type":"structure","required":["Enabled"],"members":{"Bucket":{},"Format":{},"Enabled":{"type":"boolean"},"Prefix":{},"ReportScope":{}}},"S2i":{"type":"structure","required":["Spec","Location"],"members":{"Spec":{"type":"structure","required":["Format"],"members":{"Format":{},"Fields":{"type":"list","member":{}}}},"Location":{"type":"structure","required":["ObjectArn","ETag"],"members":{"ObjectArn":{},"ObjectVersionId":{},"ETag":{}}}}},"S2x":{"type":"structure","required":["Name","Regions"],"members":{"Name":{},"PublicAccessBlock":{"shape":"S7"},"Regions":{"type":"list","member":{"locationName":"Region","type":"structure","required":["Bucket"],"members":{"Bucket":{}}}}}},"S3e":{"type":"structure","required":["Name"],"members":{"Name":{}}},"S3q":{"type":"structure","members":{"TotalNumberOfTasks":{"type":"long"},"NumberOfTasksSucceeded":{"type":"long"},"NumberOfTasksFailed":{"type":"long"}}},"S49":{"type":"structure","required":["Name","Policy"],"members":{"Name":{},"Policy":{}}},"S4y":{"type":"structure","members":{"IsPublic":{"locationName":"IsPublic","type":"boolean"}}},"S57":{"type":"list","member":{"locationName":"Rule","type":"structure","required":["Status"],"members":{"Expiration":{"type":"structure","members":{"Date":{"type":"timestamp"},"Days":{"type":"integer"},"ExpiredObjectDeleteMarker":{"type":"boolean"}}},"ID":{},"Filter":{"type":"structure","members":{"Prefix":{},"Tag":{"shape":"S1s"},"And":{"type":"structure","members":{"Prefix":{},"Tags":{"shape":"S1r"}}}}},"Status":{},"Transitions":{"type":"list","member":{"locationName":"Transition","type":"structure","members":{"Date":{"type":"timestamp"},"Days":{"type":"integer"},"StorageClass":{}}}},"NoncurrentVersionTransitions":{"type":"list","member":{"locationName":"NoncurrentVersionTransition","type":"structure","members":{"NoncurrentDays":{"type":"integer"},"StorageClass":{}}}},"NoncurrentVersionExpiration":{"type":"structure","members":{"NoncurrentDays":{"type":"integer"}}},"AbortIncompleteMultipartUpload":{"type":"structure","members":{"DaysAfterInitiation":{"type":"integer"}}}}}},"S5y":{"type":"structure","members":{"Name":{},"Alias":{},"CreatedAt":{"type":"timestamp"},"PublicAccessBlock":{"shape":"S7"},"Status":{},"Regions":{"type":"list","member":{"locationName":"Region","type":"structure","members":{"Bucket":{},"Region":{}}}}}},"S6f":{"type":"structure","required":["Id","AccountLevel","IsEnabled"],"members":{"Id":{},"AccountLevel":{"type":"structure","required":["BucketLevel"],"members":{"ActivityMetrics":{"shape":"S6h"},"BucketLevel":{"type":"structure","members":{"ActivityMetrics":{"shape":"S6h"},"PrefixLevel":{"type":"structure","required":["StorageMetrics"],"members":{"StorageMetrics":{"type":"structure","members":{"IsEnabled":{"type":"boolean"},"SelectionCriteria":{"type":"structure","members":{"Delimiter":{},"MaxDepth":{"type":"integer"},"MinStorageBytesPercentage":{"type":"double"}}}}}}}}}}},"Include":{"type":"structure","members":{"Buckets":{"shape":"S6r"},"Regions":{"shape":"S6s"}}},"Exclude":{"type":"structure","members":{"Buckets":{"shape":"S6r"},"Regions":{"shape":"S6s"}}},"DataExport":{"type":"structure","required":["S3BucketDestination"],"members":{"S3BucketDestination":{"type":"structure","required":["Format","OutputSchemaVersion","AccountId","Arn"],"members":{"Format":{},"OutputSchemaVersion":{},"AccountId":{},"Arn":{},"Prefix":{},"Encryption":{"type":"structure","members":{"SSES3":{"locationName":"SSE-S3","type":"structure","members":{}},"SSEKMS":{"locationName":"SSE-KMS","type":"structure","required":["KeyId"],"members":{"KeyId":{}}}}}}}}},"IsEnabled":{"type":"boolean"},"AwsOrg":{"type":"structure","required":["Arn"],"members":{"Arn":{}}},"StorageLensArn":{}}},"S6h":{"type":"structure","members":{"IsEnabled":{"type":"boolean"}}},"S6r":{"type":"list","member":{"locationName":"Arn"}},"S6s":{"type":"list","member":{"locationName":"Region"}},"S78":{"type":"list","member":{"locationName":"Tag","type":"structure","required":["Key","Value"],"members":{"Key":{},"Value":{}}}}}}; + +/***/ }), + /***/ 2102: /***/ (function(__unusedmodule, exports, __webpack_require__) { @@ -10771,7 +10785,7 @@ AWS.S3Control = Service.defineService('s3control', ['2018-08-20']); __webpack_require__(1489); Object.defineProperty(apiLoader.services['s3control'], '2018-08-20', { get: function get() { - var model = __webpack_require__(6539); + var model = __webpack_require__(2091); model.paginators = __webpack_require__(2592).pagination; return model; }, @@ -13660,6 +13674,71 @@ module.exports = {"version":"2.0","metadata":{"apiVersion":"2020-07-01","endpoin module.exports = {"metadata":{"apiVersion":"2018-05-14","endpointPrefix":"devices.iot1click","signingName":"iot1click","serviceFullName":"AWS IoT 1-Click Devices Service","serviceId":"IoT 1Click Devices Service","protocol":"rest-json","jsonVersion":"1.1","uid":"devices-2018-05-14","signatureVersion":"v4"},"operations":{"ClaimDevicesByClaimCode":{"http":{"method":"PUT","requestUri":"/claims/{claimCode}","responseCode":200},"input":{"type":"structure","members":{"ClaimCode":{"location":"uri","locationName":"claimCode"}},"required":["ClaimCode"]},"output":{"type":"structure","members":{"ClaimCode":{"locationName":"claimCode"},"Total":{"locationName":"total","type":"integer"}}}},"DescribeDevice":{"http":{"method":"GET","requestUri":"/devices/{deviceId}","responseCode":200},"input":{"type":"structure","members":{"DeviceId":{"location":"uri","locationName":"deviceId"}},"required":["DeviceId"]},"output":{"type":"structure","members":{"DeviceDescription":{"shape":"S8","locationName":"deviceDescription"}}}},"FinalizeDeviceClaim":{"http":{"method":"PUT","requestUri":"/devices/{deviceId}/finalize-claim","responseCode":200},"input":{"type":"structure","members":{"DeviceId":{"location":"uri","locationName":"deviceId"},"Tags":{"shape":"Sc","locationName":"tags"}},"required":["DeviceId"]},"output":{"type":"structure","members":{"State":{"locationName":"state"}}}},"GetDeviceMethods":{"http":{"method":"GET","requestUri":"/devices/{deviceId}/methods","responseCode":200},"input":{"type":"structure","members":{"DeviceId":{"location":"uri","locationName":"deviceId"}},"required":["DeviceId"]},"output":{"type":"structure","members":{"DeviceMethods":{"locationName":"deviceMethods","type":"list","member":{"shape":"Si"}}}}},"InitiateDeviceClaim":{"http":{"method":"PUT","requestUri":"/devices/{deviceId}/initiate-claim","responseCode":200},"input":{"type":"structure","members":{"DeviceId":{"location":"uri","locationName":"deviceId"}},"required":["DeviceId"]},"output":{"type":"structure","members":{"State":{"locationName":"state"}}}},"InvokeDeviceMethod":{"http":{"requestUri":"/devices/{deviceId}/methods","responseCode":200},"input":{"type":"structure","members":{"DeviceId":{"location":"uri","locationName":"deviceId"},"DeviceMethod":{"shape":"Si","locationName":"deviceMethod"},"DeviceMethodParameters":{"locationName":"deviceMethodParameters"}},"required":["DeviceId"]},"output":{"type":"structure","members":{"DeviceMethodResponse":{"locationName":"deviceMethodResponse"}}}},"ListDeviceEvents":{"http":{"method":"GET","requestUri":"/devices/{deviceId}/events","responseCode":200},"input":{"type":"structure","members":{"DeviceId":{"location":"uri","locationName":"deviceId"},"FromTimeStamp":{"shape":"So","location":"querystring","locationName":"fromTimeStamp"},"MaxResults":{"location":"querystring","locationName":"maxResults","type":"integer"},"NextToken":{"location":"querystring","locationName":"nextToken"},"ToTimeStamp":{"shape":"So","location":"querystring","locationName":"toTimeStamp"}},"required":["DeviceId","FromTimeStamp","ToTimeStamp"]},"output":{"type":"structure","members":{"Events":{"locationName":"events","type":"list","member":{"type":"structure","members":{"Device":{"locationName":"device","type":"structure","members":{"Attributes":{"locationName":"attributes","type":"structure","members":{}},"DeviceId":{"locationName":"deviceId"},"Type":{"locationName":"type"}}},"StdEvent":{"locationName":"stdEvent"}}}},"NextToken":{"locationName":"nextToken"}}}},"ListDevices":{"http":{"method":"GET","requestUri":"/devices","responseCode":200},"input":{"type":"structure","members":{"DeviceType":{"location":"querystring","locationName":"deviceType"},"MaxResults":{"location":"querystring","locationName":"maxResults","type":"integer"},"NextToken":{"location":"querystring","locationName":"nextToken"}}},"output":{"type":"structure","members":{"Devices":{"locationName":"devices","type":"list","member":{"shape":"S8"}},"NextToken":{"locationName":"nextToken"}}}},"ListTagsForResource":{"http":{"method":"GET","requestUri":"/tags/{resource-arn}","responseCode":200},"input":{"type":"structure","members":{"ResourceArn":{"location":"uri","locationName":"resource-arn"}},"required":["ResourceArn"]},"output":{"type":"structure","members":{"Tags":{"shape":"Sc","locationName":"tags"}}}},"TagResource":{"http":{"requestUri":"/tags/{resource-arn}","responseCode":204},"input":{"type":"structure","members":{"ResourceArn":{"location":"uri","locationName":"resource-arn"},"Tags":{"shape":"Sc","locationName":"tags"}},"required":["ResourceArn","Tags"]}},"UnclaimDevice":{"http":{"method":"PUT","requestUri":"/devices/{deviceId}/unclaim","responseCode":200},"input":{"type":"structure","members":{"DeviceId":{"location":"uri","locationName":"deviceId"}},"required":["DeviceId"]},"output":{"type":"structure","members":{"State":{"locationName":"state"}}}},"UntagResource":{"http":{"method":"DELETE","requestUri":"/tags/{resource-arn}","responseCode":204},"input":{"type":"structure","members":{"ResourceArn":{"location":"uri","locationName":"resource-arn"},"TagKeys":{"location":"querystring","locationName":"tagKeys","type":"list","member":{}}},"required":["TagKeys","ResourceArn"]}},"UpdateDeviceState":{"http":{"method":"PUT","requestUri":"/devices/{deviceId}/state","responseCode":200},"input":{"type":"structure","members":{"DeviceId":{"location":"uri","locationName":"deviceId"},"Enabled":{"locationName":"enabled","type":"boolean"}},"required":["DeviceId"]},"output":{"type":"structure","members":{}}}},"shapes":{"S8":{"type":"structure","members":{"Arn":{"locationName":"arn"},"Attributes":{"locationName":"attributes","type":"map","key":{},"value":{}},"DeviceId":{"locationName":"deviceId"},"Enabled":{"locationName":"enabled","type":"boolean"},"RemainingLife":{"locationName":"remainingLife","type":"double"},"Type":{"locationName":"type"},"Tags":{"shape":"Sc","locationName":"tags"}}},"Sc":{"type":"map","key":{},"value":{}},"Si":{"type":"structure","members":{"DeviceType":{"locationName":"deviceType"},"MethodName":{"locationName":"methodName"}}},"So":{"type":"timestamp","timestampFormat":"iso8601"}}}; +/***/ }), + +/***/ 2950: +/***/ (function(__unusedmodule, exports) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +function getProxyUrl(reqUrl) { + let usingSsl = reqUrl.protocol === 'https:'; + let proxyUrl; + if (checkBypass(reqUrl)) { + return proxyUrl; + } + let proxyVar; + if (usingSsl) { + proxyVar = process.env['https_proxy'] || process.env['HTTPS_PROXY']; + } + else { + proxyVar = process.env['http_proxy'] || process.env['HTTP_PROXY']; + } + if (proxyVar) { + proxyUrl = new URL(proxyVar); + } + return proxyUrl; +} +exports.getProxyUrl = getProxyUrl; +function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + let noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; + if (!noProxy) { + return false; + } + // Determine the request port + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } + else if (reqUrl.protocol === 'http:') { + reqPort = 80; + } + else if (reqUrl.protocol === 'https:') { + reqPort = 443; + } + // Format the request hostname and hostname with port + let upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === 'number') { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + // Compare request host against noproxy + for (let upperNoProxyItem of noProxy + .split(',') + .map(x => x.trim().toUpperCase()) + .filter(x => x)) { + if (upperReqHosts.some(x => x === upperNoProxyItem)) { + return true; + } + } + return false; +} +exports.checkBypass = checkBypass; + + /***/ }), /***/ 2966: @@ -15334,6 +15413,72 @@ module.exports = AWS.Textract; module.exports = {"version":"2.0","metadata":{"apiVersion":"2014-11-01","endpointPrefix":"kms","jsonVersion":"1.1","protocol":"json","serviceAbbreviation":"KMS","serviceFullName":"AWS Key Management Service","serviceId":"KMS","signatureVersion":"v4","targetPrefix":"TrentService","uid":"kms-2014-11-01"},"operations":{"CancelKeyDeletion":{"input":{"type":"structure","required":["KeyId"],"members":{"KeyId":{}}},"output":{"type":"structure","members":{"KeyId":{}}}},"ConnectCustomKeyStore":{"input":{"type":"structure","required":["CustomKeyStoreId"],"members":{"CustomKeyStoreId":{}}},"output":{"type":"structure","members":{}}},"CreateAlias":{"input":{"type":"structure","required":["AliasName","TargetKeyId"],"members":{"AliasName":{},"TargetKeyId":{}}}},"CreateCustomKeyStore":{"input":{"type":"structure","required":["CustomKeyStoreName","CloudHsmClusterId","TrustAnchorCertificate","KeyStorePassword"],"members":{"CustomKeyStoreName":{},"CloudHsmClusterId":{},"TrustAnchorCertificate":{},"KeyStorePassword":{"shape":"Sd"}}},"output":{"type":"structure","members":{"CustomKeyStoreId":{}}}},"CreateGrant":{"input":{"type":"structure","required":["KeyId","GranteePrincipal","Operations"],"members":{"KeyId":{},"GranteePrincipal":{},"RetiringPrincipal":{},"Operations":{"shape":"Sh"},"Constraints":{"shape":"Sj"},"GrantTokens":{"shape":"Sn"},"Name":{}}},"output":{"type":"structure","members":{"GrantToken":{},"GrantId":{}}}},"CreateKey":{"input":{"type":"structure","members":{"Policy":{},"Description":{},"KeyUsage":{},"CustomerMasterKeySpec":{"shape":"Sw","deprecated":true,"deprecatedMessage":"This parameter has been deprecated. Instead, use the KeySpec parameter."},"KeySpec":{},"Origin":{},"CustomKeyStoreId":{},"BypassPolicyLockoutSafetyCheck":{"type":"boolean"},"Tags":{"shape":"S10"},"MultiRegion":{"type":"boolean"}}},"output":{"type":"structure","members":{"KeyMetadata":{"shape":"S16"}}}},"Decrypt":{"input":{"type":"structure","required":["CiphertextBlob"],"members":{"CiphertextBlob":{"type":"blob"},"EncryptionContext":{"shape":"Sk"},"GrantTokens":{"shape":"Sn"},"KeyId":{},"EncryptionAlgorithm":{}}},"output":{"type":"structure","members":{"KeyId":{},"Plaintext":{"shape":"S1q"},"EncryptionAlgorithm":{}}}},"DeleteAlias":{"input":{"type":"structure","required":["AliasName"],"members":{"AliasName":{}}}},"DeleteCustomKeyStore":{"input":{"type":"structure","required":["CustomKeyStoreId"],"members":{"CustomKeyStoreId":{}}},"output":{"type":"structure","members":{}}},"DeleteImportedKeyMaterial":{"input":{"type":"structure","required":["KeyId"],"members":{"KeyId":{}}}},"DescribeCustomKeyStores":{"input":{"type":"structure","members":{"CustomKeyStoreId":{},"CustomKeyStoreName":{},"Limit":{"type":"integer"},"Marker":{}}},"output":{"type":"structure","members":{"CustomKeyStores":{"type":"list","member":{"type":"structure","members":{"CustomKeyStoreId":{},"CustomKeyStoreName":{},"CloudHsmClusterId":{},"TrustAnchorCertificate":{},"ConnectionState":{},"ConnectionErrorCode":{},"CreationDate":{"type":"timestamp"}}}},"NextMarker":{},"Truncated":{"type":"boolean"}}}},"DescribeKey":{"input":{"type":"structure","required":["KeyId"],"members":{"KeyId":{},"GrantTokens":{"shape":"Sn"}}},"output":{"type":"structure","members":{"KeyMetadata":{"shape":"S16"}}}},"DisableKey":{"input":{"type":"structure","required":["KeyId"],"members":{"KeyId":{}}}},"DisableKeyRotation":{"input":{"type":"structure","required":["KeyId"],"members":{"KeyId":{}}}},"DisconnectCustomKeyStore":{"input":{"type":"structure","required":["CustomKeyStoreId"],"members":{"CustomKeyStoreId":{}}},"output":{"type":"structure","members":{}}},"EnableKey":{"input":{"type":"structure","required":["KeyId"],"members":{"KeyId":{}}}},"EnableKeyRotation":{"input":{"type":"structure","required":["KeyId"],"members":{"KeyId":{}}}},"Encrypt":{"input":{"type":"structure","required":["KeyId","Plaintext"],"members":{"KeyId":{},"Plaintext":{"shape":"S1q"},"EncryptionContext":{"shape":"Sk"},"GrantTokens":{"shape":"Sn"},"EncryptionAlgorithm":{}}},"output":{"type":"structure","members":{"CiphertextBlob":{"type":"blob"},"KeyId":{},"EncryptionAlgorithm":{}}}},"GenerateDataKey":{"input":{"type":"structure","required":["KeyId"],"members":{"KeyId":{},"EncryptionContext":{"shape":"Sk"},"NumberOfBytes":{"type":"integer"},"KeySpec":{},"GrantTokens":{"shape":"Sn"}}},"output":{"type":"structure","members":{"CiphertextBlob":{"type":"blob"},"Plaintext":{"shape":"S1q"},"KeyId":{}}}},"GenerateDataKeyPair":{"input":{"type":"structure","required":["KeyId","KeyPairSpec"],"members":{"EncryptionContext":{"shape":"Sk"},"KeyId":{},"KeyPairSpec":{},"GrantTokens":{"shape":"Sn"}}},"output":{"type":"structure","members":{"PrivateKeyCiphertextBlob":{"type":"blob"},"PrivateKeyPlaintext":{"shape":"S1q"},"PublicKey":{"type":"blob"},"KeyId":{},"KeyPairSpec":{}}}},"GenerateDataKeyPairWithoutPlaintext":{"input":{"type":"structure","required":["KeyId","KeyPairSpec"],"members":{"EncryptionContext":{"shape":"Sk"},"KeyId":{},"KeyPairSpec":{},"GrantTokens":{"shape":"Sn"}}},"output":{"type":"structure","members":{"PrivateKeyCiphertextBlob":{"type":"blob"},"PublicKey":{"type":"blob"},"KeyId":{},"KeyPairSpec":{}}}},"GenerateDataKeyWithoutPlaintext":{"input":{"type":"structure","required":["KeyId"],"members":{"KeyId":{},"EncryptionContext":{"shape":"Sk"},"KeySpec":{},"NumberOfBytes":{"type":"integer"},"GrantTokens":{"shape":"Sn"}}},"output":{"type":"structure","members":{"CiphertextBlob":{"type":"blob"},"KeyId":{}}}},"GenerateRandom":{"input":{"type":"structure","members":{"NumberOfBytes":{"type":"integer"},"CustomKeyStoreId":{}}},"output":{"type":"structure","members":{"Plaintext":{"shape":"S1q"}}}},"GetKeyPolicy":{"input":{"type":"structure","required":["KeyId","PolicyName"],"members":{"KeyId":{},"PolicyName":{}}},"output":{"type":"structure","members":{"Policy":{}}}},"GetKeyRotationStatus":{"input":{"type":"structure","required":["KeyId"],"members":{"KeyId":{}}},"output":{"type":"structure","members":{"KeyRotationEnabled":{"type":"boolean"}}}},"GetParametersForImport":{"input":{"type":"structure","required":["KeyId","WrappingAlgorithm","WrappingKeySpec"],"members":{"KeyId":{},"WrappingAlgorithm":{},"WrappingKeySpec":{}}},"output":{"type":"structure","members":{"KeyId":{},"ImportToken":{"type":"blob"},"PublicKey":{"shape":"S1q"},"ParametersValidTo":{"type":"timestamp"}}}},"GetPublicKey":{"input":{"type":"structure","required":["KeyId"],"members":{"KeyId":{},"GrantTokens":{"shape":"Sn"}}},"output":{"type":"structure","members":{"KeyId":{},"PublicKey":{"type":"blob"},"CustomerMasterKeySpec":{"shape":"Sw","deprecated":true,"deprecatedMessage":"This field has been deprecated. Instead, use the KeySpec field."},"KeySpec":{},"KeyUsage":{},"EncryptionAlgorithms":{"shape":"S1d"},"SigningAlgorithms":{"shape":"S1f"}}}},"ImportKeyMaterial":{"input":{"type":"structure","required":["KeyId","ImportToken","EncryptedKeyMaterial"],"members":{"KeyId":{},"ImportToken":{"type":"blob"},"EncryptedKeyMaterial":{"type":"blob"},"ValidTo":{"type":"timestamp"},"ExpirationModel":{}}},"output":{"type":"structure","members":{}}},"ListAliases":{"input":{"type":"structure","members":{"KeyId":{},"Limit":{"type":"integer"},"Marker":{}}},"output":{"type":"structure","members":{"Aliases":{"type":"list","member":{"type":"structure","members":{"AliasName":{},"AliasArn":{},"TargetKeyId":{},"CreationDate":{"type":"timestamp"},"LastUpdatedDate":{"type":"timestamp"}}}},"NextMarker":{},"Truncated":{"type":"boolean"}}}},"ListGrants":{"input":{"type":"structure","required":["KeyId"],"members":{"Limit":{"type":"integer"},"Marker":{},"KeyId":{},"GrantId":{},"GranteePrincipal":{}}},"output":{"shape":"S39"}},"ListKeyPolicies":{"input":{"type":"structure","required":["KeyId"],"members":{"KeyId":{},"Limit":{"type":"integer"},"Marker":{}}},"output":{"type":"structure","members":{"PolicyNames":{"type":"list","member":{}},"NextMarker":{},"Truncated":{"type":"boolean"}}}},"ListKeys":{"input":{"type":"structure","members":{"Limit":{"type":"integer"},"Marker":{}}},"output":{"type":"structure","members":{"Keys":{"type":"list","member":{"type":"structure","members":{"KeyId":{},"KeyArn":{}}}},"NextMarker":{},"Truncated":{"type":"boolean"}}}},"ListResourceTags":{"input":{"type":"structure","required":["KeyId"],"members":{"KeyId":{},"Limit":{"type":"integer"},"Marker":{}}},"output":{"type":"structure","members":{"Tags":{"shape":"S10"},"NextMarker":{},"Truncated":{"type":"boolean"}}}},"ListRetirableGrants":{"input":{"type":"structure","required":["RetiringPrincipal"],"members":{"Limit":{"type":"integer"},"Marker":{},"RetiringPrincipal":{}}},"output":{"shape":"S39"}},"PutKeyPolicy":{"input":{"type":"structure","required":["KeyId","PolicyName","Policy"],"members":{"KeyId":{},"PolicyName":{},"Policy":{},"BypassPolicyLockoutSafetyCheck":{"type":"boolean"}}}},"ReEncrypt":{"input":{"type":"structure","required":["CiphertextBlob","DestinationKeyId"],"members":{"CiphertextBlob":{"type":"blob"},"SourceEncryptionContext":{"shape":"Sk"},"SourceKeyId":{},"DestinationKeyId":{},"DestinationEncryptionContext":{"shape":"Sk"},"SourceEncryptionAlgorithm":{},"DestinationEncryptionAlgorithm":{},"GrantTokens":{"shape":"Sn"}}},"output":{"type":"structure","members":{"CiphertextBlob":{"type":"blob"},"SourceKeyId":{},"KeyId":{},"SourceEncryptionAlgorithm":{},"DestinationEncryptionAlgorithm":{}}}},"ReplicateKey":{"input":{"type":"structure","required":["KeyId","ReplicaRegion"],"members":{"KeyId":{},"ReplicaRegion":{},"Policy":{},"BypassPolicyLockoutSafetyCheck":{"type":"boolean"},"Description":{},"Tags":{"shape":"S10"}}},"output":{"type":"structure","members":{"ReplicaKeyMetadata":{"shape":"S16"},"ReplicaPolicy":{},"ReplicaTags":{"shape":"S10"}}}},"RetireGrant":{"input":{"type":"structure","members":{"GrantToken":{},"KeyId":{},"GrantId":{}}}},"RevokeGrant":{"input":{"type":"structure","required":["KeyId","GrantId"],"members":{"KeyId":{},"GrantId":{}}}},"ScheduleKeyDeletion":{"input":{"type":"structure","required":["KeyId"],"members":{"KeyId":{},"PendingWindowInDays":{"type":"integer"}}},"output":{"type":"structure","members":{"KeyId":{},"DeletionDate":{"type":"timestamp"},"KeyState":{},"PendingWindowInDays":{"type":"integer"}}}},"Sign":{"input":{"type":"structure","required":["KeyId","Message","SigningAlgorithm"],"members":{"KeyId":{},"Message":{"shape":"S1q"},"MessageType":{},"GrantTokens":{"shape":"Sn"},"SigningAlgorithm":{}}},"output":{"type":"structure","members":{"KeyId":{},"Signature":{"type":"blob"},"SigningAlgorithm":{}}}},"TagResource":{"input":{"type":"structure","required":["KeyId","Tags"],"members":{"KeyId":{},"Tags":{"shape":"S10"}}}},"UntagResource":{"input":{"type":"structure","required":["KeyId","TagKeys"],"members":{"KeyId":{},"TagKeys":{"type":"list","member":{}}}}},"UpdateAlias":{"input":{"type":"structure","required":["AliasName","TargetKeyId"],"members":{"AliasName":{},"TargetKeyId":{}}}},"UpdateCustomKeyStore":{"input":{"type":"structure","required":["CustomKeyStoreId"],"members":{"CustomKeyStoreId":{},"NewCustomKeyStoreName":{},"KeyStorePassword":{"shape":"Sd"},"CloudHsmClusterId":{}}},"output":{"type":"structure","members":{}}},"UpdateKeyDescription":{"input":{"type":"structure","required":["KeyId","Description"],"members":{"KeyId":{},"Description":{}}}},"UpdatePrimaryRegion":{"input":{"type":"structure","required":["KeyId","PrimaryRegion"],"members":{"KeyId":{},"PrimaryRegion":{}}}},"Verify":{"input":{"type":"structure","required":["KeyId","Message","Signature","SigningAlgorithm"],"members":{"KeyId":{},"Message":{"shape":"S1q"},"MessageType":{},"Signature":{"type":"blob"},"SigningAlgorithm":{},"GrantTokens":{"shape":"Sn"}}},"output":{"type":"structure","members":{"KeyId":{},"SignatureValid":{"type":"boolean"},"SigningAlgorithm":{}}}}},"shapes":{"Sd":{"type":"string","sensitive":true},"Sh":{"type":"list","member":{}},"Sj":{"type":"structure","members":{"EncryptionContextSubset":{"shape":"Sk"},"EncryptionContextEquals":{"shape":"Sk"}}},"Sk":{"type":"map","key":{},"value":{}},"Sn":{"type":"list","member":{}},"Sw":{"type":"string","deprecated":true,"deprecatedMessage":"This enum has been deprecated. Instead, use the KeySpec enum."},"S10":{"type":"list","member":{"type":"structure","required":["TagKey","TagValue"],"members":{"TagKey":{},"TagValue":{}}}},"S16":{"type":"structure","required":["KeyId"],"members":{"AWSAccountId":{},"KeyId":{},"Arn":{},"CreationDate":{"type":"timestamp"},"Enabled":{"type":"boolean"},"Description":{},"KeyUsage":{},"KeyState":{},"DeletionDate":{"type":"timestamp"},"ValidTo":{"type":"timestamp"},"Origin":{},"CustomKeyStoreId":{},"CloudHsmClusterId":{},"ExpirationModel":{},"KeyManager":{},"CustomerMasterKeySpec":{"shape":"Sw","deprecated":true,"deprecatedMessage":"This field has been deprecated. Instead, use the KeySpec field."},"KeySpec":{},"EncryptionAlgorithms":{"shape":"S1d"},"SigningAlgorithms":{"shape":"S1f"},"MultiRegion":{"type":"boolean"},"MultiRegionConfiguration":{"type":"structure","members":{"MultiRegionKeyType":{},"PrimaryKey":{"shape":"S1j"},"ReplicaKeys":{"type":"list","member":{"shape":"S1j"}}}},"PendingDeletionWindowInDays":{"type":"integer"}}},"S1d":{"type":"list","member":{}},"S1f":{"type":"list","member":{}},"S1j":{"type":"structure","members":{"Arn":{},"Region":{}}},"S1q":{"type":"blob","sensitive":true},"S39":{"type":"structure","members":{"Grants":{"type":"list","member":{"type":"structure","members":{"KeyId":{},"GrantId":{},"Name":{},"CreationDate":{"type":"timestamp"},"GranteePrincipal":{},"RetiringPrincipal":{},"IssuingAccount":{},"Operations":{"shape":"Sh"},"Constraints":{"shape":"Sj"}}}},"NextMarker":{},"Truncated":{"type":"boolean"}}}}}; +/***/ }), + +/***/ 3226: +/***/ (function(__unusedmodule, exports) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +class BasicCredentialHandler { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + options.headers['Authorization'] = + 'Basic ' + + Buffer.from(this.username + ':' + this.password).toString('base64'); + } + // This handler cannot handle 401 + canHandleAuthentication(response) { + return false; + } + handleAuthentication(httpClient, requestInfo, objs) { + return null; + } +} +exports.BasicCredentialHandler = BasicCredentialHandler; +class BearerCredentialHandler { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + options.headers['Authorization'] = 'Bearer ' + this.token; + } + // This handler cannot handle 401 + canHandleAuthentication(response) { + return false; + } + handleAuthentication(httpClient, requestInfo, objs) { + return null; + } +} +exports.BearerCredentialHandler = BearerCredentialHandler; +class PersonalAccessTokenCredentialHandler { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + options.headers['Authorization'] = + 'Basic ' + Buffer.from('PAT:' + this.token).toString('base64'); + } + // This handler cannot handle 401 + canHandleAuthentication(response) { + return false; + } + handleAuthentication(httpClient, requestInfo, objs) { + return null; + } +} +exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + + /***/ }), /***/ 3228: @@ -20616,6 +20761,13 @@ module.exports = {"version":"2.0","metadata":{"apiVersion":"2015-12-10","endpoin /***/ }), +/***/ 4016: +/***/ (function(module) { + +module.exports = require("tls"); + +/***/ }), + /***/ 4035: /***/ (function(module, __unusedexports, __webpack_require__) { @@ -25657,6 +25809,7 @@ function toCommandProperties(annotationProperties) { } return { title: annotationProperties.title, + file: annotationProperties.file, line: annotationProperties.startLine, endLine: annotationProperties.endLine, col: annotationProperties.startColumn, @@ -29899,12 +30052,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; +exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; const command_1 = __webpack_require__(4431); const file_command_1 = __webpack_require__(2102); const utils_1 = __webpack_require__(5082); const os = __importStar(__webpack_require__(2087)); const path = __importStar(__webpack_require__(5622)); +const oidc_utils_1 = __webpack_require__(6742); /** * The code to exit an action */ @@ -30173,6 +30327,12 @@ function getState(name) { return process.env[`STATE_${name}`] || ''; } exports.getState = getState; +function getIDToken(aud) { + return __awaiter(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); +} +exports.getIDToken = getIDToken; //# sourceMappingURL=core.js.map /***/ }), @@ -30511,9 +30671,547 @@ module.exports = {"version":"2.0","metadata":{"apiVersion":"2018-09-17","endpoin /***/ }), /***/ 6539: -/***/ (function(module) { +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +const http = __webpack_require__(8605); +const https = __webpack_require__(7211); +const pm = __webpack_require__(2950); +let tunnel; +var HttpCodes; +(function (HttpCodes) { + HttpCodes[HttpCodes["OK"] = 200] = "OK"; + HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; + HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; + HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; + HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; + HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; + HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; + HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; + HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; + HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; + HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; +})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); +var Headers; +(function (Headers) { + Headers["Accept"] = "accept"; + Headers["ContentType"] = "content-type"; +})(Headers = exports.Headers || (exports.Headers = {})); +var MediaTypes; +(function (MediaTypes) { + MediaTypes["ApplicationJson"] = "application/json"; +})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); +/** + * Returns the proxy URL, depending upon the supplied url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ +function getProxyUrl(serverUrl) { + let proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ''; +} +exports.getProxyUrl = getProxyUrl; +const HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect +]; +const HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout +]; +const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD']; +const ExponentialBackoffCeiling = 10; +const ExponentialBackoffTimeSlice = 5; +class HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = 'HttpClientError'; + this.statusCode = statusCode; + Object.setPrototypeOf(this, HttpClientError.prototype); + } +} +exports.HttpClientError = HttpClientError; +class HttpClientResponse { + constructor(message) { + this.message = message; + } + readBody() { + return new Promise(async (resolve, reject) => { + let output = Buffer.alloc(0); + this.message.on('data', (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on('end', () => { + resolve(output.toString()); + }); + }); + } +} +exports.HttpClientResponse = HttpClientResponse; +function isHttps(requestUrl) { + let parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === 'https:'; +} +exports.isHttps = isHttps; +class HttpClient { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); + } + get(requestUrl, additionalHeaders) { + return this.request('GET', requestUrl, null, additionalHeaders || {}); + } + del(requestUrl, additionalHeaders) { + return this.request('DELETE', requestUrl, null, additionalHeaders || {}); + } + post(requestUrl, data, additionalHeaders) { + return this.request('POST', requestUrl, data, additionalHeaders || {}); + } + patch(requestUrl, data, additionalHeaders) { + return this.request('PATCH', requestUrl, data, additionalHeaders || {}); + } + put(requestUrl, data, additionalHeaders) { + return this.request('PUT', requestUrl, data, additionalHeaders || {}); + } + head(requestUrl, additionalHeaders) { + return this.request('HEAD', requestUrl, null, additionalHeaders || {}); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return this.request(verb, requestUrl, stream, additionalHeaders); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + async getJson(requestUrl, additionalHeaders = {}) { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + let res = await this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + } + async postJson(requestUrl, obj, additionalHeaders = {}) { + let data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + let res = await this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + } + async putJson(requestUrl, obj, additionalHeaders = {}) { + let data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + let res = await this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + } + async patchJson(requestUrl, obj, additionalHeaders = {}) { + let data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + let res = await this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + async request(verb, requestUrl, data, headers) { + if (this._disposed) { + throw new Error('Client has already been disposed.'); + } + let parsedUrl = new URL(requestUrl); + let info = this._prepareRequest(verb, parsedUrl, headers); + // Only perform retries on reads since writes may not be idempotent. + let maxTries = this._allowRetries && RetryableHttpVerbs.indexOf(verb) != -1 + ? this._maxRetries + 1 + : 1; + let numTries = 0; + let response; + while (numTries < maxTries) { + response = await this.requestRaw(info, data); + // Check if it's an authentication challenge + if (response && + response.message && + response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (let i = 0; i < this.handlers.length; i++) { + if (this.handlers[i].canHandleAuthentication(response)) { + authenticationHandler = this.handlers[i]; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info, data); + } + else { + // We have received an unauthorized response but have no handlers to handle it. + // Let the response return to the caller. + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (HttpRedirectCodes.indexOf(response.message.statusCode) != -1 && + this._allowRedirects && + redirectsRemaining > 0) { + const redirectUrl = response.message.headers['location']; + if (!redirectUrl) { + // if there's no location to redirect to, we won't + break; + } + let parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol == 'https:' && + parsedUrl.protocol != parsedRedirectUrl.protocol && + !this._allowRedirectDowngrade) { + throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.'); + } + // we need to finish reading the response before reassigning response + // which will leak the open socket. + await response.readBody(); + // strip authorization header if redirected to a different hostname + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (let header in headers) { + // header names are case insensitive + if (header.toLowerCase() === 'authorization') { + delete headers[header]; + } + } + } + // let's make the request with the new redirectUrl + info = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = await this.requestRaw(info, data); + redirectsRemaining--; + } + if (HttpResponseRetryCodes.indexOf(response.message.statusCode) == -1) { + // If not a retry code, return immediately instead of retrying + return response; + } + numTries += 1; + if (numTries < maxTries) { + await response.readBody(); + await this._performExponentialBackoff(numTries); + } + } + return response; + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info, data) { + return new Promise((resolve, reject) => { + let callbackForResult = function (err, res) { + if (err) { + reject(err); + } + resolve(res); + }; + this.requestRawWithCallback(info, data, callbackForResult); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info, data, onResult) { + let socket; + if (typeof data === 'string') { + info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8'); + } + let callbackCalled = false; + let handleResult = (err, res) => { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + }; + let req = info.httpModule.request(info.options, (msg) => { + let res = new HttpClientResponse(msg); + handleResult(null, res); + }); + req.on('socket', sock => { + socket = sock; + }); + // If we ever get disconnected, we want the socket to timeout eventually + req.setTimeout(this._socketTimeout || 3 * 60000, () => { + if (socket) { + socket.end(); + } + handleResult(new Error('Request timeout: ' + info.options.path), null); + }); + req.on('error', function (err) { + // err has statusCode property + // res should have headers + handleResult(err, null); + }); + if (data && typeof data === 'string') { + req.write(data, 'utf8'); + } + if (data && typeof data !== 'string') { + data.on('close', function () { + req.end(); + }); + data.pipe(req); + } + else { + req.end(); + } + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + let parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info = {}; + info.parsedUrl = requestUrl; + const usingSsl = info.parsedUrl.protocol === 'https:'; + info.httpModule = usingSsl ? https : http; + const defaultPort = usingSsl ? 443 : 80; + info.options = {}; + info.options.host = info.parsedUrl.hostname; + info.options.port = info.parsedUrl.port + ? parseInt(info.parsedUrl.port) + : defaultPort; + info.options.path = + (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); + info.options.method = method; + info.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info.options.headers['user-agent'] = this.userAgent; + } + info.options.agent = this._getAgent(info.parsedUrl); + // gives handlers an opportunity to participate + if (this.handlers) { + this.handlers.forEach(handler => { + handler.prepareRequest(info.options); + }); + } + return info; + } + _mergeHeaders(headers) { + const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers)); + } + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default) { + const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + } + return additionalHeaders[header] || clientHeader || _default; + } + _getAgent(parsedUrl) { + let agent; + let proxyUrl = pm.getProxyUrl(parsedUrl); + let useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (this._keepAlive && !useProxy) { + agent = this._agent; + } + // if agent is already assigned use that agent. + if (!!agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === 'https:'; + let maxSockets = 100; + if (!!this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + if (useProxy) { + // If using proxy, need tunnel + if (!tunnel) { + tunnel = __webpack_require__(7413); + } + const agentOptions = { + maxSockets: maxSockets, + keepAlive: this._keepAlive, + proxy: { + ...((proxyUrl.username || proxyUrl.password) && { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` + }), + host: proxyUrl.hostname, + port: proxyUrl.port + } + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === 'https:'; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } + else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + // if reusing agent across request and tunneling agent isn't assigned create a new agent + if (this._keepAlive && !agent) { + const options = { keepAlive: this._keepAlive, maxSockets: maxSockets }; + agent = usingSsl ? new https.Agent(options) : new http.Agent(options); + this._agent = agent; + } + // if not using private agent and tunnel agent isn't setup then use global agent + if (!agent) { + agent = usingSsl ? https.globalAgent : http.globalAgent; + } + if (usingSsl && this._ignoreSslError) { + // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process + // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options + // we have to cast it to any and change it directly + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); + } + return agent; + } + _performExponentialBackoff(retryNumber) { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise(resolve => setTimeout(() => resolve(), ms)); + } + static dateTimeDeserializer(key, value) { + if (typeof value === 'string') { + let a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + async _processResponse(res, options) { + return new Promise(async (resolve, reject) => { + const statusCode = res.message.statusCode; + const response = { + statusCode: statusCode, + result: null, + headers: {} + }; + // not found leads to null obj returned + if (statusCode == HttpCodes.NotFound) { + resolve(response); + } + let obj; + let contents; + // get the result from the body + try { + contents = await res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, HttpClient.dateTimeDeserializer); + } + else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } + catch (err) { + // Invalid resource (contents not json); leaving result obj null + } + // note that 3xx redirects are handled by the http layer. + if (statusCode > 299) { + let msg; + // if exception/error in body, attempt to get better error + if (obj && obj.message) { + msg = obj.message; + } + else if (contents && contents.length > 0) { + // it may be the case that the exception is in the body message as string + msg = contents; + } + else { + msg = 'Failed request: (' + statusCode + ')'; + } + let err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } + else { + resolve(response); + } + }); + } +} +exports.HttpClient = HttpClient; -module.exports = {"version":"2.0","metadata":{"apiVersion":"2018-08-20","endpointPrefix":"s3-control","protocol":"rest-xml","serviceFullName":"AWS S3 Control","serviceId":"S3 Control","signatureVersion":"s3v4","signingName":"s3","uid":"s3control-2018-08-20"},"operations":{"CreateAccessPoint":{"http":{"method":"PUT","requestUri":"/v20180820/accesspoint/{name}"},"input":{"locationName":"CreateAccessPointRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","Name","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"},"Bucket":{},"VpcConfiguration":{"shape":"S5"},"PublicAccessBlockConfiguration":{"shape":"S7"}}},"output":{"type":"structure","members":{"AccessPointArn":{},"Alias":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"CreateAccessPointForObjectLambda":{"http":{"method":"PUT","requestUri":"/v20180820/accesspointforobjectlambda/{name}"},"input":{"locationName":"CreateAccessPointForObjectLambdaRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","Name","Configuration"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"},"Configuration":{"shape":"Se"}}},"output":{"type":"structure","members":{"ObjectLambdaAccessPointArn":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"CreateBucket":{"http":{"method":"PUT","requestUri":"/v20180820/bucket/{name}"},"input":{"type":"structure","required":["Bucket"],"members":{"ACL":{"location":"header","locationName":"x-amz-acl"},"Bucket":{"location":"uri","locationName":"name"},"CreateBucketConfiguration":{"locationName":"CreateBucketConfiguration","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","members":{"LocationConstraint":{}}},"GrantFullControl":{"location":"header","locationName":"x-amz-grant-full-control"},"GrantRead":{"location":"header","locationName":"x-amz-grant-read"},"GrantReadACP":{"location":"header","locationName":"x-amz-grant-read-acp"},"GrantWrite":{"location":"header","locationName":"x-amz-grant-write"},"GrantWriteACP":{"location":"header","locationName":"x-amz-grant-write-acp"},"ObjectLockEnabledForBucket":{"location":"header","locationName":"x-amz-bucket-object-lock-enabled","type":"boolean"},"OutpostId":{"location":"header","locationName":"x-amz-outpost-id"}},"payload":"CreateBucketConfiguration"},"output":{"type":"structure","members":{"Location":{"location":"header","locationName":"Location"},"BucketArn":{}}},"httpChecksumRequired":true},"CreateJob":{"http":{"requestUri":"/v20180820/jobs"},"input":{"locationName":"CreateJobRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","Operation","Report","ClientRequestToken","Manifest","Priority","RoleArn"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"ConfirmationRequired":{"type":"boolean"},"Operation":{"shape":"S19"},"Report":{"shape":"S2e"},"ClientRequestToken":{"idempotencyToken":true},"Manifest":{"shape":"S2i"},"Description":{},"Priority":{"type":"integer"},"RoleArn":{},"Tags":{"shape":"S1r"}}},"output":{"type":"structure","members":{"JobId":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"CreateMultiRegionAccessPoint":{"http":{"requestUri":"/v20180820/async-requests/mrap/create"},"input":{"locationName":"CreateMultiRegionAccessPointRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","ClientToken","Details"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"ClientToken":{"idempotencyToken":true},"Details":{"shape":"S2x"}}},"output":{"type":"structure","members":{"RequestTokenARN":{}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"DeleteAccessPoint":{"http":{"method":"DELETE","requestUri":"/v20180820/accesspoint/{name}"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteAccessPointForObjectLambda":{"http":{"method":"DELETE","requestUri":"/v20180820/accesspointforobjectlambda/{name}"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteAccessPointPolicy":{"http":{"method":"DELETE","requestUri":"/v20180820/accesspoint/{name}/policy"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteAccessPointPolicyForObjectLambda":{"http":{"method":"DELETE","requestUri":"/v20180820/accesspointforobjectlambda/{name}/policy"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteBucket":{"http":{"method":"DELETE","requestUri":"/v20180820/bucket/{name}"},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteBucketLifecycleConfiguration":{"http":{"method":"DELETE","requestUri":"/v20180820/bucket/{name}/lifecycleconfiguration"},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteBucketPolicy":{"http":{"method":"DELETE","requestUri":"/v20180820/bucket/{name}/policy"},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteBucketTagging":{"http":{"method":"DELETE","requestUri":"/v20180820/bucket/{name}/tagging","responseCode":204},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteJobTagging":{"http":{"method":"DELETE","requestUri":"/v20180820/jobs/{id}/tagging"},"input":{"type":"structure","required":["AccountId","JobId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"JobId":{"location":"uri","locationName":"id"}}},"output":{"type":"structure","members":{}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteMultiRegionAccessPoint":{"http":{"requestUri":"/v20180820/async-requests/mrap/delete"},"input":{"locationName":"DeleteMultiRegionAccessPointRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","ClientToken","Details"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"ClientToken":{"idempotencyToken":true},"Details":{"shape":"S3e"}}},"output":{"type":"structure","members":{"RequestTokenARN":{}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"DeletePublicAccessBlock":{"http":{"method":"DELETE","requestUri":"/v20180820/configuration/publicAccessBlock"},"input":{"type":"structure","required":["AccountId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteStorageLensConfiguration":{"http":{"method":"DELETE","requestUri":"/v20180820/storagelens/{storagelensid}"},"input":{"type":"structure","required":["ConfigId","AccountId"],"members":{"ConfigId":{"location":"uri","locationName":"storagelensid"},"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteStorageLensConfigurationTagging":{"http":{"method":"DELETE","requestUri":"/v20180820/storagelens/{storagelensid}/tagging"},"input":{"type":"structure","required":["ConfigId","AccountId"],"members":{"ConfigId":{"location":"uri","locationName":"storagelensid"},"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"}}},"output":{"type":"structure","members":{}},"endpoint":{"hostPrefix":"{AccountId}."}},"DescribeJob":{"http":{"method":"GET","requestUri":"/v20180820/jobs/{id}"},"input":{"type":"structure","required":["AccountId","JobId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"JobId":{"location":"uri","locationName":"id"}}},"output":{"type":"structure","members":{"Job":{"type":"structure","members":{"JobId":{},"ConfirmationRequired":{"type":"boolean"},"Description":{},"JobArn":{},"Status":{},"Manifest":{"shape":"S2i"},"Operation":{"shape":"S19"},"Priority":{"type":"integer"},"ProgressSummary":{"shape":"S3q"},"StatusUpdateReason":{},"FailureReasons":{"type":"list","member":{"type":"structure","members":{"FailureCode":{},"FailureReason":{}}}},"Report":{"shape":"S2e"},"CreationTime":{"type":"timestamp"},"TerminationDate":{"type":"timestamp"},"RoleArn":{},"SuspendedDate":{"type":"timestamp"},"SuspendedCause":{}}}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DescribeMultiRegionAccessPointOperation":{"http":{"method":"GET","requestUri":"/v20180820/async-requests/mrap/{request_token+}"},"input":{"type":"structure","required":["AccountId","RequestTokenARN"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"RequestTokenARN":{"location":"uri","locationName":"request_token"}}},"output":{"type":"structure","members":{"AsyncOperation":{"type":"structure","members":{"CreationTime":{"type":"timestamp"},"Operation":{},"RequestTokenARN":{},"RequestParameters":{"type":"structure","members":{"CreateMultiRegionAccessPointRequest":{"shape":"S2x"},"DeleteMultiRegionAccessPointRequest":{"shape":"S3e"},"PutMultiRegionAccessPointPolicyRequest":{"shape":"S49"}}},"RequestStatus":{},"ResponseDetails":{"type":"structure","members":{"MultiRegionAccessPointDetails":{"type":"structure","members":{"Regions":{"type":"list","member":{"locationName":"Region","type":"structure","members":{"Name":{},"RequestStatus":{}}}}}},"ErrorDetails":{"type":"structure","members":{"Code":{},"Message":{},"Resource":{},"RequestId":{}}}}}}}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"GetAccessPoint":{"http":{"method":"GET","requestUri":"/v20180820/accesspoint/{name}"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Name":{},"Bucket":{},"NetworkOrigin":{},"VpcConfiguration":{"shape":"S5"},"PublicAccessBlockConfiguration":{"shape":"S7"},"CreationDate":{"type":"timestamp"},"Alias":{},"AccessPointArn":{},"Endpoints":{"type":"map","key":{},"value":{}}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetAccessPointConfigurationForObjectLambda":{"http":{"method":"GET","requestUri":"/v20180820/accesspointforobjectlambda/{name}/configuration"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Configuration":{"shape":"Se"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetAccessPointForObjectLambda":{"http":{"method":"GET","requestUri":"/v20180820/accesspointforobjectlambda/{name}"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Name":{},"PublicAccessBlockConfiguration":{"shape":"S7"},"CreationDate":{"type":"timestamp"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetAccessPointPolicy":{"http":{"method":"GET","requestUri":"/v20180820/accesspoint/{name}/policy"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Policy":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetAccessPointPolicyForObjectLambda":{"http":{"method":"GET","requestUri":"/v20180820/accesspointforobjectlambda/{name}/policy"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Policy":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetAccessPointPolicyStatus":{"http":{"method":"GET","requestUri":"/v20180820/accesspoint/{name}/policyStatus"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"PolicyStatus":{"shape":"S4y"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetAccessPointPolicyStatusForObjectLambda":{"http":{"method":"GET","requestUri":"/v20180820/accesspointforobjectlambda/{name}/policyStatus"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"PolicyStatus":{"shape":"S4y"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetBucket":{"http":{"method":"GET","requestUri":"/v20180820/bucket/{name}"},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Bucket":{},"PublicAccessBlockEnabled":{"type":"boolean"},"CreationDate":{"type":"timestamp"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetBucketLifecycleConfiguration":{"http":{"method":"GET","requestUri":"/v20180820/bucket/{name}/lifecycleconfiguration"},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Rules":{"shape":"S57"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetBucketPolicy":{"http":{"method":"GET","requestUri":"/v20180820/bucket/{name}/policy"},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Policy":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetBucketTagging":{"http":{"method":"GET","requestUri":"/v20180820/bucket/{name}/tagging"},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","required":["TagSet"],"members":{"TagSet":{"shape":"S1r"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetJobTagging":{"http":{"method":"GET","requestUri":"/v20180820/jobs/{id}/tagging"},"input":{"type":"structure","required":["AccountId","JobId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"JobId":{"location":"uri","locationName":"id"}}},"output":{"type":"structure","members":{"Tags":{"shape":"S1r"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetMultiRegionAccessPoint":{"http":{"method":"GET","requestUri":"/v20180820/mrap/instances/{name}"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"AccessPoint":{"shape":"S5y"}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"GetMultiRegionAccessPointPolicy":{"http":{"method":"GET","requestUri":"/v20180820/mrap/instances/{name}/policy"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Policy":{"type":"structure","members":{"Established":{"type":"structure","members":{"Policy":{}}},"Proposed":{"type":"structure","members":{"Policy":{}}}}}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"GetMultiRegionAccessPointPolicyStatus":{"http":{"method":"GET","requestUri":"/v20180820/mrap/instances/{name}/policystatus"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Established":{"shape":"S4y"}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"GetPublicAccessBlock":{"http":{"method":"GET","requestUri":"/v20180820/configuration/publicAccessBlock"},"input":{"type":"structure","required":["AccountId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"}}},"output":{"type":"structure","members":{"PublicAccessBlockConfiguration":{"shape":"S7"}},"payload":"PublicAccessBlockConfiguration"},"endpoint":{"hostPrefix":"{AccountId}."}},"GetStorageLensConfiguration":{"http":{"method":"GET","requestUri":"/v20180820/storagelens/{storagelensid}"},"input":{"type":"structure","required":["ConfigId","AccountId"],"members":{"ConfigId":{"location":"uri","locationName":"storagelensid"},"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"}}},"output":{"type":"structure","members":{"StorageLensConfiguration":{"shape":"S6f"}},"payload":"StorageLensConfiguration"},"endpoint":{"hostPrefix":"{AccountId}."}},"GetStorageLensConfigurationTagging":{"http":{"method":"GET","requestUri":"/v20180820/storagelens/{storagelensid}/tagging"},"input":{"type":"structure","required":["ConfigId","AccountId"],"members":{"ConfigId":{"location":"uri","locationName":"storagelensid"},"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"}}},"output":{"type":"structure","members":{"Tags":{"shape":"S78"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"ListAccessPoints":{"http":{"method":"GET","requestUri":"/v20180820/accesspoint"},"input":{"type":"structure","required":["AccountId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"querystring","locationName":"bucket"},"NextToken":{"location":"querystring","locationName":"nextToken"},"MaxResults":{"location":"querystring","locationName":"maxResults","type":"integer"}}},"output":{"type":"structure","members":{"AccessPointList":{"type":"list","member":{"locationName":"AccessPoint","type":"structure","required":["Name","NetworkOrigin","Bucket"],"members":{"Name":{},"NetworkOrigin":{},"VpcConfiguration":{"shape":"S5"},"Bucket":{},"AccessPointArn":{},"Alias":{}}}},"NextToken":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"ListAccessPointsForObjectLambda":{"http":{"method":"GET","requestUri":"/v20180820/accesspointforobjectlambda"},"input":{"type":"structure","required":["AccountId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"NextToken":{"location":"querystring","locationName":"nextToken"},"MaxResults":{"location":"querystring","locationName":"maxResults","type":"integer"}}},"output":{"type":"structure","members":{"ObjectLambdaAccessPointList":{"type":"list","member":{"locationName":"ObjectLambdaAccessPoint","type":"structure","required":["Name"],"members":{"Name":{},"ObjectLambdaAccessPointArn":{}}}},"NextToken":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"ListJobs":{"http":{"method":"GET","requestUri":"/v20180820/jobs"},"input":{"type":"structure","required":["AccountId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"JobStatuses":{"location":"querystring","locationName":"jobStatuses","type":"list","member":{}},"NextToken":{"location":"querystring","locationName":"nextToken"},"MaxResults":{"location":"querystring","locationName":"maxResults","type":"integer"}}},"output":{"type":"structure","members":{"NextToken":{},"Jobs":{"type":"list","member":{"type":"structure","members":{"JobId":{},"Description":{},"Operation":{},"Priority":{"type":"integer"},"Status":{},"CreationTime":{"type":"timestamp"},"TerminationDate":{"type":"timestamp"},"ProgressSummary":{"shape":"S3q"}}}}}},"endpoint":{"hostPrefix":"{AccountId}."}},"ListMultiRegionAccessPoints":{"http":{"method":"GET","requestUri":"/v20180820/mrap/instances"},"input":{"type":"structure","required":["AccountId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"NextToken":{"location":"querystring","locationName":"nextToken"},"MaxResults":{"location":"querystring","locationName":"maxResults","type":"integer"}}},"output":{"type":"structure","members":{"AccessPoints":{"type":"list","member":{"shape":"S5y","locationName":"AccessPoint"}},"NextToken":{}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"ListRegionalBuckets":{"http":{"method":"GET","requestUri":"/v20180820/bucket"},"input":{"type":"structure","required":["AccountId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"NextToken":{"location":"querystring","locationName":"nextToken"},"MaxResults":{"location":"querystring","locationName":"maxResults","type":"integer"},"OutpostId":{"location":"header","locationName":"x-amz-outpost-id"}}},"output":{"type":"structure","members":{"RegionalBucketList":{"type":"list","member":{"locationName":"RegionalBucket","type":"structure","required":["Bucket","PublicAccessBlockEnabled","CreationDate"],"members":{"Bucket":{},"BucketArn":{},"PublicAccessBlockEnabled":{"type":"boolean"},"CreationDate":{"type":"timestamp"},"OutpostId":{}}}},"NextToken":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"ListStorageLensConfigurations":{"http":{"method":"GET","requestUri":"/v20180820/storagelens"},"input":{"type":"structure","required":["AccountId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"NextToken":{"location":"querystring","locationName":"nextToken"}}},"output":{"type":"structure","members":{"NextToken":{},"StorageLensConfigurationList":{"type":"list","member":{"locationName":"StorageLensConfiguration","type":"structure","required":["Id","StorageLensArn","HomeRegion"],"members":{"Id":{},"StorageLensArn":{},"HomeRegion":{},"IsEnabled":{"type":"boolean"}}},"flattened":true}}},"endpoint":{"hostPrefix":"{AccountId}."}},"PutAccessPointConfigurationForObjectLambda":{"http":{"method":"PUT","requestUri":"/v20180820/accesspointforobjectlambda/{name}/configuration"},"input":{"locationName":"PutAccessPointConfigurationForObjectLambdaRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","Name","Configuration"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"},"Configuration":{"shape":"Se"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"PutAccessPointPolicy":{"http":{"method":"PUT","requestUri":"/v20180820/accesspoint/{name}/policy"},"input":{"locationName":"PutAccessPointPolicyRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","Name","Policy"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"},"Policy":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"PutAccessPointPolicyForObjectLambda":{"http":{"method":"PUT","requestUri":"/v20180820/accesspointforobjectlambda/{name}/policy"},"input":{"locationName":"PutAccessPointPolicyForObjectLambdaRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","Name","Policy"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"},"Policy":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"PutBucketLifecycleConfiguration":{"http":{"method":"PUT","requestUri":"/v20180820/bucket/{name}/lifecycleconfiguration"},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"},"LifecycleConfiguration":{"locationName":"LifecycleConfiguration","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","members":{"Rules":{"shape":"S57"}}}},"payload":"LifecycleConfiguration"},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"PutBucketPolicy":{"http":{"method":"PUT","requestUri":"/v20180820/bucket/{name}/policy"},"input":{"locationName":"PutBucketPolicyRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","Bucket","Policy"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"},"ConfirmRemoveSelfBucketAccess":{"location":"header","locationName":"x-amz-confirm-remove-self-bucket-access","type":"boolean"},"Policy":{}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"PutBucketTagging":{"http":{"method":"PUT","requestUri":"/v20180820/bucket/{name}/tagging"},"input":{"type":"structure","required":["AccountId","Bucket","Tagging"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"},"Tagging":{"locationName":"Tagging","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["TagSet"],"members":{"TagSet":{"shape":"S1r"}}}},"payload":"Tagging"},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"PutJobTagging":{"http":{"method":"PUT","requestUri":"/v20180820/jobs/{id}/tagging"},"input":{"locationName":"PutJobTaggingRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","JobId","Tags"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"JobId":{"location":"uri","locationName":"id"},"Tags":{"shape":"S1r"}}},"output":{"type":"structure","members":{}},"endpoint":{"hostPrefix":"{AccountId}."}},"PutMultiRegionAccessPointPolicy":{"http":{"requestUri":"/v20180820/async-requests/mrap/put-policy"},"input":{"locationName":"PutMultiRegionAccessPointPolicyRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","ClientToken","Details"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"ClientToken":{"idempotencyToken":true},"Details":{"shape":"S49"}}},"output":{"type":"structure","members":{"RequestTokenARN":{}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"PutPublicAccessBlock":{"http":{"method":"PUT","requestUri":"/v20180820/configuration/publicAccessBlock"},"input":{"type":"structure","required":["PublicAccessBlockConfiguration","AccountId"],"members":{"PublicAccessBlockConfiguration":{"shape":"S7","locationName":"PublicAccessBlockConfiguration","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"}},"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"}},"payload":"PublicAccessBlockConfiguration"},"endpoint":{"hostPrefix":"{AccountId}."}},"PutStorageLensConfiguration":{"http":{"method":"PUT","requestUri":"/v20180820/storagelens/{storagelensid}"},"input":{"locationName":"PutStorageLensConfigurationRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["ConfigId","AccountId","StorageLensConfiguration"],"members":{"ConfigId":{"location":"uri","locationName":"storagelensid"},"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"StorageLensConfiguration":{"shape":"S6f"},"Tags":{"shape":"S78"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"PutStorageLensConfigurationTagging":{"http":{"method":"PUT","requestUri":"/v20180820/storagelens/{storagelensid}/tagging"},"input":{"locationName":"PutStorageLensConfigurationTaggingRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["ConfigId","AccountId","Tags"],"members":{"ConfigId":{"location":"uri","locationName":"storagelensid"},"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Tags":{"shape":"S78"}}},"output":{"type":"structure","members":{}},"endpoint":{"hostPrefix":"{AccountId}."}},"UpdateJobPriority":{"http":{"requestUri":"/v20180820/jobs/{id}/priority"},"input":{"type":"structure","required":["AccountId","JobId","Priority"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"JobId":{"location":"uri","locationName":"id"},"Priority":{"location":"querystring","locationName":"priority","type":"integer"}}},"output":{"type":"structure","required":["JobId","Priority"],"members":{"JobId":{},"Priority":{"type":"integer"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"UpdateJobStatus":{"http":{"requestUri":"/v20180820/jobs/{id}/status"},"input":{"type":"structure","required":["AccountId","JobId","RequestedJobStatus"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"JobId":{"location":"uri","locationName":"id"},"RequestedJobStatus":{"location":"querystring","locationName":"requestedJobStatus"},"StatusUpdateReason":{"location":"querystring","locationName":"statusUpdateReason"}}},"output":{"type":"structure","members":{"JobId":{},"Status":{},"StatusUpdateReason":{}}},"endpoint":{"hostPrefix":"{AccountId}."}}},"shapes":{"S5":{"type":"structure","required":["VpcId"],"members":{"VpcId":{}}},"S7":{"type":"structure","members":{"BlockPublicAcls":{"locationName":"BlockPublicAcls","type":"boolean"},"IgnorePublicAcls":{"locationName":"IgnorePublicAcls","type":"boolean"},"BlockPublicPolicy":{"locationName":"BlockPublicPolicy","type":"boolean"},"RestrictPublicBuckets":{"locationName":"RestrictPublicBuckets","type":"boolean"}}},"Se":{"type":"structure","required":["SupportingAccessPoint","TransformationConfigurations"],"members":{"SupportingAccessPoint":{},"CloudWatchMetricsEnabled":{"type":"boolean"},"AllowedFeatures":{"type":"list","member":{"locationName":"AllowedFeature"}},"TransformationConfigurations":{"type":"list","member":{"locationName":"TransformationConfiguration","type":"structure","required":["Actions","ContentTransformation"],"members":{"Actions":{"type":"list","member":{"locationName":"Action"}},"ContentTransformation":{"type":"structure","members":{"AwsLambda":{"type":"structure","required":["FunctionArn"],"members":{"FunctionArn":{},"FunctionPayload":{}}}},"union":true}}}}}},"S19":{"type":"structure","members":{"LambdaInvoke":{"type":"structure","members":{"FunctionArn":{}}},"S3PutObjectCopy":{"type":"structure","members":{"TargetResource":{},"CannedAccessControlList":{},"AccessControlGrants":{"shape":"S1e"},"MetadataDirective":{},"ModifiedSinceConstraint":{"type":"timestamp"},"NewObjectMetadata":{"type":"structure","members":{"CacheControl":{},"ContentDisposition":{},"ContentEncoding":{},"ContentLanguage":{},"UserMetadata":{"type":"map","key":{},"value":{}},"ContentLength":{"type":"long"},"ContentMD5":{},"ContentType":{},"HttpExpiresDate":{"type":"timestamp"},"RequesterCharged":{"type":"boolean"},"SSEAlgorithm":{}}},"NewObjectTagging":{"shape":"S1r"},"RedirectLocation":{},"RequesterPays":{"type":"boolean"},"StorageClass":{},"UnModifiedSinceConstraint":{"type":"timestamp"},"SSEAwsKmsKeyId":{},"TargetKeyPrefix":{},"ObjectLockLegalHoldStatus":{},"ObjectLockMode":{},"ObjectLockRetainUntilDate":{"type":"timestamp"},"BucketKeyEnabled":{"type":"boolean"}}},"S3PutObjectAcl":{"type":"structure","members":{"AccessControlPolicy":{"type":"structure","members":{"AccessControlList":{"type":"structure","required":["Owner"],"members":{"Owner":{"type":"structure","members":{"ID":{},"DisplayName":{}}},"Grants":{"shape":"S1e"}}},"CannedAccessControlList":{}}}}},"S3PutObjectTagging":{"type":"structure","members":{"TagSet":{"shape":"S1r"}}},"S3DeleteObjectTagging":{"type":"structure","members":{}},"S3InitiateRestoreObject":{"type":"structure","members":{"ExpirationInDays":{"type":"integer"},"GlacierJobTier":{}}},"S3PutObjectLegalHold":{"type":"structure","required":["LegalHold"],"members":{"LegalHold":{"type":"structure","required":["Status"],"members":{"Status":{}}}}},"S3PutObjectRetention":{"type":"structure","required":["Retention"],"members":{"BypassGovernanceRetention":{"type":"boolean"},"Retention":{"type":"structure","members":{"RetainUntilDate":{"type":"timestamp"},"Mode":{}}}}}}},"S1e":{"type":"list","member":{"type":"structure","members":{"Grantee":{"type":"structure","members":{"TypeIdentifier":{},"Identifier":{},"DisplayName":{}}},"Permission":{}}}},"S1r":{"type":"list","member":{"shape":"S1s"}},"S1s":{"type":"structure","required":["Key","Value"],"members":{"Key":{},"Value":{}}},"S2e":{"type":"structure","required":["Enabled"],"members":{"Bucket":{},"Format":{},"Enabled":{"type":"boolean"},"Prefix":{},"ReportScope":{}}},"S2i":{"type":"structure","required":["Spec","Location"],"members":{"Spec":{"type":"structure","required":["Format"],"members":{"Format":{},"Fields":{"type":"list","member":{}}}},"Location":{"type":"structure","required":["ObjectArn","ETag"],"members":{"ObjectArn":{},"ObjectVersionId":{},"ETag":{}}}}},"S2x":{"type":"structure","required":["Name","Regions"],"members":{"Name":{},"PublicAccessBlock":{"shape":"S7"},"Regions":{"type":"list","member":{"locationName":"Region","type":"structure","required":["Bucket"],"members":{"Bucket":{}}}}}},"S3e":{"type":"structure","required":["Name"],"members":{"Name":{}}},"S3q":{"type":"structure","members":{"TotalNumberOfTasks":{"type":"long"},"NumberOfTasksSucceeded":{"type":"long"},"NumberOfTasksFailed":{"type":"long"}}},"S49":{"type":"structure","required":["Name","Policy"],"members":{"Name":{},"Policy":{}}},"S4y":{"type":"structure","members":{"IsPublic":{"locationName":"IsPublic","type":"boolean"}}},"S57":{"type":"list","member":{"locationName":"Rule","type":"structure","required":["Status"],"members":{"Expiration":{"type":"structure","members":{"Date":{"type":"timestamp"},"Days":{"type":"integer"},"ExpiredObjectDeleteMarker":{"type":"boolean"}}},"ID":{},"Filter":{"type":"structure","members":{"Prefix":{},"Tag":{"shape":"S1s"},"And":{"type":"structure","members":{"Prefix":{},"Tags":{"shape":"S1r"}}}}},"Status":{},"Transitions":{"type":"list","member":{"locationName":"Transition","type":"structure","members":{"Date":{"type":"timestamp"},"Days":{"type":"integer"},"StorageClass":{}}}},"NoncurrentVersionTransitions":{"type":"list","member":{"locationName":"NoncurrentVersionTransition","type":"structure","members":{"NoncurrentDays":{"type":"integer"},"StorageClass":{}}}},"NoncurrentVersionExpiration":{"type":"structure","members":{"NoncurrentDays":{"type":"integer"}}},"AbortIncompleteMultipartUpload":{"type":"structure","members":{"DaysAfterInitiation":{"type":"integer"}}}}}},"S5y":{"type":"structure","members":{"Name":{},"Alias":{},"CreatedAt":{"type":"timestamp"},"PublicAccessBlock":{"shape":"S7"},"Status":{},"Regions":{"type":"list","member":{"locationName":"Region","type":"structure","members":{"Bucket":{},"Region":{}}}}}},"S6f":{"type":"structure","required":["Id","AccountLevel","IsEnabled"],"members":{"Id":{},"AccountLevel":{"type":"structure","required":["BucketLevel"],"members":{"ActivityMetrics":{"shape":"S6h"},"BucketLevel":{"type":"structure","members":{"ActivityMetrics":{"shape":"S6h"},"PrefixLevel":{"type":"structure","required":["StorageMetrics"],"members":{"StorageMetrics":{"type":"structure","members":{"IsEnabled":{"type":"boolean"},"SelectionCriteria":{"type":"structure","members":{"Delimiter":{},"MaxDepth":{"type":"integer"},"MinStorageBytesPercentage":{"type":"double"}}}}}}}}}}},"Include":{"type":"structure","members":{"Buckets":{"shape":"S6r"},"Regions":{"shape":"S6s"}}},"Exclude":{"type":"structure","members":{"Buckets":{"shape":"S6r"},"Regions":{"shape":"S6s"}}},"DataExport":{"type":"structure","required":["S3BucketDestination"],"members":{"S3BucketDestination":{"type":"structure","required":["Format","OutputSchemaVersion","AccountId","Arn"],"members":{"Format":{},"OutputSchemaVersion":{},"AccountId":{},"Arn":{},"Prefix":{},"Encryption":{"type":"structure","members":{"SSES3":{"locationName":"SSE-S3","type":"structure","members":{}},"SSEKMS":{"locationName":"SSE-KMS","type":"structure","required":["KeyId"],"members":{"KeyId":{}}}}}}}}},"IsEnabled":{"type":"boolean"},"AwsOrg":{"type":"structure","required":["Arn"],"members":{"Arn":{}}},"StorageLensArn":{}}},"S6h":{"type":"structure","members":{"IsEnabled":{"type":"boolean"}}},"S6r":{"type":"list","member":{"locationName":"Arn"}},"S6s":{"type":"list","member":{"locationName":"Region"}},"S78":{"type":"list","member":{"locationName":"Tag","type":"structure","required":["Key","Value"],"members":{"Key":{},"Value":{}}}}}}; /***/ }), @@ -30999,6 +31697,90 @@ Object.defineProperty(apiLoader.services['opsworkscm'], '2016-11-01', { module.exports = AWS.OpsWorksCM; +/***/ }), + +/***/ 6742: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.OidcClient = void 0; +const http_client_1 = __webpack_require__(6539); +const auth_1 = __webpack_require__(3226); +const core_1 = __webpack_require__(6470); +class OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN']; + if (!token) { + throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable'); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL']; + if (!runtimeUrl) { + throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable'); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter(this, void 0, void 0, function* () { + const httpclient = OidcClient.createHttpClient(); + const res = yield httpclient + .getJson(id_token_url) + .catch(error => { + throw new Error(`Failed to get ID Token. \n + Error Code : ${error.statusCode}\n + Error Message: ${error.result.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error('Response json body do not have ID Token field'); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter(this, void 0, void 0, function* () { + try { + // New ID Token is requested from action service + let id_token_url = OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + core_1.debug(`ID token url is ${id_token_url}`); + const id_token = yield OidcClient.getCall(id_token_url); + core_1.setSecret(id_token); + return id_token; + } + catch (error) { + throw new Error(`Error message: ${error.message}`); + } + }); + } +} +exports.OidcClient = OidcClient; +//# sourceMappingURL=oidc-utils.js.map + /***/ }), /***/ 6745: @@ -33564,6 +34346,14 @@ Object.defineProperty(apiLoader.services['chime'], '2018-05-01', { module.exports = AWS.Chime; +/***/ }), + +/***/ 7413: +/***/ (function(module, __unusedexports, __webpack_require__) { + +module.exports = __webpack_require__(8141); + + /***/ }), /***/ 7414: @@ -35225,6 +36015,278 @@ CancelToken.source = function source() { module.exports = CancelToken; +/***/ }), + +/***/ 8141: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + + +var net = __webpack_require__(1631); +var tls = __webpack_require__(4016); +var http = __webpack_require__(8605); +var https = __webpack_require__(7211); +var events = __webpack_require__(8614); +var assert = __webpack_require__(2357); +var util = __webpack_require__(1669); + + +exports.httpOverHttp = httpOverHttp; +exports.httpsOverHttp = httpsOverHttp; +exports.httpOverHttps = httpOverHttps; +exports.httpsOverHttps = httpsOverHttps; + + +function httpOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + return agent; +} + +function httpsOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; +} + +function httpOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + return agent; +} + +function httpsOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; +} + + +function TunnelingAgent(options) { + var self = this; + self.options = options || {}; + self.proxyOptions = self.options.proxy || {}; + self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; + self.requests = []; + self.sockets = []; + + self.on('free', function onFree(socket, host, port, localAddress) { + var options = toOptions(host, port, localAddress); + for (var i = 0, len = self.requests.length; i < len; ++i) { + var pending = self.requests[i]; + if (pending.host === options.host && pending.port === options.port) { + // Detect the request to connect same origin server, + // reuse the connection. + self.requests.splice(i, 1); + pending.request.onSocket(socket); + return; + } + } + socket.destroy(); + self.removeSocket(socket); + }); +} +util.inherits(TunnelingAgent, events.EventEmitter); + +TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { + var self = this; + var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress)); + + if (self.sockets.length >= this.maxSockets) { + // We are over limit so we'll add it to the queue. + self.requests.push(options); + return; + } + + // If we are under maxSockets create a new one. + self.createSocket(options, function(socket) { + socket.on('free', onFree); + socket.on('close', onCloseOrRemove); + socket.on('agentRemove', onCloseOrRemove); + req.onSocket(socket); + + function onFree() { + self.emit('free', socket, options); + } + + function onCloseOrRemove(err) { + self.removeSocket(socket); + socket.removeListener('free', onFree); + socket.removeListener('close', onCloseOrRemove); + socket.removeListener('agentRemove', onCloseOrRemove); + } + }); +}; + +TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { + var self = this; + var placeholder = {}; + self.sockets.push(placeholder); + + var connectOptions = mergeOptions({}, self.proxyOptions, { + method: 'CONNECT', + path: options.host + ':' + options.port, + agent: false, + headers: { + host: options.host + ':' + options.port + } + }); + if (options.localAddress) { + connectOptions.localAddress = options.localAddress; + } + if (connectOptions.proxyAuth) { + connectOptions.headers = connectOptions.headers || {}; + connectOptions.headers['Proxy-Authorization'] = 'Basic ' + + new Buffer(connectOptions.proxyAuth).toString('base64'); + } + + debug('making CONNECT request'); + var connectReq = self.request(connectOptions); + connectReq.useChunkedEncodingByDefault = false; // for v0.6 + connectReq.once('response', onResponse); // for v0.6 + connectReq.once('upgrade', onUpgrade); // for v0.6 + connectReq.once('connect', onConnect); // for v0.7 or later + connectReq.once('error', onError); + connectReq.end(); + + function onResponse(res) { + // Very hacky. This is necessary to avoid http-parser leaks. + res.upgrade = true; + } + + function onUpgrade(res, socket, head) { + // Hacky. + process.nextTick(function() { + onConnect(res, socket, head); + }); + } + + function onConnect(res, socket, head) { + connectReq.removeAllListeners(); + socket.removeAllListeners(); + + if (res.statusCode !== 200) { + debug('tunneling socket could not be established, statusCode=%d', + res.statusCode); + socket.destroy(); + var error = new Error('tunneling socket could not be established, ' + + 'statusCode=' + res.statusCode); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + return; + } + if (head.length > 0) { + debug('got illegal response body from proxy'); + socket.destroy(); + var error = new Error('got illegal response body from proxy'); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + return; + } + debug('tunneling connection has established'); + self.sockets[self.sockets.indexOf(placeholder)] = socket; + return cb(socket); + } + + function onError(cause) { + connectReq.removeAllListeners(); + + debug('tunneling socket could not be established, cause=%s\n', + cause.message, cause.stack); + var error = new Error('tunneling socket could not be established, ' + + 'cause=' + cause.message); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + } +}; + +TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { + var pos = this.sockets.indexOf(socket) + if (pos === -1) { + return; + } + this.sockets.splice(pos, 1); + + var pending = this.requests.shift(); + if (pending) { + // If we have pending requests and a socket gets closed a new one + // needs to be created to take over in the pool for the one that closed. + this.createSocket(pending, function(socket) { + pending.request.onSocket(socket); + }); + } +}; + +function createSecureSocket(options, cb) { + var self = this; + TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { + var hostHeader = options.request.getHeader('host'); + var tlsOptions = mergeOptions({}, self.options, { + socket: socket, + servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host + }); + + // 0 is dummy port for v0.6 + var secureSocket = tls.connect(0, tlsOptions); + self.sockets[self.sockets.indexOf(socket)] = secureSocket; + cb(secureSocket); + }); +} + + +function toOptions(host, port, localAddress) { + if (typeof host === 'string') { // since v0.10 + return { + host: host, + port: port, + localAddress: localAddress + }; + } + return host; // for v0.11 or later +} + +function mergeOptions(target) { + for (var i = 1, len = arguments.length; i < len; ++i) { + var overrides = arguments[i]; + if (typeof overrides === 'object') { + var keys = Object.keys(overrides); + for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { + var k = keys[j]; + if (overrides[k] !== undefined) { + target[k] = overrides[k]; + } + } + } + } + return target; +} + + +var debug; +if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { + debug = function() { + var args = Array.prototype.slice.call(arguments); + if (typeof args[0] === 'string') { + args[0] = 'TUNNEL: ' + args[0]; + } else { + args.unshift('TUNNEL:'); + } + console.error.apply(console, args); + } +} else { + debug = function() {}; +} +exports.debug = debug; // for test + + /***/ }), /***/ 8173: