File Explorer

/proc/self/root/proc/self/root/var/runtime/node_modules/@aws-sdk/client-pcs/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.js18.2 KB · 514 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 PCSServiceException = require('./models/PCSServiceException'); const resolveClientEndpointParameters = (options) => {    return Object.assign(options, {        useDualstackEndpoint: options.useDualstackEndpoint ?? false,        useFipsEndpoint: options.useFipsEndpoint ?? false,        defaultSigningName: "pcs",    });};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 PCSClient 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.defaultPCSHttpAuthSchemeParametersProvider,            identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({                "aws.auth#sigv4": config.credentials,            }),        }));        this.middlewareStack.use(core.getHttpSigningPlugin(this.config));    }    destroy() {        super.destroy();    }} class CreateClusterCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("AWSParallelComputingService", "CreateCluster", {})    .n("PCSClient", "CreateClusterCommand")    .sc(schemas_0.CreateCluster$)    .build() {} class CreateComputeNodeGroupCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("AWSParallelComputingService", "CreateComputeNodeGroup", {})    .n("PCSClient", "CreateComputeNodeGroupCommand")    .sc(schemas_0.CreateComputeNodeGroup$)    .build() {} class CreateQueueCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("AWSParallelComputingService", "CreateQueue", {})    .n("PCSClient", "CreateQueueCommand")    .sc(schemas_0.CreateQueue$)    .build() {} class DeleteClusterCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("AWSParallelComputingService", "DeleteCluster", {})    .n("PCSClient", "DeleteClusterCommand")    .sc(schemas_0.DeleteCluster$)    .build() {} class DeleteComputeNodeGroupCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("AWSParallelComputingService", "DeleteComputeNodeGroup", {})    .n("PCSClient", "DeleteComputeNodeGroupCommand")    .sc(schemas_0.DeleteComputeNodeGroup$)    .build() {} class DeleteQueueCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("AWSParallelComputingService", "DeleteQueue", {})    .n("PCSClient", "DeleteQueueCommand")    .sc(schemas_0.DeleteQueue$)    .build() {} class GetClusterCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("AWSParallelComputingService", "GetCluster", {})    .n("PCSClient", "GetClusterCommand")    .sc(schemas_0.GetCluster$)    .build() {} class GetComputeNodeGroupCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("AWSParallelComputingService", "GetComputeNodeGroup", {})    .n("PCSClient", "GetComputeNodeGroupCommand")    .sc(schemas_0.GetComputeNodeGroup$)    .build() {} class GetQueueCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("AWSParallelComputingService", "GetQueue", {})    .n("PCSClient", "GetQueueCommand")    .sc(schemas_0.GetQueue$)    .build() {} class ListClustersCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("AWSParallelComputingService", "ListClusters", {})    .n("PCSClient", "ListClustersCommand")    .sc(schemas_0.ListClusters$)    .build() {} class ListComputeNodeGroupsCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("AWSParallelComputingService", "ListComputeNodeGroups", {})    .n("PCSClient", "ListComputeNodeGroupsCommand")    .sc(schemas_0.ListComputeNodeGroups$)    .build() {} class ListQueuesCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("AWSParallelComputingService", "ListQueues", {})    .n("PCSClient", "ListQueuesCommand")    .sc(schemas_0.ListQueues$)    .build() {} class ListTagsForResourceCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("AWSParallelComputingService", "ListTagsForResource", {})    .n("PCSClient", "ListTagsForResourceCommand")    .sc(schemas_0.ListTagsForResource$)    .build() {} class RegisterComputeNodeGroupInstanceCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("AWSParallelComputingService", "RegisterComputeNodeGroupInstance", {})    .n("PCSClient", "RegisterComputeNodeGroupInstanceCommand")    .sc(schemas_0.RegisterComputeNodeGroupInstance$)    .build() {} class TagResourceCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("AWSParallelComputingService", "TagResource", {})    .n("PCSClient", "TagResourceCommand")    .sc(schemas_0.TagResource$)    .build() {} class UntagResourceCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("AWSParallelComputingService", "UntagResource", {})    .n("PCSClient", "UntagResourceCommand")    .sc(schemas_0.UntagResource$)    .build() {} class UpdateClusterCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("AWSParallelComputingService", "UpdateCluster", {})    .n("PCSClient", "UpdateClusterCommand")    .sc(schemas_0.UpdateCluster$)    .build() {} class UpdateComputeNodeGroupCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("AWSParallelComputingService", "UpdateComputeNodeGroup", {})    .n("PCSClient", "UpdateComputeNodeGroupCommand")    .sc(schemas_0.UpdateComputeNodeGroup$)    .build() {} class UpdateQueueCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("AWSParallelComputingService", "UpdateQueue", {})    .n("PCSClient", "UpdateQueueCommand")    .sc(schemas_0.UpdateQueue$)    .build() {} const paginateListClusters = core.createPaginator(PCSClient, ListClustersCommand, "nextToken", "nextToken", "maxResults"); const paginateListComputeNodeGroups = core.createPaginator(PCSClient, ListComputeNodeGroupsCommand, "nextToken", "nextToken", "maxResults"); const paginateListQueues = core.createPaginator(PCSClient, ListQueuesCommand, "nextToken", "nextToken", "maxResults"); const commands = {    CreateClusterCommand,    CreateComputeNodeGroupCommand,    CreateQueueCommand,    DeleteClusterCommand,    DeleteComputeNodeGroupCommand,    DeleteQueueCommand,    GetClusterCommand,    GetComputeNodeGroupCommand,    GetQueueCommand,    ListClustersCommand,    ListComputeNodeGroupsCommand,    ListQueuesCommand,    ListTagsForResourceCommand,    RegisterComputeNodeGroupInstanceCommand,    TagResourceCommand,    UntagResourceCommand,    UpdateClusterCommand,    UpdateComputeNodeGroupCommand,    UpdateQueueCommand,};const paginators = {    paginateListClusters,    paginateListComputeNodeGroups,    paginateListQueues,};class PCS extends PCSClient {}client.createAggregatedClient(commands, PCS, { paginators }); const AccountingMode = {    NONE: "NONE",    STANDARD: "STANDARD",};const PurchaseOption = {    CAPACITY_BLOCK: "CAPACITY_BLOCK",    INTERRUPTIBLE_CAPACITY_RESERVATION: "INTERRUPTIBLE_CAPACITY_RESERVATION",    ONDEMAND: "ONDEMAND",    SPOT: "SPOT",};const SpotAllocationStrategy = {    CAPACITY_OPTIMIZED: "capacity-optimized",    LOWEST_PRICE: "lowest-price",    PRICE_CAPACITY_OPTIMIZED: "price-capacity-optimized",};const ComputeNodeGroupStatus = {    ACTIVE: "ACTIVE",    CREATE_FAILED: "CREATE_FAILED",    CREATING: "CREATING",    DELETED: "DELETED",    DELETE_FAILED: "DELETE_FAILED",    DELETING: "DELETING",    RESUMING: "RESUMING",    SUSPENDED: "SUSPENDED",    SUSPENDING: "SUSPENDING",    UPDATE_FAILED: "UPDATE_FAILED",    UPDATING: "UPDATING",};const ValidationExceptionReason = {    CANNOT_PARSE: "cannotParse",    FIELD_VALIDATION_FAILED: "fieldValidationFailed",    OTHER: "other",    UNKNOWN_OPERATION: "unknownOperation",};const NetworkType = {    IPV4: "IPV4",    IPV6: "IPV6",};const SchedulerType = {    SLURM: "SLURM",};const Size = {    LARGE: "LARGE",    MEDIUM: "MEDIUM",    SMALL: "SMALL",};const SlurmRestMode = {    NONE: "NONE",    STANDARD: "STANDARD",};const EndpointType = {    SLURMCTLD: "SLURMCTLD",    SLURMDBD: "SLURMDBD",    SLURMRESTD: "SLURMRESTD",};const ClusterStatus = {    ACTIVE: "ACTIVE",    CREATE_FAILED: "CREATE_FAILED",    CREATING: "CREATING",    DELETE_FAILED: "DELETE_FAILED",    DELETING: "DELETING",    RESUMING: "RESUMING",    SUSPENDED: "SUSPENDED",    SUSPENDING: "SUSPENDING",    UPDATE_FAILED: "UPDATE_FAILED",    UPDATING: "UPDATING",};const QueueStatus = {    ACTIVE: "ACTIVE",    CREATE_FAILED: "CREATE_FAILED",    CREATING: "CREATING",    DELETE_FAILED: "DELETE_FAILED",    DELETING: "DELETING",    RESUMING: "RESUMING",    SUSPENDED: "SUSPENDED",    SUSPENDING: "SUSPENDING",    UPDATE_FAILED: "UPDATE_FAILED",    UPDATING: "UPDATING",}; exports.$Command = client.Command;exports.__Client = client.Client;exports.PCSServiceException = PCSServiceException.PCSServiceException;exports.AccountingMode = AccountingMode;exports.ClusterStatus = ClusterStatus;exports.ComputeNodeGroupStatus = ComputeNodeGroupStatus;exports.CreateClusterCommand = CreateClusterCommand;exports.CreateComputeNodeGroupCommand = CreateComputeNodeGroupCommand;exports.CreateQueueCommand = CreateQueueCommand;exports.DeleteClusterCommand = DeleteClusterCommand;exports.DeleteComputeNodeGroupCommand = DeleteComputeNodeGroupCommand;exports.DeleteQueueCommand = DeleteQueueCommand;exports.EndpointType = EndpointType;exports.GetClusterCommand = GetClusterCommand;exports.GetComputeNodeGroupCommand = GetComputeNodeGroupCommand;exports.GetQueueCommand = GetQueueCommand;exports.ListClustersCommand = ListClustersCommand;exports.ListComputeNodeGroupsCommand = ListComputeNodeGroupsCommand;exports.ListQueuesCommand = ListQueuesCommand;exports.ListTagsForResourceCommand = ListTagsForResourceCommand;exports.NetworkType = NetworkType;exports.PCS = PCS;exports.PCSClient = PCSClient;exports.PurchaseOption = PurchaseOption;exports.QueueStatus = QueueStatus;exports.RegisterComputeNodeGroupInstanceCommand = RegisterComputeNodeGroupInstanceCommand;exports.SchedulerType = SchedulerType;exports.Size = Size;exports.SlurmRestMode = SlurmRestMode;exports.SpotAllocationStrategy = SpotAllocationStrategy;exports.TagResourceCommand = TagResourceCommand;exports.UntagResourceCommand = UntagResourceCommand;exports.UpdateClusterCommand = UpdateClusterCommand;exports.UpdateComputeNodeGroupCommand = UpdateComputeNodeGroupCommand;exports.UpdateQueueCommand = UpdateQueueCommand;exports.ValidationExceptionReason = ValidationExceptionReason;exports.paginateListClusters = paginateListClusters;exports.paginateListComputeNodeGroups = paginateListComputeNodeGroups;exports.paginateListQueues = paginateListQueues;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];});