Show / Hide Table of Contents

Class EscAuth

Provides authentication helpers for the Pulumi ESC SDK.

Inheritance
object
EscAuth
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Pulumi.Esc.Sdk
Assembly: Pulumi.Esc.Sdk.dll
Syntax
public static class EscAuth

Methods

View Source

GetDefaultAccessToken()

Gets the default access token by checking (in order):

  1. PULUMI_ACCESS_TOKEN environment variable
  2. 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.

View Source

GetDefaultBackendUrl()

Gets the default backend URL by checking (in order):

  1. PULUMI_BACKEND_URL environment variable
  2. Currently logged-in account URL from Pulumi CLI or ESC CLI
Declaration
public static string GetDefaultBackendUrl()
Returns
Type Description
string

The backend URL string.

View Source

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").

Version 0.13.1

  • View Source
Back to top Copyright 2016-2023, Pulumi Corporation.