azureutil

package
v0.0.0-...-ffd345d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCurrentPrincipalId

func GetCurrentPrincipalId(ctx context.Context, userProfile *azapi.UserProfileService, tenantId string) (string, error)

GetCurrentPrincipalId returns the object id of the current principal authenticated with the CLI (via ad sp signed-in-user), falling back to extracting the `oid` claim from an access token a principal can not be obtained in this way.

func PromptLocationWithFilter

func PromptLocationWithFilter(
	ctx context.Context,
	subscriptionId string,
	message string,
	help string,
	console input.Console,
	accountManager account.Manager,
	shouldDisplay func(account.Location) bool,
	defaultSelectedLocation *string,
) (string, error)

PromptLocation asks the user to select a location from a list of supported azure locations for a given subscription. shouldDisplay, when non-nil, filters the location being displayed.

func ResourceNotFound

func ResourceNotFound(err error) error

Types

type ResourceNotFoundError

type ResourceNotFoundError struct {
	// contains filtered or unexported fields
}

func (*ResourceNotFoundError) Error

func (e *ResourceNotFoundError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL