Reads credentials and SDK defaults from a Nebius CLI configuration file.
Construction reads and validates the YAML file synchronously. The file must
exist even when an environment token supplies the credentials. The selected
profile can provide parent-id, endpoint, federation credentials, a token
file, or service account credentials.
Pass this object as SDKOptions.configReader. The SDK then uses its endpoint, parent ID, and credentials. An environment access token has priority over profile credentials.
Returns a JSON-safe value for logs.
Reads the configuration file and selects one profile.
Readonly$typeContains the fully qualified runtime type name.
ReadonlyemitsTells the SDK that this reader reports its own credential-resolution metrics.
Returns a JSON-safe value for logs.
Returns the configured service endpoint.
An explicit option has priority over the endpoint environment variable. The environment value has priority over the profile value.
Creates credentials for the selected source.
The order is: environment token, profile token file, then the profile
auth-type. Supported auth types are federation and service account.
When impersonation is set, the returned bearer exchanges these credentials
for the target service account.
Credential objects normally perform network work when the first SDK request asks for a token. Federation credentials can open a browser at that time.
ConfigError Credential fields are missing or invalid.
Returns the configured logger.
Returns the configured parent resource ID.
NoParentIdError Parent ID use is disabled, missing, or empty.
ConfigError The profile value is not a string.
Returns the selected CLI profile name.
Replaces all metric callbacks.
When construction already recorded a config-load result, a newly attached collector receives that result once.
Reads credentials and SDK defaults from a Nebius CLI configuration file.
Construction reads and validates the YAML file synchronously. The file must exist even when an environment token supplies the credentials. The selected profile can provide
parent-id,endpoint, federation credentials, a token file, or service account credentials.Pass this object as SDKOptions.configReader. The SDK then uses its endpoint, parent ID, and credentials. An environment access token has priority over profile credentials.
Example
Throws
The file is missing or unreadable, the YAML cannot be parsed, or the selected profile is invalid. Semantic profile errors are instances of ConfigError.