File Explorer

/proc/self/root/proc/self/root/var/runtime/node_modules/@aws-sdk/client-ebs/dist-cjs

This explorer reads the filesystem of the server it runs on, so /workspace/user isn't present here. Browsing and the terminal still work against this server's own disk from /.

index.js11.6 KB · 297 lines
'use strict'; var client$1 = require('@aws-sdk/core/client');var core = require('@smithy/core');var client = require('@smithy/core/client');var config = require('@smithy/core/config');var endpoints = require('@smithy/core/endpoints');var protocols = require('@smithy/core/protocols');var retry = require('@smithy/core/retry');var schema = require('@smithy/core/schema');var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');var runtimeConfig = require('./runtimeConfig');var schemas_0 = require('./schemas/schemas_0');var errors = require('./models/errors');var EBSServiceException = require('./models/EBSServiceException'); const resolveClientEndpointParameters = (options) => {    return Object.assign(options, {        useDualstackEndpoint: options.useDualstackEndpoint ?? false,        useFipsEndpoint: options.useFipsEndpoint ?? false,        defaultSigningName: "ebs",    });};const commonParams = {    UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },    Endpoint: { type: "builtInParams", name: "endpoint" },    Region: { type: "builtInParams", name: "region" },    UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },}; const getHttpAuthExtensionConfiguration = (runtimeConfig) => {    const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;    let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;    let _credentials = runtimeConfig.credentials;    return {        setHttpAuthScheme(httpAuthScheme) {            const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);            if (index === -1) {                _httpAuthSchemes.push(httpAuthScheme);            }            else {                _httpAuthSchemes.splice(index, 1, httpAuthScheme);            }        },        httpAuthSchemes() {            return _httpAuthSchemes;        },        setHttpAuthSchemeProvider(httpAuthSchemeProvider) {            _httpAuthSchemeProvider = httpAuthSchemeProvider;        },        httpAuthSchemeProvider() {            return _httpAuthSchemeProvider;        },        setCredentials(credentials) {            _credentials = credentials;        },        credentials() {            return _credentials;        },    };};const resolveHttpAuthRuntimeConfig = (config) => {    return {        httpAuthSchemes: config.httpAuthSchemes(),        httpAuthSchemeProvider: config.httpAuthSchemeProvider(),        credentials: config.credentials(),    };}; const resolveRuntimeExtensions = (runtimeConfig, extensions) => {    const extensionConfiguration = Object.assign(client$1.getAwsRegionExtensionConfiguration(runtimeConfig), client.getDefaultExtensionConfiguration(runtimeConfig), protocols.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));    extensions.forEach((extension) => extension.configure(extensionConfiguration));    return Object.assign(runtimeConfig, client$1.resolveAwsRegionExtensionConfiguration(extensionConfiguration), client.resolveDefaultRuntimeConfig(extensionConfiguration), protocols.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));}; class EBSClient extends client.Client {    config;    constructor(...[configuration]) {        const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});        super(_config_0);        this.initConfig = _config_0;        const _config_1 = resolveClientEndpointParameters(_config_0);        const _config_2 = client$1.resolveUserAgentConfig(_config_1);        const _config_3 = retry.resolveRetryConfig(_config_2);        const _config_4 = config.resolveRegionConfig(_config_3);        const _config_5 = client$1.resolveHostHeaderConfig(_config_4);        const _config_6 = endpoints.resolveEndpointConfig(_config_5);        const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);        const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);        this.config = _config_8;        this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));        this.middlewareStack.use(client$1.getUserAgentPlugin(this.config));        this.middlewareStack.use(retry.getRetryPlugin(this.config));        this.middlewareStack.use(protocols.getContentLengthPlugin(this.config));        this.middlewareStack.use(client$1.getHostHeaderPlugin(this.config));        this.middlewareStack.use(client$1.getLoggerPlugin(this.config));        this.middlewareStack.use(client$1.getRecursionDetectionPlugin(this.config));        this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {            httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultEBSHttpAuthSchemeParametersProvider,            identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({                "aws.auth#sigv4": config.credentials,            }),        }));        this.middlewareStack.use(core.getHttpSigningPlugin(this.config));    }    destroy() {        super.destroy();    }} class CompleteSnapshotCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("Ebs", "CompleteSnapshot", {})    .n("EBSClient", "CompleteSnapshotCommand")    .sc(schemas_0.CompleteSnapshot$)    .build() {} class GetSnapshotBlockCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("Ebs", "GetSnapshotBlock", {})    .n("EBSClient", "GetSnapshotBlockCommand")    .sc(schemas_0.GetSnapshotBlock$)    .build() {} class ListChangedBlocksCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("Ebs", "ListChangedBlocks", {})    .n("EBSClient", "ListChangedBlocksCommand")    .sc(schemas_0.ListChangedBlocks$)    .build() {} class ListSnapshotBlocksCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("Ebs", "ListSnapshotBlocks", {})    .n("EBSClient", "ListSnapshotBlocksCommand")    .sc(schemas_0.ListSnapshotBlocks$)    .build() {} class PutSnapshotBlockCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("Ebs", "PutSnapshotBlock", {})    .n("EBSClient", "PutSnapshotBlockCommand")    .sc(schemas_0.PutSnapshotBlock$)    .build() {} class StartSnapshotCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("Ebs", "StartSnapshot", {})    .n("EBSClient", "StartSnapshotCommand")    .sc(schemas_0.StartSnapshot$)    .build() {} const paginateListChangedBlocks = core.createPaginator(EBSClient, ListChangedBlocksCommand, "NextToken", "NextToken", "MaxResults"); const paginateListSnapshotBlocks = core.createPaginator(EBSClient, ListSnapshotBlocksCommand, "NextToken", "NextToken", "MaxResults"); const commands = {    CompleteSnapshotCommand,    GetSnapshotBlockCommand,    ListChangedBlocksCommand,    ListSnapshotBlocksCommand,    PutSnapshotBlockCommand,    StartSnapshotCommand,};const paginators = {    paginateListChangedBlocks,    paginateListSnapshotBlocks,};class EBS extends EBSClient {}client.createAggregatedClient(commands, EBS, { paginators }); const AccessDeniedExceptionReason = {    DEPENDENCY_ACCESS_DENIED: "DEPENDENCY_ACCESS_DENIED",    UNAUTHORIZED_ACCOUNT: "UNAUTHORIZED_ACCOUNT",};const ChecksumAggregationMethod = {    CHECKSUM_AGGREGATION_LINEAR: "LINEAR",};const ChecksumAlgorithm = {    CHECKSUM_ALGORITHM_SHA256: "SHA256",};const Status = {    COMPLETED: "completed",    ERROR: "error",    PENDING: "pending",};const RequestThrottledExceptionReason = {    ACCOUNT_THROTTLED: "ACCOUNT_THROTTLED",    DEPENDENCY_REQUEST_THROTTLED: "DEPENDENCY_REQUEST_THROTTLED",    RESOURCE_LEVEL_THROTTLE: "RESOURCE_LEVEL_THROTTLE",};const ResourceNotFoundExceptionReason = {    DEPENDENCY_RESOURCE_NOT_FOUND: "DEPENDENCY_RESOURCE_NOT_FOUND",    GRANT_NOT_FOUND: "GRANT_NOT_FOUND",    IMAGE_NOT_FOUND: "IMAGE_NOT_FOUND",    SNAPSHOT_NOT_FOUND: "SNAPSHOT_NOT_FOUND",};const ServiceQuotaExceededExceptionReason = {    DEPENDENCY_SERVICE_QUOTA_EXCEEDED: "DEPENDENCY_SERVICE_QUOTA_EXCEEDED",};const ValidationExceptionReason = {    CONFLICTING_BLOCK_UPDATE: "CONFLICTING_BLOCK_UPDATE",    INVALID_BLOCK: "INVALID_BLOCK",    INVALID_BLOCK_TOKEN: "INVALID_BLOCK_TOKEN",    INVALID_CONTENT_ENCODING: "INVALID_CONTENT_ENCODING",    INVALID_CUSTOMER_KEY: "INVALID_CUSTOMER_KEY",    INVALID_DEPENDENCY_REQUEST: "INVALID_DEPENDENCY_REQUEST",    INVALID_GRANT_TOKEN: "INVALID_GRANT_TOKEN",    INVALID_IMAGE_ID: "INVALID_IMAGE_ID",    INVALID_PAGE_TOKEN: "INVALID_PAGE_TOKEN",    INVALID_PARAMETER_VALUE: "INVALID_PARAMETER_VALUE",    INVALID_SNAPSHOT_ID: "INVALID_SNAPSHOT_ID",    INVALID_TAG: "INVALID_TAG",    INVALID_VOLUME_SIZE: "INVALID_VOLUME_SIZE",    UNRELATED_SNAPSHOTS: "UNRELATED_SNAPSHOTS",    WRITE_REQUEST_TIMEOUT: "WRITE_REQUEST_TIMEOUT",};const SSEType = {    NONE: "none",    SSE_EBS: "sse-ebs",    SSE_KMS: "sse-kms",}; exports.$Command = client.Command;exports.__Client = client.Client;exports.EBSServiceException = EBSServiceException.EBSServiceException;exports.AccessDeniedExceptionReason = AccessDeniedExceptionReason;exports.ChecksumAggregationMethod = ChecksumAggregationMethod;exports.ChecksumAlgorithm = ChecksumAlgorithm;exports.CompleteSnapshotCommand = CompleteSnapshotCommand;exports.EBS = EBS;exports.EBSClient = EBSClient;exports.GetSnapshotBlockCommand = GetSnapshotBlockCommand;exports.ListChangedBlocksCommand = ListChangedBlocksCommand;exports.ListSnapshotBlocksCommand = ListSnapshotBlocksCommand;exports.PutSnapshotBlockCommand = PutSnapshotBlockCommand;exports.RequestThrottledExceptionReason = RequestThrottledExceptionReason;exports.ResourceNotFoundExceptionReason = ResourceNotFoundExceptionReason;exports.SSEType = SSEType;exports.ServiceQuotaExceededExceptionReason = ServiceQuotaExceededExceptionReason;exports.StartSnapshotCommand = StartSnapshotCommand;exports.Status = Status;exports.ValidationExceptionReason = ValidationExceptionReason;exports.paginateListChangedBlocks = paginateListChangedBlocks;exports.paginateListSnapshotBlocks = paginateListSnapshotBlocks;Object.prototype.hasOwnProperty.call(schemas_0, '__proto__') &&    !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&    Object.defineProperty(exports, '__proto__', {        enumerable: true,        value: schemas_0['__proto__']    }); Object.keys(schemas_0).forEach(function (k) {    if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = schemas_0[k];});Object.prototype.hasOwnProperty.call(errors, '__proto__') &&    !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&    Object.defineProperty(exports, '__proto__', {        enumerable: true,        value: errors['__proto__']    }); Object.keys(errors).forEach(function (k) {    if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = errors[k];});