Documentation
¶
Index ¶
- func CheckCanAccessResource(actionID string, scope string) (bool, error)
- func GetCloudDriveResourceGroup() string
- func GetCloudShellLocation() string
- func GetCloudShellToken() (*adal.Token, error)
- func GetContainerClient(subscriptionID string, authorizer autorest.Authorizer, userAgent string) (*containerinstance.ContainerClient, error)
- func GetContainerGroupsClient(subscriptionID string, authorizer autorest.Authorizer, userAgent string) (*containerinstance.ContainerGroupsClient, error)
- func GetGroupsClient(subscriptionID string, authorizer autorest.Authorizer, userAgent string) (*resources.GroupsClient, error)
- func GetProvidersClient(subscriptionID string, authorizer autorest.Authorizer, userAgent string) (*resources.ProvidersClient, error)
- func GetRoleAssignmentClient(subscriptionID string, authorizer autorest.Authorizer, userAgent string) (*authorization.RoleAssignmentsClient, error)
- func GetRoleDefinitionsClient(subscriptionID string, authorizer autorest.Authorizer, userAgent string) (*authorization.RoleDefinitionsClient, error)
- func GetStorageAccountsClient(subscriptionID string, authorizer autorest.Authorizer, userAgent string) (*storage.AccountsClient, error)
- func GetSubscriptionIDFromCliProfile() string
- func GetSubscriptionsClient(authorizer autorest.Authorizer, userAgent string) (*subscriptions.Client, error)
- func GetTenantIDFromCliProfile() string
- func GetUserAssignedIdentitiesClient(subscriptionID string, authorizer autorest.Authorizer, userAgent string) (*msi.UserAssignedIdentitiesClient, error)
- func IsInCloudShell() bool
- func TryGetRGandLocation() (rg string, location string)
- type FileShare
- func (afs *FileShare) CheckIfFileExists(fileName string) (bool, error)
- func (afs *FileShare) DeleteFileFromShare(fileName string) (bool, error)
- func (afs *FileShare) ReadFileFromShare(fileName string) (string, error)
- func (afs *FileShare) WriteFileToShare(fileName string, content []byte, overwrite bool) error
- type FileShareDetails
- type LoginInfo
- type LoginType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckCanAccessResource ¶
CheckCanAccessResource checks to see if the user can create a specific
func GetCloudDriveResourceGroup ¶
func GetCloudDriveResourceGroup() string
GetCloudDriveResourceGroup gets the resource group name associated with the clouddrive used in CloudShell
func GetCloudShellLocation ¶
func GetCloudShellLocation() string
GetCloudShellLocation returns the location that CloudShell is running in
func GetCloudShellToken ¶
GetCloudShellToken gets the CloudShell Token
func GetContainerClient ¶
func GetContainerClient(subscriptionID string, authorizer autorest.Authorizer, userAgent string) (*containerinstance.ContainerClient, error)
GetContainerClient gets a Container Management Client
func GetContainerGroupsClient ¶
func GetContainerGroupsClient(subscriptionID string, authorizer autorest.Authorizer, userAgent string) (*containerinstance.ContainerGroupsClient, error)
GetContainerGroupsClient gets a ContainerGroups Management Client
func GetGroupsClient ¶
func GetGroupsClient(subscriptionID string, authorizer autorest.Authorizer, userAgent string) (*resources.GroupsClient, error)
GetGroupsClient gets a Resource Group Management Client
func GetProvidersClient ¶
func GetProvidersClient(subscriptionID string, authorizer autorest.Authorizer, userAgent string) (*resources.ProvidersClient, error)
GetProvidersClient gets a Providers Management Client
func GetRoleAssignmentClient ¶
func GetRoleAssignmentClient(subscriptionID string, authorizer autorest.Authorizer, userAgent string) (*authorization.RoleAssignmentsClient, error)
GetRoleAssignmentClient gets a RoleAssignment Management Client
func GetRoleDefinitionsClient ¶
func GetRoleDefinitionsClient(subscriptionID string, authorizer autorest.Authorizer, userAgent string) (*authorization.RoleDefinitionsClient, error)
GetRoleDefinitionsClient gets a RoleDefinitions Management Client
func GetStorageAccountsClient ¶
func GetStorageAccountsClient(subscriptionID string, authorizer autorest.Authorizer, userAgent string) (*storage.AccountsClient, error)
GetStorageAccountsClient gets a Providers Management Client
func GetSubscriptionIDFromCliProfile ¶
func GetSubscriptionIDFromCliProfile() string
GetSubscriptionIDFromCliProfile gets default subscription id from az cli profile
func GetSubscriptionsClient ¶
func GetSubscriptionsClient(authorizer autorest.Authorizer, userAgent string) (*subscriptions.Client, error)
GetSubscriptionsClient gets a Subscriptions Management Client
func GetTenantIDFromCliProfile ¶
func GetTenantIDFromCliProfile() string
GetTenantIDFromCliProfile gets tenant id from az cli profile
func GetUserAssignedIdentitiesClient ¶
func GetUserAssignedIdentitiesClient(subscriptionID string, authorizer autorest.Authorizer, userAgent string) (*msi.UserAssignedIdentitiesClient, error)
GetUserAssignedIdentitiesClient gets a UserAssignedIdentities Management Client
func IsInCloudShell ¶
func IsInCloudShell() bool
IsInCloudShell checks if we are currently running in CloudShell
func TryGetRGandLocation ¶
TryGetRGandLocation tries to get Resource Group and Location Information from az defaults and ACC_env var
Types ¶
type FileShare ¶
type FileShare struct {
// contains filtered or unexported fields
}
func NewFileShare ¶
NewFileShare creates a new AzureFileShare client
func (*FileShare) CheckIfFileExists ¶
func (*FileShare) DeleteFileFromShare ¶
func (*FileShare) ReadFileFromShare ¶
type FileShareDetails ¶
type FileShareDetails struct {}
FileShareDetails contains details of the clouddrive FileShare
func GetCloudDriveDetails ¶
func GetCloudDriveDetails(userAgent string) (*FileShareDetails, error)
GetCloudDriveDetails gets the details of the clouddrive cloudshare
type LoginInfo ¶
type LoginInfo struct { Authorizer autorest.Authorizer LoginType LoginType OAuthTokenProvider adal.OAuthTokenProvider }
LoginInfo contains Azure login information
type LoginType ¶
type LoginType int
LoginType is the type of login used
const ( // ServicePrincipal - logged in using Service Principal ServicePrincipal LoginType = iota // DeviceCode - logged in using DeviceCode Flow DeviceCode // CloudShell - logged in using DeviceCode Flow CloudShell // MSI - logged in using DeviceCode Flow MSI // CLI - logged in using DeviceCode Flow CLI )