File Explorer

/proc/self/root/var/runtime/node_modules/@aws-sdk/client-kafkaconnect/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.5 KB · 488 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 KafkaConnectServiceException = require('./models/KafkaConnectServiceException'); const resolveClientEndpointParameters = (options) => {    return Object.assign(options, {        useDualstackEndpoint: options.useDualstackEndpoint ?? false,        useFipsEndpoint: options.useFipsEndpoint ?? false,        defaultSigningName: "kafkaconnect",    });};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 KafkaConnectClient 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.defaultKafkaConnectHttpAuthSchemeParametersProvider,            identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({                "aws.auth#sigv4": config.credentials,            }),        }));        this.middlewareStack.use(core.getHttpSigningPlugin(this.config));    }    destroy() {        super.destroy();    }} class CreateConnectorCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("KafkaConnect", "CreateConnector", {})    .n("KafkaConnectClient", "CreateConnectorCommand")    .sc(schemas_0.CreateConnector$)    .build() {} class CreateCustomPluginCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("KafkaConnect", "CreateCustomPlugin", {})    .n("KafkaConnectClient", "CreateCustomPluginCommand")    .sc(schemas_0.CreateCustomPlugin$)    .build() {} class CreateWorkerConfigurationCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("KafkaConnect", "CreateWorkerConfiguration", {})    .n("KafkaConnectClient", "CreateWorkerConfigurationCommand")    .sc(schemas_0.CreateWorkerConfiguration$)    .build() {} class DeleteConnectorCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("KafkaConnect", "DeleteConnector", {})    .n("KafkaConnectClient", "DeleteConnectorCommand")    .sc(schemas_0.DeleteConnector$)    .build() {} class DeleteCustomPluginCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("KafkaConnect", "DeleteCustomPlugin", {})    .n("KafkaConnectClient", "DeleteCustomPluginCommand")    .sc(schemas_0.DeleteCustomPlugin$)    .build() {} class DeleteWorkerConfigurationCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("KafkaConnect", "DeleteWorkerConfiguration", {})    .n("KafkaConnectClient", "DeleteWorkerConfigurationCommand")    .sc(schemas_0.DeleteWorkerConfiguration$)    .build() {} class DescribeConnectorCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("KafkaConnect", "DescribeConnector", {})    .n("KafkaConnectClient", "DescribeConnectorCommand")    .sc(schemas_0.DescribeConnector$)    .build() {} class DescribeConnectorOperationCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("KafkaConnect", "DescribeConnectorOperation", {})    .n("KafkaConnectClient", "DescribeConnectorOperationCommand")    .sc(schemas_0.DescribeConnectorOperation$)    .build() {} class DescribeCustomPluginCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("KafkaConnect", "DescribeCustomPlugin", {})    .n("KafkaConnectClient", "DescribeCustomPluginCommand")    .sc(schemas_0.DescribeCustomPlugin$)    .build() {} class DescribeWorkerConfigurationCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("KafkaConnect", "DescribeWorkerConfiguration", {})    .n("KafkaConnectClient", "DescribeWorkerConfigurationCommand")    .sc(schemas_0.DescribeWorkerConfiguration$)    .build() {} class ListConnectorOperationsCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("KafkaConnect", "ListConnectorOperations", {})    .n("KafkaConnectClient", "ListConnectorOperationsCommand")    .sc(schemas_0.ListConnectorOperations$)    .build() {} class ListConnectorsCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("KafkaConnect", "ListConnectors", {})    .n("KafkaConnectClient", "ListConnectorsCommand")    .sc(schemas_0.ListConnectors$)    .build() {} class ListCustomPluginsCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("KafkaConnect", "ListCustomPlugins", {})    .n("KafkaConnectClient", "ListCustomPluginsCommand")    .sc(schemas_0.ListCustomPlugins$)    .build() {} class ListTagsForResourceCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("KafkaConnect", "ListTagsForResource", {})    .n("KafkaConnectClient", "ListTagsForResourceCommand")    .sc(schemas_0.ListTagsForResource$)    .build() {} class ListWorkerConfigurationsCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("KafkaConnect", "ListWorkerConfigurations", {})    .n("KafkaConnectClient", "ListWorkerConfigurationsCommand")    .sc(schemas_0.ListWorkerConfigurations$)    .build() {} class TagResourceCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("KafkaConnect", "TagResource", {})    .n("KafkaConnectClient", "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("KafkaConnect", "UntagResource", {})    .n("KafkaConnectClient", "UntagResourceCommand")    .sc(schemas_0.UntagResource$)    .build() {} class UpdateConnectorCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("KafkaConnect", "UpdateConnector", {})    .n("KafkaConnectClient", "UpdateConnectorCommand")    .sc(schemas_0.UpdateConnector$)    .build() {} const paginateListConnectorOperations = core.createPaginator(KafkaConnectClient, ListConnectorOperationsCommand, "nextToken", "nextToken", "maxResults"); const paginateListConnectors = core.createPaginator(KafkaConnectClient, ListConnectorsCommand, "nextToken", "nextToken", "maxResults"); const paginateListCustomPlugins = core.createPaginator(KafkaConnectClient, ListCustomPluginsCommand, "nextToken", "nextToken", "maxResults"); const paginateListWorkerConfigurations = core.createPaginator(KafkaConnectClient, ListWorkerConfigurationsCommand, "nextToken", "nextToken", "maxResults"); const commands = {    CreateConnectorCommand,    CreateCustomPluginCommand,    CreateWorkerConfigurationCommand,    DeleteConnectorCommand,    DeleteCustomPluginCommand,    DeleteWorkerConfigurationCommand,    DescribeConnectorCommand,    DescribeConnectorOperationCommand,    DescribeCustomPluginCommand,    DescribeWorkerConfigurationCommand,    ListConnectorOperationsCommand,    ListConnectorsCommand,    ListCustomPluginsCommand,    ListTagsForResourceCommand,    ListWorkerConfigurationsCommand,    TagResourceCommand,    UntagResourceCommand,    UpdateConnectorCommand,};const paginators = {    paginateListConnectorOperations,    paginateListConnectors,    paginateListCustomPlugins,    paginateListWorkerConfigurations,};class KafkaConnect extends KafkaConnectClient {}client.createAggregatedClient(commands, KafkaConnect, { paginators }); const ConnectorOperationStepState = {    CANCELLED: "CANCELLED",    COMPLETED: "COMPLETED",    FAILED: "FAILED",    IN_PROGRESS: "IN_PROGRESS",    PENDING: "PENDING",};const ConnectorOperationStepType = {    FINALIZE_UPDATE: "FINALIZE_UPDATE",    INITIALIZE_UPDATE: "INITIALIZE_UPDATE",    UPDATE_CONNECTOR_CONFIGURATION: "UPDATE_CONNECTOR_CONFIGURATION",    UPDATE_WORKER_SETTING: "UPDATE_WORKER_SETTING",    VALIDATE_UPDATE: "VALIDATE_UPDATE",};const ConnectorOperationState = {    PENDING: "PENDING",    ROLLBACK_COMPLETE: "ROLLBACK_COMPLETE",    ROLLBACK_FAILED: "ROLLBACK_FAILED",    ROLLBACK_IN_PROGRESS: "ROLLBACK_IN_PROGRESS",    UPDATE_COMPLETE: "UPDATE_COMPLETE",    UPDATE_FAILED: "UPDATE_FAILED",    UPDATE_IN_PROGRESS: "UPDATE_IN_PROGRESS",};const ConnectorOperationType = {    ISOLATE_CONNECTOR: "ISOLATE_CONNECTOR",    RESTORE_CONNECTOR: "RESTORE_CONNECTOR",    UPDATE_CONNECTOR_CONFIGURATION: "UPDATE_CONNECTOR_CONFIGURATION",    UPDATE_WORKER_SETTING: "UPDATE_WORKER_SETTING",};const ConnectorState = {    CREATING: "CREATING",    DELETING: "DELETING",    FAILED: "FAILED",    RUNNING: "RUNNING",    UPDATING: "UPDATING",};const KafkaClusterClientAuthenticationType = {    IAM: "IAM",    NONE: "NONE",};const KafkaClusterEncryptionInTransitType = {    PLAINTEXT: "PLAINTEXT",    TLS: "TLS",};const NetworkType = {    DUAL: "DUAL",    IPV4: "IPV4",};const CustomPluginState = {    ACTIVE: "ACTIVE",    CREATE_FAILED: "CREATE_FAILED",    CREATING: "CREATING",    DELETING: "DELETING",    UPDATE_FAILED: "UPDATE_FAILED",    UPDATING: "UPDATING",};const CustomPluginContentType = {    JAR: "JAR",    ZIP: "ZIP",};const WorkerConfigurationState = {    ACTIVE: "ACTIVE",    DELETING: "DELETING",}; exports.$Command = client.Command;exports.__Client = client.Client;exports.KafkaConnectServiceException = KafkaConnectServiceException.KafkaConnectServiceException;exports.ConnectorOperationState = ConnectorOperationState;exports.ConnectorOperationStepState = ConnectorOperationStepState;exports.ConnectorOperationStepType = ConnectorOperationStepType;exports.ConnectorOperationType = ConnectorOperationType;exports.ConnectorState = ConnectorState;exports.CreateConnectorCommand = CreateConnectorCommand;exports.CreateCustomPluginCommand = CreateCustomPluginCommand;exports.CreateWorkerConfigurationCommand = CreateWorkerConfigurationCommand;exports.CustomPluginContentType = CustomPluginContentType;exports.CustomPluginState = CustomPluginState;exports.DeleteConnectorCommand = DeleteConnectorCommand;exports.DeleteCustomPluginCommand = DeleteCustomPluginCommand;exports.DeleteWorkerConfigurationCommand = DeleteWorkerConfigurationCommand;exports.DescribeConnectorCommand = DescribeConnectorCommand;exports.DescribeConnectorOperationCommand = DescribeConnectorOperationCommand;exports.DescribeCustomPluginCommand = DescribeCustomPluginCommand;exports.DescribeWorkerConfigurationCommand = DescribeWorkerConfigurationCommand;exports.KafkaClusterClientAuthenticationType = KafkaClusterClientAuthenticationType;exports.KafkaClusterEncryptionInTransitType = KafkaClusterEncryptionInTransitType;exports.KafkaConnect = KafkaConnect;exports.KafkaConnectClient = KafkaConnectClient;exports.ListConnectorOperationsCommand = ListConnectorOperationsCommand;exports.ListConnectorsCommand = ListConnectorsCommand;exports.ListCustomPluginsCommand = ListCustomPluginsCommand;exports.ListTagsForResourceCommand = ListTagsForResourceCommand;exports.ListWorkerConfigurationsCommand = ListWorkerConfigurationsCommand;exports.NetworkType = NetworkType;exports.TagResourceCommand = TagResourceCommand;exports.UntagResourceCommand = UntagResourceCommand;exports.UpdateConnectorCommand = UpdateConnectorCommand;exports.WorkerConfigurationState = WorkerConfigurationState;exports.paginateListConnectorOperations = paginateListConnectorOperations;exports.paginateListConnectors = paginateListConnectors;exports.paginateListCustomPlugins = paginateListCustomPlugins;exports.paginateListWorkerConfigurations = paginateListWorkerConfigurations;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];});