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 (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 ¶
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.