File Explorer

/proc/self/root/var/runtime/node_modules/@aws-sdk/client-codeguruprofiler/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.js20.5 KB · 536 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 CodeGuruProfilerServiceException = require('./models/CodeGuruProfilerServiceException'); const resolveClientEndpointParameters = (options) => {    return Object.assign(options, {        useDualstackEndpoint: options.useDualstackEndpoint ?? false,        useFipsEndpoint: options.useFipsEndpoint ?? false,        defaultSigningName: "codeguru-profiler",    });};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 CodeGuruProfilerClient 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.defaultCodeGuruProfilerHttpAuthSchemeParametersProvider,            identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({                "aws.auth#sigv4": config.credentials,            }),        }));        this.middlewareStack.use(core.getHttpSigningPlugin(this.config));    }    destroy() {        super.destroy();    }} class AddNotificationChannelsCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CodeGuruProfiler", "AddNotificationChannels", {})    .n("CodeGuruProfilerClient", "AddNotificationChannelsCommand")    .sc(schemas_0.AddNotificationChannels$)    .build() {} class BatchGetFrameMetricDataCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CodeGuruProfiler", "BatchGetFrameMetricData", {})    .n("CodeGuruProfilerClient", "BatchGetFrameMetricDataCommand")    .sc(schemas_0.BatchGetFrameMetricData$)    .build() {} class ConfigureAgentCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CodeGuruProfiler", "ConfigureAgent", {})    .n("CodeGuruProfilerClient", "ConfigureAgentCommand")    .sc(schemas_0.ConfigureAgent$)    .build() {} class CreateProfilingGroupCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CodeGuruProfiler", "CreateProfilingGroup", {})    .n("CodeGuruProfilerClient", "CreateProfilingGroupCommand")    .sc(schemas_0.CreateProfilingGroup$)    .build() {} class DeleteProfilingGroupCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CodeGuruProfiler", "DeleteProfilingGroup", {})    .n("CodeGuruProfilerClient", "DeleteProfilingGroupCommand")    .sc(schemas_0.DeleteProfilingGroup$)    .build() {} class DescribeProfilingGroupCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CodeGuruProfiler", "DescribeProfilingGroup", {})    .n("CodeGuruProfilerClient", "DescribeProfilingGroupCommand")    .sc(schemas_0.DescribeProfilingGroup$)    .build() {} class GetFindingsReportAccountSummaryCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CodeGuruProfiler", "GetFindingsReportAccountSummary", {})    .n("CodeGuruProfilerClient", "GetFindingsReportAccountSummaryCommand")    .sc(schemas_0.GetFindingsReportAccountSummary$)    .build() {} class GetNotificationConfigurationCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CodeGuruProfiler", "GetNotificationConfiguration", {})    .n("CodeGuruProfilerClient", "GetNotificationConfigurationCommand")    .sc(schemas_0.GetNotificationConfiguration$)    .build() {} class GetPolicyCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CodeGuruProfiler", "GetPolicy", {})    .n("CodeGuruProfilerClient", "GetPolicyCommand")    .sc(schemas_0.GetPolicy$)    .build() {} class GetProfileCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CodeGuruProfiler", "GetProfile", {})    .n("CodeGuruProfilerClient", "GetProfileCommand")    .sc(schemas_0.GetProfile$)    .build() {} class GetRecommendationsCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CodeGuruProfiler", "GetRecommendations", {})    .n("CodeGuruProfilerClient", "GetRecommendationsCommand")    .sc(schemas_0.GetRecommendations$)    .build() {} class ListFindingsReportsCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CodeGuruProfiler", "ListFindingsReports", {})    .n("CodeGuruProfilerClient", "ListFindingsReportsCommand")    .sc(schemas_0.ListFindingsReports$)    .build() {} class ListProfileTimesCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CodeGuruProfiler", "ListProfileTimes", {})    .n("CodeGuruProfilerClient", "ListProfileTimesCommand")    .sc(schemas_0.ListProfileTimes$)    .build() {} class ListProfilingGroupsCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CodeGuruProfiler", "ListProfilingGroups", {})    .n("CodeGuruProfilerClient", "ListProfilingGroupsCommand")    .sc(schemas_0.ListProfilingGroups$)    .build() {} class ListTagsForResourceCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CodeGuruProfiler", "ListTagsForResource", {})    .n("CodeGuruProfilerClient", "ListTagsForResourceCommand")    .sc(schemas_0.ListTagsForResource$)    .build() {} class PostAgentProfileCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CodeGuruProfiler", "PostAgentProfile", {})    .n("CodeGuruProfilerClient", "PostAgentProfileCommand")    .sc(schemas_0.PostAgentProfile$)    .build() {} class PutPermissionCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CodeGuruProfiler", "PutPermission", {})    .n("CodeGuruProfilerClient", "PutPermissionCommand")    .sc(schemas_0.PutPermission$)    .build() {} class RemoveNotificationChannelCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CodeGuruProfiler", "RemoveNotificationChannel", {})    .n("CodeGuruProfilerClient", "RemoveNotificationChannelCommand")    .sc(schemas_0.RemoveNotificationChannel$)    .build() {} class RemovePermissionCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CodeGuruProfiler", "RemovePermission", {})    .n("CodeGuruProfilerClient", "RemovePermissionCommand")    .sc(schemas_0.RemovePermission$)    .build() {} class SubmitFeedbackCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CodeGuruProfiler", "SubmitFeedback", {})    .n("CodeGuruProfilerClient", "SubmitFeedbackCommand")    .sc(schemas_0.SubmitFeedback$)    .build() {} class TagResourceCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CodeGuruProfiler", "TagResource", {})    .n("CodeGuruProfilerClient", "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("CodeGuruProfiler", "UntagResource", {})    .n("CodeGuruProfilerClient", "UntagResourceCommand")    .sc(schemas_0.UntagResource$)    .build() {} class UpdateProfilingGroupCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("CodeGuruProfiler", "UpdateProfilingGroup", {})    .n("CodeGuruProfilerClient", "UpdateProfilingGroupCommand")    .sc(schemas_0.UpdateProfilingGroup$)    .build() {} const paginateGetFindingsReportAccountSummary = core.createPaginator(CodeGuruProfilerClient, GetFindingsReportAccountSummaryCommand, "nextToken", "nextToken", "maxResults"); const paginateListFindingsReports = core.createPaginator(CodeGuruProfilerClient, ListFindingsReportsCommand, "nextToken", "nextToken", "maxResults"); const paginateListProfileTimes = core.createPaginator(CodeGuruProfilerClient, ListProfileTimesCommand, "nextToken", "nextToken", "maxResults"); const paginateListProfilingGroups = core.createPaginator(CodeGuruProfilerClient, ListProfilingGroupsCommand, "nextToken", "nextToken", "maxResults"); const commands = {    AddNotificationChannelsCommand,    BatchGetFrameMetricDataCommand,    ConfigureAgentCommand,    CreateProfilingGroupCommand,    DeleteProfilingGroupCommand,    DescribeProfilingGroupCommand,    GetFindingsReportAccountSummaryCommand,    GetNotificationConfigurationCommand,    GetPolicyCommand,    GetProfileCommand,    GetRecommendationsCommand,    ListFindingsReportsCommand,    ListProfileTimesCommand,    ListProfilingGroupsCommand,    ListTagsForResourceCommand,    PostAgentProfileCommand,    PutPermissionCommand,    RemoveNotificationChannelCommand,    RemovePermissionCommand,    SubmitFeedbackCommand,    TagResourceCommand,    UntagResourceCommand,    UpdateProfilingGroupCommand,};const paginators = {    paginateGetFindingsReportAccountSummary,    paginateListFindingsReports,    paginateListProfileTimes,    paginateListProfilingGroups,};class CodeGuruProfiler extends CodeGuruProfilerClient {}client.createAggregatedClient(commands, CodeGuruProfiler, { paginators }); const ActionGroup = {    AGENT_PERMISSIONS: "agentPermissions",};const EventPublisher = {    ANOMALY_DETECTION: "AnomalyDetection",};const AgentParameterField = {    MAX_STACK_DEPTH: "MaxStackDepth",    MEMORY_USAGE_LIMIT_PERCENT: "MemoryUsageLimitPercent",    MINIMUM_TIME_FOR_REPORTING_IN_MILLISECONDS: "MinimumTimeForReportingInMilliseconds",    REPORTING_INTERVAL_IN_MILLISECONDS: "ReportingIntervalInMilliseconds",    SAMPLING_INTERVAL_IN_MILLISECONDS: "SamplingIntervalInMilliseconds",};const AggregationPeriod = {    P1D: "P1D",    PT1H: "PT1H",    PT5M: "PT5M",};const FeedbackType = {    Negative: "Negative",    Positive: "Positive",};const MetricType = {    AggregatedRelativeTotalTime: "AggregatedRelativeTotalTime",};const MetadataField = {    AGENT_ID: "AgentId",    AWS_REQUEST_ID: "AwsRequestId",    COMPUTE_PLATFORM: "ComputePlatform",    EXECUTION_ENVIRONMENT: "ExecutionEnvironment",    LAMBDA_FUNCTION_ARN: "LambdaFunctionArn",    LAMBDA_MEMORY_LIMIT_IN_MB: "LambdaMemoryLimitInMB",    LAMBDA_PREVIOUS_EXECUTION_TIME_IN_MILLISECONDS: "LambdaPreviousExecutionTimeInMilliseconds",    LAMBDA_REMAINING_TIME_IN_MILLISECONDS: "LambdaRemainingTimeInMilliseconds",    LAMBDA_TIME_GAP_BETWEEN_INVOKES_IN_MILLISECONDS: "LambdaTimeGapBetweenInvokesInMilliseconds",};const ComputePlatform = {    AWSLAMBDA: "AWSLambda",    DEFAULT: "Default",};const OrderBy = {    TIMESTAMP_ASCENDING: "TimestampAscending",    TIMESTAMP_DESCENDING: "TimestampDescending",}; exports.$Command = client.Command;exports.__Client = client.Client;exports.CodeGuruProfilerServiceException = CodeGuruProfilerServiceException.CodeGuruProfilerServiceException;exports.ActionGroup = ActionGroup;exports.AddNotificationChannelsCommand = AddNotificationChannelsCommand;exports.AgentParameterField = AgentParameterField;exports.AggregationPeriod = AggregationPeriod;exports.BatchGetFrameMetricDataCommand = BatchGetFrameMetricDataCommand;exports.CodeGuruProfiler = CodeGuruProfiler;exports.CodeGuruProfilerClient = CodeGuruProfilerClient;exports.ComputePlatform = ComputePlatform;exports.ConfigureAgentCommand = ConfigureAgentCommand;exports.CreateProfilingGroupCommand = CreateProfilingGroupCommand;exports.DeleteProfilingGroupCommand = DeleteProfilingGroupCommand;exports.DescribeProfilingGroupCommand = DescribeProfilingGroupCommand;exports.EventPublisher = EventPublisher;exports.FeedbackType = FeedbackType;exports.GetFindingsReportAccountSummaryCommand = GetFindingsReportAccountSummaryCommand;exports.GetNotificationConfigurationCommand = GetNotificationConfigurationCommand;exports.GetPolicyCommand = GetPolicyCommand;exports.GetProfileCommand = GetProfileCommand;exports.GetRecommendationsCommand = GetRecommendationsCommand;exports.ListFindingsReportsCommand = ListFindingsReportsCommand;exports.ListProfileTimesCommand = ListProfileTimesCommand;exports.ListProfilingGroupsCommand = ListProfilingGroupsCommand;exports.ListTagsForResourceCommand = ListTagsForResourceCommand;exports.MetadataField = MetadataField;exports.MetricType = MetricType;exports.OrderBy = OrderBy;exports.PostAgentProfileCommand = PostAgentProfileCommand;exports.PutPermissionCommand = PutPermissionCommand;exports.RemoveNotificationChannelCommand = RemoveNotificationChannelCommand;exports.RemovePermissionCommand = RemovePermissionCommand;exports.SubmitFeedbackCommand = SubmitFeedbackCommand;exports.TagResourceCommand = TagResourceCommand;exports.UntagResourceCommand = UntagResourceCommand;exports.UpdateProfilingGroupCommand = UpdateProfilingGroupCommand;exports.paginateGetFindingsReportAccountSummary = paginateGetFindingsReportAccountSummary;exports.paginateListFindingsReports = paginateListFindingsReports;exports.paginateListProfileTimes = paginateListProfileTimes;exports.paginateListProfilingGroups = paginateListProfilingGroups;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];});