@nebius/js-sdk - v0.2.54
    Preparing search index...

    Defines configuration values that an SDK configuration reader supplies.

    Implement this interface to load configuration from a source other than the Nebius CLI file. Keep methods free of unrelated side effects because the SDK calls them during construction. The SDK catches errors from ConfigReaderLike.parentId, but errors from other methods can affect initialization.

    const reader: ConfigReaderLike = {
    endpoint: () => 'api.nebius.cloud:443',
    parentId: () => 'project-e00example',
    profileName: () => 'application',
    getCredentials: () => {
    const token = process.env.NEBIUS_IAM_TOKEN;
    if (!token?.trim()) throw new Error('NEBIUS_IAM_TOKEN is required');
    return token;
    },
    };
    interface ConfigReaderLike {
        emitsCredentialsResolveMetrics?: boolean;
        endpoint(): string | undefined;
        getCredentials(options: GetCredentialsOptions): Credentials;
        parentId(): string | undefined;
        profileName(): string | undefined;
        setAuthMetrics?(metrics: AuthMetricsLike): void;
        setMetrics?(metrics: MetricsLike): void;
    }

    Implemented by

    Index
    emitsCredentialsResolveMetrics?: boolean

    Shows whether the reader reports credentialsResolve metrics.

    The SDK reports a fallback metric around ConfigReaderLike.getCredentials when this value is not true.