File Explorer

/proc/self/root/var/runtime/node_modules/@aws-sdk/client-cloudhsm/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.js15.9 KB · 448 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 CloudHSMServiceException = require('./models/CloudHSMServiceException'); const resolveClientEndpointParameters = (options) => {    return Object.assign(options, {        useDualstackEndpoint: options.useDualstackEndpoint ?? false,        useFipsEndpoint: options.useFipsEndpoint ?? false,        defaultSigningName: "cloudhsm",    });};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 CloudHSMClient 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.defaultCloudHSMHttpAuthSchemeParametersProvider,            identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({                "aws.auth#sigv4": config.credentials,            }),        }));        this.middlewareStack.use(core.getHttpSigningPlugin(this.config));    }    destroy() {        super.destroy();    }} class AddTagsToResourceCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CloudHsmFrontendService", "AddTagsToResource", {})    .n("CloudHSMClient", "AddTagsToResourceCommand")    .sc(schemas_0.AddTagsToResource$)    .build() {} class CreateHapgCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CloudHsmFrontendService", "CreateHapg", {})    .n("CloudHSMClient", "CreateHapgCommand")    .sc(schemas_0.CreateHapg$)    .build() {} class CreateHsmCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CloudHsmFrontendService", "CreateHsm", {})    .n("CloudHSMClient", "CreateHsmCommand")    .sc(schemas_0.CreateHsm$)    .build() {} class CreateLunaClientCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CloudHsmFrontendService", "CreateLunaClient", {})    .n("CloudHSMClient", "CreateLunaClientCommand")    .sc(schemas_0.CreateLunaClient$)    .build() {} class DeleteHapgCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CloudHsmFrontendService", "DeleteHapg", {})    .n("CloudHSMClient", "DeleteHapgCommand")    .sc(schemas_0.DeleteHapg$)    .build() {} class DeleteHsmCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CloudHsmFrontendService", "DeleteHsm", {})    .n("CloudHSMClient", "DeleteHsmCommand")    .sc(schemas_0.DeleteHsm$)    .build() {} class DeleteLunaClientCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CloudHsmFrontendService", "DeleteLunaClient", {})    .n("CloudHSMClient", "DeleteLunaClientCommand")    .sc(schemas_0.DeleteLunaClient$)    .build() {} class DescribeHapgCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CloudHsmFrontendService", "DescribeHapg", {})    .n("CloudHSMClient", "DescribeHapgCommand")    .sc(schemas_0.DescribeHapg$)    .build() {} class DescribeHsmCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CloudHsmFrontendService", "DescribeHsm", {})    .n("CloudHSMClient", "DescribeHsmCommand")    .sc(schemas_0.DescribeHsm$)    .build() {} class DescribeLunaClientCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CloudHsmFrontendService", "DescribeLunaClient", {})    .n("CloudHSMClient", "DescribeLunaClientCommand")    .sc(schemas_0.DescribeLunaClient$)    .build() {} class GetConfigCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CloudHsmFrontendService", "GetConfig", {})    .n("CloudHSMClient", "GetConfigCommand")    .sc(schemas_0.GetConfig$)    .build() {} class ListAvailableZonesCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CloudHsmFrontendService", "ListAvailableZones", {})    .n("CloudHSMClient", "ListAvailableZonesCommand")    .sc(schemas_0.ListAvailableZones$)    .build() {} class ListHapgsCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CloudHsmFrontendService", "ListHapgs", {})    .n("CloudHSMClient", "ListHapgsCommand")    .sc(schemas_0.ListHapgs$)    .build() {} class ListHsmsCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CloudHsmFrontendService", "ListHsms", {})    .n("CloudHSMClient", "ListHsmsCommand")    .sc(schemas_0.ListHsms$)    .build() {} class ListLunaClientsCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CloudHsmFrontendService", "ListLunaClients", {})    .n("CloudHSMClient", "ListLunaClientsCommand")    .sc(schemas_0.ListLunaClients$)    .build() {} class ListTagsForResourceCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CloudHsmFrontendService", "ListTagsForResource", {})    .n("CloudHSMClient", "ListTagsForResourceCommand")    .sc(schemas_0.ListTagsForResource$)    .build() {} class ModifyHapgCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CloudHsmFrontendService", "ModifyHapg", {})    .n("CloudHSMClient", "ModifyHapgCommand")    .sc(schemas_0.ModifyHapg$)    .build() {} class ModifyHsmCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CloudHsmFrontendService", "ModifyHsm", {})    .n("CloudHSMClient", "ModifyHsmCommand")    .sc(schemas_0.ModifyHsm$)    .build() {} class ModifyLunaClientCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CloudHsmFrontendService", "ModifyLunaClient", {})    .n("CloudHSMClient", "ModifyLunaClientCommand")    .sc(schemas_0.ModifyLunaClient$)    .build() {} class RemoveTagsFromResourceCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CloudHsmFrontendService", "RemoveTagsFromResource", {})    .n("CloudHSMClient", "RemoveTagsFromResourceCommand")    .sc(schemas_0.RemoveTagsFromResource$)    .build() {} const commands = {    AddTagsToResourceCommand,    CreateHapgCommand,    CreateHsmCommand,    CreateLunaClientCommand,    DeleteHapgCommand,    DeleteHsmCommand,    DeleteLunaClientCommand,    DescribeHapgCommand,    DescribeHsmCommand,    DescribeLunaClientCommand,    GetConfigCommand,    ListAvailableZonesCommand,    ListHapgsCommand,    ListHsmsCommand,    ListLunaClientsCommand,    ListTagsForResourceCommand,    ModifyHapgCommand,    ModifyHsmCommand,    ModifyLunaClientCommand,    RemoveTagsFromResourceCommand,};class CloudHSM extends CloudHSMClient {}client.createAggregatedClient(commands, CloudHSM); const ClientVersion = {    FIVE_ONE: "5.1",    FIVE_THREE: "5.3",};const SubscriptionType = {    PRODUCTION: "PRODUCTION",};const CloudHsmObjectState = {    DEGRADED: "DEGRADED",    READY: "READY",    UPDATING: "UPDATING",};const HsmStatus = {    DEGRADED: "DEGRADED",    PENDING: "PENDING",    RUNNING: "RUNNING",    SUSPENDED: "SUSPENDED",    TERMINATED: "TERMINATED",    TERMINATING: "TERMINATING",    UPDATING: "UPDATING",}; exports.$Command = client.Command;exports.__Client = client.Client;exports.CloudHSMServiceException = CloudHSMServiceException.CloudHSMServiceException;exports.AddTagsToResourceCommand = AddTagsToResourceCommand;exports.ClientVersion = ClientVersion;exports.CloudHSM = CloudHSM;exports.CloudHSMClient = CloudHSMClient;exports.CloudHsmObjectState = CloudHsmObjectState;exports.CreateHapgCommand = CreateHapgCommand;exports.CreateHsmCommand = CreateHsmCommand;exports.CreateLunaClientCommand = CreateLunaClientCommand;exports.DeleteHapgCommand = DeleteHapgCommand;exports.DeleteHsmCommand = DeleteHsmCommand;exports.DeleteLunaClientCommand = DeleteLunaClientCommand;exports.DescribeHapgCommand = DescribeHapgCommand;exports.DescribeHsmCommand = DescribeHsmCommand;exports.DescribeLunaClientCommand = DescribeLunaClientCommand;exports.GetConfigCommand = GetConfigCommand;exports.HsmStatus = HsmStatus;exports.ListAvailableZonesCommand = ListAvailableZonesCommand;exports.ListHapgsCommand = ListHapgsCommand;exports.ListHsmsCommand = ListHsmsCommand;exports.ListLunaClientsCommand = ListLunaClientsCommand;exports.ListTagsForResourceCommand = ListTagsForResourceCommand;exports.ModifyHapgCommand = ModifyHapgCommand;exports.ModifyHsmCommand = ModifyHsmCommand;exports.ModifyLunaClientCommand = ModifyLunaClientCommand;exports.RemoveTagsFromResourceCommand = RemoveTagsFromResourceCommand;exports.SubscriptionType = SubscriptionType;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];});