Class EscAuth
Provides authentication helpers for the Pulumi ESC SDK.
Inherited Members
Namespace: Pulumi.Esc.Sdk
Assembly: Pulumi.Esc.Sdk.dll
Syntax
public static class EscAuth
Methods
View SourceGetDefaultAccessToken()
Gets the default access token by checking (in order):
- PULUMI_ACCESS_TOKEN environment variable
- Currently logged-in account in Pulumi CLI or ESC CLI
Declaration
public static string GetDefaultAccessToken()
Returns
| Type | Description |
|---|---|
| string | The access token string. |
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | When no access token can be found. |
GetDefaultBackendUrl()
Gets the default backend URL by checking (in order):
- PULUMI_BACKEND_URL environment variable
- Currently logged-in account URL from Pulumi CLI or ESC CLI
Declaration
public static string GetDefaultBackendUrl()
Returns
| Type | Description |
|---|---|
| string | The backend URL string. |
GetEscApiUrl(string)
Converts a backend URL (e.g. "https://api.pulumi.com") to the ESC API URL.
Declaration
public static string GetEscApiUrl(string backendUrl)
Parameters
| Type | Name | Description |
|---|---|---|
| string | backendUrl | The Pulumi backend URL. |
Returns
| Type | Description |
|---|---|
| string | The ESC API base URL (e.g. "https://api.pulumi.com/api/esc"). |