Documentation
¶
Index ¶
- func GetCurrentPrincipalId(ctx context.Context, userProfile *azapi.UserProfileService, tenantId string) (string, error)
- func PromptLocationWithFilter(ctx context.Context, subscriptionId string, message string, help string, ...) (string, error)
- func ResourceNotFound(err error) error
- type ResourceNotFoundError
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. It prefers the oid claim from an ARM access token, falling back to Graph /me when acquiring the token fails or when the token does not include a usable oid.
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 ¶
Types ¶
type ResourceNotFoundError ¶
type ResourceNotFoundError struct {
// contains filtered or unexported fields
}
func (*ResourceNotFoundError) Error ¶
func (e *ResourceNotFoundError) Error() string
Click to show internal directories.
Click to hide internal directories.