File Explorer

/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 /.

2 dirs
3 files
index.js40.1 KB · 1035 lines
"use strict";var __defProp = Object.defineProperty;var __getOwnPropDesc = Object.getOwnPropertyDescriptor;var __getOwnPropNames = Object.getOwnPropertyNames;var __hasOwnProp = Object.prototype.hasOwnProperty;var __name = (target, value) => __defProp(target, "name", { value, configurable: true });var __export = (target, all) => {  for (var name in all)    __defProp(target, name, { get: all[name], enumerable: true });};var __copyProps = (to, from, except, desc) => {  if (from && typeof from === "object" || typeof from === "function") {    for (let key of __getOwnPropNames(from))      if (!__hasOwnProp.call(to, key) && key !== except)        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });  }  return to;};var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.tsvar index_exports = {};__export(index_exports, {  AccessDeniedException: () => AccessDeniedException,  AccessDeniedExceptionReason: () => AccessDeniedExceptionReason,  ChangedBlockFilterSensitiveLog: () => ChangedBlockFilterSensitiveLog,  ChecksumAggregationMethod: () => ChecksumAggregationMethod,  ChecksumAlgorithm: () => ChecksumAlgorithm,  CompleteSnapshotCommand: () => CompleteSnapshotCommand,  ConcurrentLimitExceededException: () => ConcurrentLimitExceededException,  ConflictException: () => ConflictException,  EBS: () => EBS,  EBSClient: () => EBSClient,  EBSServiceException: () => EBSServiceException,  GetSnapshotBlockCommand: () => GetSnapshotBlockCommand,  GetSnapshotBlockResponseFilterSensitiveLog: () => GetSnapshotBlockResponseFilterSensitiveLog,  InternalServerException: () => InternalServerException,  ListChangedBlocksCommand: () => ListChangedBlocksCommand,  ListChangedBlocksResponseFilterSensitiveLog: () => ListChangedBlocksResponseFilterSensitiveLog,  ListSnapshotBlocksCommand: () => ListSnapshotBlocksCommand,  ListSnapshotBlocksResponseFilterSensitiveLog: () => ListSnapshotBlocksResponseFilterSensitiveLog,  PutSnapshotBlockCommand: () => PutSnapshotBlockCommand,  PutSnapshotBlockRequestFilterSensitiveLog: () => PutSnapshotBlockRequestFilterSensitiveLog,  RequestThrottledException: () => RequestThrottledException,  RequestThrottledExceptionReason: () => RequestThrottledExceptionReason,  ResourceNotFoundException: () => ResourceNotFoundException,  ResourceNotFoundExceptionReason: () => ResourceNotFoundExceptionReason,  SSEType: () => SSEType,  ServiceQuotaExceededException: () => ServiceQuotaExceededException,  ServiceQuotaExceededExceptionReason: () => ServiceQuotaExceededExceptionReason,  StartSnapshotCommand: () => StartSnapshotCommand,  StartSnapshotRequestFilterSensitiveLog: () => StartSnapshotRequestFilterSensitiveLog,  StartSnapshotResponseFilterSensitiveLog: () => StartSnapshotResponseFilterSensitiveLog,  Status: () => Status,  ValidationException: () => ValidationException,  ValidationExceptionReason: () => ValidationExceptionReason,  __Client: () => import_smithy_client.Client,  paginateListChangedBlocks: () => paginateListChangedBlocks,  paginateListSnapshotBlocks: () => paginateListSnapshotBlocks});module.exports = __toCommonJS(index_exports); // src/EBSClient.tsvar import_middleware_host_header = require("@aws-sdk/middleware-host-header");var import_middleware_logger = require("@aws-sdk/middleware-logger");var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");var import_config_resolver = require("@smithy/config-resolver");var import_core = require("@smithy/core");var import_middleware_content_length = require("@smithy/middleware-content-length");var import_middleware_endpoint = require("@smithy/middleware-endpoint");var import_middleware_retry = require("@smithy/middleware-retry"); var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider"); // src/endpoint/EndpointParameters.tsvar resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {  return Object.assign(options, {    useDualstackEndpoint: options.useDualstackEndpoint ?? false,    useFipsEndpoint: options.useFipsEndpoint ?? false,    defaultSigningName: "ebs"  });}, "resolveClientEndpointParameters");var commonParams = {  UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },  Endpoint: { type: "builtInParams", name: "endpoint" },  Region: { type: "builtInParams", name: "region" },  UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }}; // src/EBSClient.tsvar import_runtimeConfig = require("././runtimeConfig"); // src/runtimeExtensions.tsvar import_region_config_resolver = require("@aws-sdk/region-config-resolver");var import_protocol_http = require("@smithy/protocol-http");var import_smithy_client = require("@smithy/smithy-client"); // src/auth/httpAuthExtensionConfiguration.tsvar getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((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;    }  };}, "getHttpAuthExtensionConfiguration");var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {  return {    httpAuthSchemes: config.httpAuthSchemes(),    httpAuthSchemeProvider: config.httpAuthSchemeProvider(),    credentials: config.credentials()  };}, "resolveHttpAuthRuntimeConfig"); // src/runtimeExtensions.tsvar resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {  const extensionConfiguration = Object.assign(    (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),    (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),    (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),    getHttpAuthExtensionConfiguration(runtimeConfig)  );  extensions.forEach((extension) => extension.configure(extensionConfiguration));  return Object.assign(    runtimeConfig,    (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),    (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),    (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),    resolveHttpAuthRuntimeConfig(extensionConfiguration)  );}, "resolveRuntimeExtensions"); // src/EBSClient.tsvar EBSClient = class extends import_smithy_client.Client {  static {    __name(this, "EBSClient");  }  /**   * The resolved configuration of EBSClient class. This is resolved and normalized from the {@link EBSClientConfig | constructor configuration interface}.   */  config;  constructor(...[configuration]) {    const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});    super(_config_0);    this.initConfig = _config_0;    const _config_1 = resolveClientEndpointParameters(_config_0);    const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);    const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);    const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);    const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);    const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);    const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);    const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);    this.config = _config_8;    this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));    this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));    this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));    this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));    this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));    this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));    this.middlewareStack.use(      (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {        httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultEBSHttpAuthSchemeParametersProvider,        identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({          "aws.auth#sigv4": config.credentials        }), "identityProviderConfigProvider")      })    );    this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));  }  /**   * Destroy underlying resources, like sockets. It's usually not necessary to do this.   * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.   * Otherwise, sockets might stay open for quite a long time before the server terminates them.   */  destroy() {    super.destroy();  }}; // src/EBS.ts  // src/commands/CompleteSnapshotCommand.ts var import_middleware_serde = require("@smithy/middleware-serde");  // src/protocols/Aws_restJson1.tsvar import_core2 = require("@aws-sdk/core");  var import_uuid = require("uuid"); // src/models/EBSServiceException.ts var EBSServiceException = class _EBSServiceException extends import_smithy_client.ServiceException {  static {    __name(this, "EBSServiceException");  }  /**   * @internal   */  constructor(options) {    super(options);    Object.setPrototypeOf(this, _EBSServiceException.prototype);  }}; // src/models/models_0.ts var AccessDeniedExceptionReason = {  DEPENDENCY_ACCESS_DENIED: "DEPENDENCY_ACCESS_DENIED",  UNAUTHORIZED_ACCOUNT: "UNAUTHORIZED_ACCOUNT"};var AccessDeniedException = class _AccessDeniedException extends EBSServiceException {  static {    __name(this, "AccessDeniedException");  }  name = "AccessDeniedException";  $fault = "client";  Message;  /**   * <p>The reason for the exception.</p>   * @public   */  Reason;  /**   * @internal   */  constructor(opts) {    super({      name: "AccessDeniedException",      $fault: "client",      ...opts    });    Object.setPrototypeOf(this, _AccessDeniedException.prototype);    this.Message = opts.Message;    this.Reason = opts.Reason;  }};var ChecksumAggregationMethod = {  CHECKSUM_AGGREGATION_LINEAR: "LINEAR"};var ChecksumAlgorithm = {  CHECKSUM_ALGORITHM_SHA256: "SHA256"};var Status = {  COMPLETED: "completed",  ERROR: "error",  PENDING: "pending"};var InternalServerException = class _InternalServerException extends EBSServiceException {  static {    __name(this, "InternalServerException");  }  name = "InternalServerException";  $fault = "server";  Message;  /**   * @internal   */  constructor(opts) {    super({      name: "InternalServerException",      $fault: "server",      ...opts    });    Object.setPrototypeOf(this, _InternalServerException.prototype);    this.Message = opts.Message;  }};var RequestThrottledExceptionReason = {  ACCOUNT_THROTTLED: "ACCOUNT_THROTTLED",  DEPENDENCY_REQUEST_THROTTLED: "DEPENDENCY_REQUEST_THROTTLED",  RESOURCE_LEVEL_THROTTLE: "RESOURCE_LEVEL_THROTTLE"};var RequestThrottledException = class _RequestThrottledException extends EBSServiceException {  static {    __name(this, "RequestThrottledException");  }  name = "RequestThrottledException";  $fault = "client";  Message;  /**   * <p>The reason for the exception.</p>   * @public   */  Reason;  /**   * @internal   */  constructor(opts) {    super({      name: "RequestThrottledException",      $fault: "client",      ...opts    });    Object.setPrototypeOf(this, _RequestThrottledException.prototype);    this.Message = opts.Message;    this.Reason = opts.Reason;  }};var 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"};var ResourceNotFoundException = class _ResourceNotFoundException extends EBSServiceException {  static {    __name(this, "ResourceNotFoundException");  }  name = "ResourceNotFoundException";  $fault = "client";  Message;  /**   * <p>The reason for the exception.</p>   * @public   */  Reason;  /**   * @internal   */  constructor(opts) {    super({      name: "ResourceNotFoundException",      $fault: "client",      ...opts    });    Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);    this.Message = opts.Message;    this.Reason = opts.Reason;  }};var ServiceQuotaExceededExceptionReason = {  DEPENDENCY_SERVICE_QUOTA_EXCEEDED: "DEPENDENCY_SERVICE_QUOTA_EXCEEDED"};var ServiceQuotaExceededException = class _ServiceQuotaExceededException extends EBSServiceException {  static {    __name(this, "ServiceQuotaExceededException");  }  name = "ServiceQuotaExceededException";  $fault = "client";  Message;  /**   * <p>The reason for the exception.</p>   * @public   */  Reason;  /**   * @internal   */  constructor(opts) {    super({      name: "ServiceQuotaExceededException",      $fault: "client",      ...opts    });    Object.setPrototypeOf(this, _ServiceQuotaExceededException.prototype);    this.Message = opts.Message;    this.Reason = opts.Reason;  }};var 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"};var ValidationException = class _ValidationException extends EBSServiceException {  static {    __name(this, "ValidationException");  }  name = "ValidationException";  $fault = "client";  Message;  /**   * <p>The reason for the validation exception.</p>   * @public   */  Reason;  /**   * @internal   */  constructor(opts) {    super({      name: "ValidationException",      $fault: "client",      ...opts    });    Object.setPrototypeOf(this, _ValidationException.prototype);    this.Message = opts.Message;    this.Reason = opts.Reason;  }};var ConcurrentLimitExceededException = class _ConcurrentLimitExceededException extends EBSServiceException {  static {    __name(this, "ConcurrentLimitExceededException");  }  name = "ConcurrentLimitExceededException";  $fault = "client";  Message;  /**   * @internal   */  constructor(opts) {    super({      name: "ConcurrentLimitExceededException",      $fault: "client",      ...opts    });    Object.setPrototypeOf(this, _ConcurrentLimitExceededException.prototype);    this.Message = opts.Message;  }};var ConflictException = class _ConflictException extends EBSServiceException {  static {    __name(this, "ConflictException");  }  name = "ConflictException";  $fault = "client";  Message;  /**   * @internal   */  constructor(opts) {    super({      name: "ConflictException",      $fault: "client",      ...opts    });    Object.setPrototypeOf(this, _ConflictException.prototype);    this.Message = opts.Message;  }};var SSEType = {  NONE: "none",  SSE_EBS: "sse-ebs",  SSE_KMS: "sse-kms"};var ChangedBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({  ...obj}), "ChangedBlockFilterSensitiveLog");var GetSnapshotBlockResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({  ...obj,  ...obj.BlockData && { BlockData: import_smithy_client.SENSITIVE_STRING }}), "GetSnapshotBlockResponseFilterSensitiveLog");var ListChangedBlocksResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({  ...obj,  ...obj.ChangedBlocks && { ChangedBlocks: import_smithy_client.SENSITIVE_STRING }}), "ListChangedBlocksResponseFilterSensitiveLog");var ListSnapshotBlocksResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({  ...obj,  ...obj.Blocks && { Blocks: import_smithy_client.SENSITIVE_STRING }}), "ListSnapshotBlocksResponseFilterSensitiveLog");var PutSnapshotBlockRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({  ...obj,  ...obj.BlockData && { BlockData: import_smithy_client.SENSITIVE_STRING }}), "PutSnapshotBlockRequestFilterSensitiveLog");var StartSnapshotRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({  ...obj,  ...obj.KmsKeyArn && { KmsKeyArn: import_smithy_client.SENSITIVE_STRING }}), "StartSnapshotRequestFilterSensitiveLog");var StartSnapshotResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({  ...obj,  ...obj.KmsKeyArn && { KmsKeyArn: import_smithy_client.SENSITIVE_STRING }}), "StartSnapshotResponseFilterSensitiveLog"); // src/protocols/Aws_restJson1.tsvar se_CompleteSnapshotCommand = /* @__PURE__ */ __name(async (input, context) => {  const b = (0, import_core.requestBuilder)(input, context);  const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {    [_xac]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_CBC]), () => input[_CBC].toString()],    [_xac_]: input[_C],    [_xaca]: input[_CA],    [_xacam]: input[_CAM]  });  b.bp("/snapshots/completion/{SnapshotId}");  b.p("SnapshotId", () => input.SnapshotId, "{SnapshotId}", false);  let body;  b.m("POST").h(headers).b(body);  return b.build();}, "se_CompleteSnapshotCommand");var se_GetSnapshotBlockCommand = /* @__PURE__ */ __name(async (input, context) => {  const b = (0, import_core.requestBuilder)(input, context);  const headers = {};  b.bp("/snapshots/{SnapshotId}/blocks/{BlockIndex}");  b.p("SnapshotId", () => input.SnapshotId, "{SnapshotId}", false);  b.p("BlockIndex", () => input.BlockIndex.toString(), "{BlockIndex}", false);  const query = (0, import_smithy_client.map)({    [_bT]: [, (0, import_smithy_client.expectNonNull)(input[_BT], `BlockToken`)]  });  let body;  b.m("GET").h(headers).q(query).b(body);  return b.build();}, "se_GetSnapshotBlockCommand");var se_ListChangedBlocksCommand = /* @__PURE__ */ __name(async (input, context) => {  const b = (0, import_core.requestBuilder)(input, context);  const headers = {};  b.bp("/snapshots/{SecondSnapshotId}/changedblocks");  b.p("SecondSnapshotId", () => input.SecondSnapshotId, "{SecondSnapshotId}", false);  const query = (0, import_smithy_client.map)({    [_fSI]: [, input[_FSI]],    [_pT]: [, input[_NT]],    [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],    [_sBI]: [() => input.StartingBlockIndex !== void 0, () => input[_SBI].toString()]  });  let body;  b.m("GET").h(headers).q(query).b(body);  return b.build();}, "se_ListChangedBlocksCommand");var se_ListSnapshotBlocksCommand = /* @__PURE__ */ __name(async (input, context) => {  const b = (0, import_core.requestBuilder)(input, context);  const headers = {};  b.bp("/snapshots/{SnapshotId}/blocks");  b.p("SnapshotId", () => input.SnapshotId, "{SnapshotId}", false);  const query = (0, import_smithy_client.map)({    [_pT]: [, input[_NT]],    [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],    [_sBI]: [() => input.StartingBlockIndex !== void 0, () => input[_SBI].toString()]  });  let body;  b.m("GET").h(headers).q(query).b(body);  return b.build();}, "se_ListSnapshotBlocksCommand");var se_PutSnapshotBlockCommand = /* @__PURE__ */ __name(async (input, context) => {  const b = (0, import_core.requestBuilder)(input, context);  const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {    "x-amz-content-sha256": "UNSIGNED-PAYLOAD",    "content-type": "application/octet-stream",    [_xadl]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_DL]), () => input[_DL].toString()],    [_xap]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_P]), () => input[_P].toString()],    [_xac_]: input[_C],    [_xaca]: input[_CA]  });  b.bp("/snapshots/{SnapshotId}/blocks/{BlockIndex}");  b.p("SnapshotId", () => input.SnapshotId, "{SnapshotId}", false);  b.p("BlockIndex", () => input.BlockIndex.toString(), "{BlockIndex}", false);  let body;  if (input.BlockData !== void 0) {    body = input.BlockData;  }  b.m("PUT").h(headers).b(body);  return b.build();}, "se_PutSnapshotBlockCommand");var se_StartSnapshotCommand = /* @__PURE__ */ __name(async (input, context) => {  const b = (0, import_core.requestBuilder)(input, context);  const headers = {    "content-type": "application/json"  };  b.bp("/snapshots");  let body;  body = JSON.stringify(    (0, import_smithy_client.take)(input, {      ClientToken: [true, (_) => _ ?? (0, import_uuid.v4)()],      Description: [],      Encrypted: [],      KmsKeyArn: [],      ParentSnapshotId: [],      Tags: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "Tags"),      Timeout: [],      VolumeSize: []    })  );  b.m("POST").h(headers).b(body);  return b.build();}, "se_StartSnapshotCommand");var de_CompleteSnapshotCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode !== 202 && output.statusCode >= 300) {    return de_CommandError(output, context);  }  const contents = (0, import_smithy_client.map)({    $metadata: deserializeMetadata(output)  });  const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");  const doc = (0, import_smithy_client.take)(data, {    Status: import_smithy_client.expectString  });  Object.assign(contents, doc);  return contents;}, "de_CompleteSnapshotCommand");var de_GetSnapshotBlockCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode !== 200 && output.statusCode >= 300) {    return de_CommandError(output, context);  }  const contents = (0, import_smithy_client.map)({    $metadata: deserializeMetadata(output),    [_DL]: [() => void 0 !== output.headers[_xadl], () => (0, import_smithy_client.strictParseInt32)(output.headers[_xadl])],    [_C]: [, output.headers[_xac_]],    [_CA]: [, output.headers[_xaca]]  });  const data = output.body;  context.sdkStreamMixin(data);  contents.BlockData = data;  return contents;}, "de_GetSnapshotBlockCommand");var de_ListChangedBlocksCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode !== 200 && output.statusCode >= 300) {    return de_CommandError(output, context);  }  const contents = (0, import_smithy_client.map)({    $metadata: deserializeMetadata(output)  });  const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");  const doc = (0, import_smithy_client.take)(data, {    BlockSize: import_smithy_client.expectInt32,    ChangedBlocks: import_smithy_client._json,    ExpiryTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "ExpiryTime"),    NextToken: import_smithy_client.expectString,    VolumeSize: import_smithy_client.expectLong  });  Object.assign(contents, doc);  return contents;}, "de_ListChangedBlocksCommand");var de_ListSnapshotBlocksCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode !== 200 && output.statusCode >= 300) {    return de_CommandError(output, context);  }  const contents = (0, import_smithy_client.map)({    $metadata: deserializeMetadata(output)  });  const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");  const doc = (0, import_smithy_client.take)(data, {    BlockSize: import_smithy_client.expectInt32,    Blocks: import_smithy_client._json,    ExpiryTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "ExpiryTime"),    NextToken: import_smithy_client.expectString,    VolumeSize: import_smithy_client.expectLong  });  Object.assign(contents, doc);  return contents;}, "de_ListSnapshotBlocksCommand");var de_PutSnapshotBlockCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode !== 201 && output.statusCode >= 300) {    return de_CommandError(output, context);  }  const contents = (0, import_smithy_client.map)({    $metadata: deserializeMetadata(output),    [_C]: [, output.headers[_xac_]],    [_CA]: [, output.headers[_xaca]]  });  await (0, import_smithy_client.collectBody)(output.body, context);  return contents;}, "de_PutSnapshotBlockCommand");var de_StartSnapshotCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode !== 201 && output.statusCode >= 300) {    return de_CommandError(output, context);  }  const contents = (0, import_smithy_client.map)({    $metadata: deserializeMetadata(output)  });  const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");  const doc = (0, import_smithy_client.take)(data, {    BlockSize: import_smithy_client.expectInt32,    Description: import_smithy_client.expectString,    KmsKeyArn: import_smithy_client.expectString,    OwnerId: import_smithy_client.expectString,    ParentSnapshotId: import_smithy_client.expectString,    SnapshotId: import_smithy_client.expectString,    SseType: import_smithy_client.expectString,    StartTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "StartTime"),    Status: import_smithy_client.expectString,    Tags: import_smithy_client._json,    VolumeSize: import_smithy_client.expectLong  });  Object.assign(contents, doc);  return contents;}, "de_StartSnapshotCommand");var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {  const parsedOutput = {    ...output,    body: await (0, import_core2.parseJsonErrorBody)(output.body, context)  };  const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);  switch (errorCode) {    case "AccessDeniedException":    case "com.amazonaws.ebs#AccessDeniedException":      throw await de_AccessDeniedExceptionRes(parsedOutput, context);    case "InternalServerException":    case "com.amazonaws.ebs#InternalServerException":      throw await de_InternalServerExceptionRes(parsedOutput, context);    case "RequestThrottledException":    case "com.amazonaws.ebs#RequestThrottledException":      throw await de_RequestThrottledExceptionRes(parsedOutput, context);    case "ResourceNotFoundException":    case "com.amazonaws.ebs#ResourceNotFoundException":      throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);    case "ServiceQuotaExceededException":    case "com.amazonaws.ebs#ServiceQuotaExceededException":      throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);    case "ValidationException":    case "com.amazonaws.ebs#ValidationException":      throw await de_ValidationExceptionRes(parsedOutput, context);    case "ConcurrentLimitExceededException":    case "com.amazonaws.ebs#ConcurrentLimitExceededException":      throw await de_ConcurrentLimitExceededExceptionRes(parsedOutput, context);    case "ConflictException":    case "com.amazonaws.ebs#ConflictException":      throw await de_ConflictExceptionRes(parsedOutput, context);    default:      const parsedBody = parsedOutput.body;      return throwDefaultError({        output,        parsedBody,        errorCode      });  }}, "de_CommandError");var throwDefaultError = (0, import_smithy_client.withBaseException)(EBSServiceException);var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {  const contents = (0, import_smithy_client.map)({});  const data = parsedOutput.body;  const doc = (0, import_smithy_client.take)(data, {    Message: import_smithy_client.expectString,    Reason: import_smithy_client.expectString  });  Object.assign(contents, doc);  const exception = new AccessDeniedException({    $metadata: deserializeMetadata(parsedOutput),    ...contents  });  return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);}, "de_AccessDeniedExceptionRes");var de_ConcurrentLimitExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {  const contents = (0, import_smithy_client.map)({});  const data = parsedOutput.body;  const doc = (0, import_smithy_client.take)(data, {    Message: import_smithy_client.expectString  });  Object.assign(contents, doc);  const exception = new ConcurrentLimitExceededException({    $metadata: deserializeMetadata(parsedOutput),    ...contents  });  return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);}, "de_ConcurrentLimitExceededExceptionRes");var de_ConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {  const contents = (0, import_smithy_client.map)({});  const data = parsedOutput.body;  const doc = (0, import_smithy_client.take)(data, {    Message: import_smithy_client.expectString  });  Object.assign(contents, doc);  const exception = new ConflictException({    $metadata: deserializeMetadata(parsedOutput),    ...contents  });  return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);}, "de_ConflictExceptionRes");var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {  const contents = (0, import_smithy_client.map)({});  const data = parsedOutput.body;  const doc = (0, import_smithy_client.take)(data, {    Message: import_smithy_client.expectString  });  Object.assign(contents, doc);  const exception = new InternalServerException({    $metadata: deserializeMetadata(parsedOutput),    ...contents  });  return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);}, "de_InternalServerExceptionRes");var de_RequestThrottledExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {  const contents = (0, import_smithy_client.map)({});  const data = parsedOutput.body;  const doc = (0, import_smithy_client.take)(data, {    Message: import_smithy_client.expectString,    Reason: import_smithy_client.expectString  });  Object.assign(contents, doc);  const exception = new RequestThrottledException({    $metadata: deserializeMetadata(parsedOutput),    ...contents  });  return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);}, "de_RequestThrottledExceptionRes");var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {  const contents = (0, import_smithy_client.map)({});  const data = parsedOutput.body;  const doc = (0, import_smithy_client.take)(data, {    Message: import_smithy_client.expectString,    Reason: import_smithy_client.expectString  });  Object.assign(contents, doc);  const exception = new ResourceNotFoundException({    $metadata: deserializeMetadata(parsedOutput),    ...contents  });  return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);}, "de_ResourceNotFoundExceptionRes");var de_ServiceQuotaExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {  const contents = (0, import_smithy_client.map)({});  const data = parsedOutput.body;  const doc = (0, import_smithy_client.take)(data, {    Message: import_smithy_client.expectString,    Reason: import_smithy_client.expectString  });  Object.assign(contents, doc);  const exception = new ServiceQuotaExceededException({    $metadata: deserializeMetadata(parsedOutput),    ...contents  });  return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);}, "de_ServiceQuotaExceededExceptionRes");var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {  const contents = (0, import_smithy_client.map)({});  const data = parsedOutput.body;  const doc = (0, import_smithy_client.take)(data, {    Message: import_smithy_client.expectString,    Reason: import_smithy_client.expectString  });  Object.assign(contents, doc);  const exception = new ValidationException({    $metadata: deserializeMetadata(parsedOutput),    ...contents  });  return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);}, "de_ValidationExceptionRes");var deserializeMetadata = /* @__PURE__ */ __name((output) => ({  httpStatusCode: output.statusCode,  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],  extendedRequestId: output.headers["x-amz-id-2"],  cfId: output.headers["x-amz-cf-id"]}), "deserializeMetadata");var _BT = "BlockToken";var _C = "Checksum";var _CA = "ChecksumAlgorithm";var _CAM = "ChecksumAggregationMethod";var _CBC = "ChangedBlocksCount";var _DL = "DataLength";var _FSI = "FirstSnapshotId";var _MR = "MaxResults";var _NT = "NextToken";var _P = "Progress";var _SBI = "StartingBlockIndex";var _bT = "blockToken";var _fSI = "firstSnapshotId";var _mR = "maxResults";var _pT = "pageToken";var _sBI = "startingBlockIndex";var _xac = "x-amz-changedblockscount";var _xac_ = "x-amz-checksum";var _xaca = "x-amz-checksum-algorithm";var _xacam = "x-amz-checksum-aggregation-method";var _xadl = "x-amz-data-length";var _xap = "x-amz-progress"; // src/commands/CompleteSnapshotCommand.tsvar CompleteSnapshotCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {  return [    (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),    (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())  ];}).s("Ebs", "CompleteSnapshot", {}).n("EBSClient", "CompleteSnapshotCommand").f(void 0, void 0).ser(se_CompleteSnapshotCommand).de(de_CompleteSnapshotCommand).build() {  static {    __name(this, "CompleteSnapshotCommand");  }}; // src/commands/GetSnapshotBlockCommand.ts   var GetSnapshotBlockCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {  return [    (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),    (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())  ];}).s("Ebs", "GetSnapshotBlock", {}).n("EBSClient", "GetSnapshotBlockCommand").f(void 0, GetSnapshotBlockResponseFilterSensitiveLog).ser(se_GetSnapshotBlockCommand).de(de_GetSnapshotBlockCommand).build() {  static {    __name(this, "GetSnapshotBlockCommand");  }}; // src/commands/ListChangedBlocksCommand.ts   var ListChangedBlocksCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {  return [    (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),    (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())  ];}).s("Ebs", "ListChangedBlocks", {}).n("EBSClient", "ListChangedBlocksCommand").f(void 0, ListChangedBlocksResponseFilterSensitiveLog).ser(se_ListChangedBlocksCommand).de(de_ListChangedBlocksCommand).build() {  static {    __name(this, "ListChangedBlocksCommand");  }}; // src/commands/ListSnapshotBlocksCommand.ts   var ListSnapshotBlocksCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {  return [    (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),    (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())  ];}).s("Ebs", "ListSnapshotBlocks", {}).n("EBSClient", "ListSnapshotBlocksCommand").f(void 0, ListSnapshotBlocksResponseFilterSensitiveLog).ser(se_ListSnapshotBlocksCommand).de(de_ListSnapshotBlocksCommand).build() {  static {    __name(this, "ListSnapshotBlocksCommand");  }}; // src/commands/PutSnapshotBlockCommand.ts   var PutSnapshotBlockCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {  return [    (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),    (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())  ];}).s("Ebs", "PutSnapshotBlock", {}).n("EBSClient", "PutSnapshotBlockCommand").f(PutSnapshotBlockRequestFilterSensitiveLog, void 0).ser(se_PutSnapshotBlockCommand).de(de_PutSnapshotBlockCommand).build() {  static {    __name(this, "PutSnapshotBlockCommand");  }}; // src/commands/StartSnapshotCommand.ts   var StartSnapshotCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {  return [    (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),    (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())  ];}).s("Ebs", "StartSnapshot", {}).n("EBSClient", "StartSnapshotCommand").f(StartSnapshotRequestFilterSensitiveLog, StartSnapshotResponseFilterSensitiveLog).ser(se_StartSnapshotCommand).de(de_StartSnapshotCommand).build() {  static {    __name(this, "StartSnapshotCommand");  }}; // src/EBS.tsvar commands = {  CompleteSnapshotCommand,  GetSnapshotBlockCommand,  ListChangedBlocksCommand,  ListSnapshotBlocksCommand,  PutSnapshotBlockCommand,  StartSnapshotCommand};var EBS = class extends EBSClient {  static {    __name(this, "EBS");  }};(0, import_smithy_client.createAggregatedClient)(commands, EBS); // src/pagination/ListChangedBlocksPaginator.ts var paginateListChangedBlocks = (0, import_core.createPaginator)(EBSClient, ListChangedBlocksCommand, "NextToken", "NextToken", "MaxResults"); // src/pagination/ListSnapshotBlocksPaginator.ts var paginateListSnapshotBlocks = (0, import_core.createPaginator)(EBSClient, ListSnapshotBlocksCommand, "NextToken", "NextToken", "MaxResults");// Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = {  EBSServiceException,  __Client,  EBSClient,  EBS,  $Command,  CompleteSnapshotCommand,  GetSnapshotBlockCommand,  ListChangedBlocksCommand,  ListSnapshotBlocksCommand,  PutSnapshotBlockCommand,  StartSnapshotCommand,  paginateListChangedBlocks,  paginateListSnapshotBlocks,  AccessDeniedExceptionReason,  AccessDeniedException,  ChecksumAggregationMethod,  ChecksumAlgorithm,  Status,  InternalServerException,  RequestThrottledExceptionReason,  RequestThrottledException,  ResourceNotFoundExceptionReason,  ResourceNotFoundException,  ServiceQuotaExceededExceptionReason,  ServiceQuotaExceededException,  ValidationExceptionReason,  ValidationException,  ConcurrentLimitExceededException,  ConflictException,  SSEType,  ChangedBlockFilterSensitiveLog,  GetSnapshotBlockResponseFilterSensitiveLog,  ListChangedBlocksResponseFilterSensitiveLog,  ListSnapshotBlocksResponseFilterSensitiveLog,  PutSnapshotBlockRequestFilterSensitiveLog,  StartSnapshotRequestFilterSensitiveLog,  StartSnapshotResponseFilterSensitiveLog});