Documentation ¶
Index ¶
- Variables
- func GetGroupPolicyKeys() []string
- func GetPolicyKeys() []string
- func GetTokenFromCertificate(tenantID, clientID, certPath string) (string, error)
- func GetTokenFromDefault() (string, error)
- func GetTokenFromUsernameAndPassword(tenantID, username, password string) (string, error)
- type Count
- type SubscriptionPolicies
- type SubscriptionResponse
- type SubscriptionValue
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 GetTokenFromDefault ¶
GetTokenFromDefault get token from currently logged in user
func GetTokenFromUsernameAndPassword ¶
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 SubscriptionPolicies ¶
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.
Click to show internal directories.
Click to hide internal directories.