public class ComputeCredential.Initializer : ServiceCredential.Initializer
An initializer class for the Compute credential. It uses EffectiveComputeTokenUrl
as the token server URL (optionally overriding the host using the GCE_METADATA_HOST environment variable).
public Initializer(string tokenUrl, string oidcTokenUrl)
Constructs a new initializer using the given token URL
and OIDC token URL (optionally overriding the host using the GCE_METADATA_HOST environment variable).
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe latest version available is 1.69.0, with previous versions listed, including 1.68.0, 1.60.0, 1.59.0, 1.55.0, and 1.50.0, each with their respective documentation links.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eComputeCredential.Initializer\u003c/code\u003e is a class that initializes Compute credentials, inheriting from \u003ccode\u003eServiceCredential.Initializer\u003c/code\u003e, and it uses the \u003ccode\u003eEffectiveComputeTokenUrl\u003c/code\u003e as its token server URL.\u003c/p\u003e\n"],["\u003cp\u003eThe class supports multiple constructors, allowing for initialization with default or custom token URLs, including the option to specify an OIDC token URL.\u003c/p\u003e\n"],["\u003cp\u003eThe class inherits various members such as \u003ccode\u003eTokenServerUrl\u003c/code\u003e, \u003ccode\u003eClock\u003c/code\u003e, \u003ccode\u003eAccessMethod\u003c/code\u003e, \u003ccode\u003eHttpClientFactory\u003c/code\u003e, \u003ccode\u003eDefaultExponentialBackOffPolicy\u003c/code\u003e, \u003ccode\u003eQuotaProject\u003c/code\u003e, and \u003ccode\u003eScopes\u003c/code\u003e from its base \u003ccode\u003eServiceCredential.Initializer\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe class allows for overriding the host by using the GCE_METADATA_HOST environment variable, enabling flexibility in server address configuration.\u003c/p\u003e\n"]]],[],null,[]]