azure

package
v0.0.0-...-b0384cf Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GroupedPolicies = map[string][]map[string]policy.Policy{}/* 232 elements not displayed */

GroupedPolicies map of grouped policies as specified by the rest api spec

View Source
var Policies = map[string]map[string]policy.Policy{}/* 513 elements not displayed */

Functions

func GetGroupPolicyKeys

func GetGroupPolicyKeys() []string

GetGroupPolicyKeys get keys for grouped policies

func GetPolicyKeys

func GetPolicyKeys() []string

func GetTokenFromCertificate

func GetTokenFromCertificate(tenantID, clientID, certPath string) (string, error)

func GetTokenFromDefault

func GetTokenFromDefault() (string, error)

GetTokenFromDefault get token from currently logged in user

func GetTokenFromUsernameAndPassword

func GetTokenFromUsernameAndPassword(tenantID, username, password string) (string, error)

GetTokenFromUsernameAndPassword returns a valid bearer token from the given username, password and tenant. The token can be used to make REST api calls.

Types

type Count

type Count struct {
	Type  string `json:"type"`
	Value int64  `json:"value"`
}

type SubscriptionPolicies

type SubscriptionPolicies struct {
	LocationPlacementID string `json:"locationPlacementId"`
	QuotaID             string `json:"quotaId"`
	SpendingLimit       string `json:"spendingLimit"`
}

type SubscriptionResponse

type SubscriptionResponse struct {
	Value []SubscriptionValue `json:"value"`
	Count Count               `json:"count"`
}

type SubscriptionValue

type SubscriptionValue struct {
	ID                   string               `json:"id"`
	AuthorizationSource  string               `json:"authorizationSource"`
	ManagedByTenants     []interface{}        `json:"managedByTenants"`
	SubscriptionID       string               `json:"subscriptionId"`
	TenantID             string               `json:"tenantId"`
	DisplayName          string               `json:"displayName"`
	State                string               `json:"state"`
	SubscriptionPolicies SubscriptionPolicies `json:"subscriptionPolicies"`
}

func GetFirstSubscriptions

func GetFirstSubscriptions(bearerToken string) (string, []SubscriptionValue, error)

GetFirstSubscriptions returns the first subscription ID from the given. The token can be used to make REST api calls. This function returns a subscription ID and a list of all subscriptions.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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