public class ComputeCredential.Initializer : ServiceCredential.Initializer
An initializer class for the Compute credential. It uses ComputeTokenUrl
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 \u003ccode\u003eComputeCredential.Initializer\u003c/code\u003e class is designed for initializing Compute credentials, utilizing \u003ccode\u003eComputeTokenUrl\u003c/code\u003e as the default token server URL, with the option to override the host via the \u003ccode\u003eGCE_METADATA_HOST\u003c/code\u003e environment variable.\u003c/p\u003e\n"],["\u003cp\u003eThis class inherits from \u003ccode\u003eServiceCredential.Initializer\u003c/code\u003e, inheriting 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.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eInitializer\u003c/code\u003e class provides three constructors, one default, one taking a \u003ccode\u003etokenUrl\u003c/code\u003e string, and one taking both \u003ccode\u003etokenUrl\u003c/code\u003e and \u003ccode\u003eoidcTokenUrl\u003c/code\u003e strings, offering flexibility in configuring the initializer.\u003c/p\u003e\n"],["\u003cp\u003eThe class contains the \u003ccode\u003eOidcTokenUrl\u003c/code\u003e property, a string, which is a get-only property that returns the OIDC token URL.\u003c/p\u003e\n"],["\u003cp\u003eThere are multiple versions of this documentation available for the library, with version 1.69.0 being the latest available.\u003c/p\u003e\n"]]],[],null,[]]