azureshared

package
v2.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2022 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BasicsFromProviderID

func BasicsFromProviderID(providerID string) (subscriptionID, resourceGroup string, err error)

BasicsFromProviderID extracts subscriptionID and resourceGroup from both types of valid azure providerID.

func ScaleSetInformationFromProviderID

func ScaleSetInformationFromProviderID(providerID string) (subscriptionID, resourceGroup, scaleSet, instanceID string, err error)

ScaleSetInformationFromProviderID splits a provider's id belonging to an azure scaleset into core components. A providerID for scale set VMs is build after the following schema: - 'azure:///subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.Compute/virtualMachineScaleSets/<scale-set-name>/virtualMachines/<instance-id>'

Types

type ApplicationCredentials

type ApplicationCredentials struct {
	TenantID          string
	AppClientID       string
	ClientSecretValue string
	Location          string
}

ApplicationCredentials is a set of Azure AD application credentials. It is the equivalent of a service account key in other cloud providers.

func ApplicationCredentialsFromURI

func ApplicationCredentialsFromURI(cloudServiceAccountURI string) (ApplicationCredentials, error)

ApplicationCredentialsFromURI converts a cloudServiceAccountURI into Azure ApplicationCredentials.

func (ApplicationCredentials) ToCloudServiceAccountURI

func (c ApplicationCredentials) ToCloudServiceAccountURI() string

ToCloudServiceAccountURI converts the ApplicationCredentials into a cloud service account URI.

Jump to

Keyboard shortcuts

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