global

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AzSubscriptionId = "azure-subscription-id"
	DataUsageWindow  = "data-usage-window"
)

Variables

This section is empty.

Functions

func CreateADClientSecretCredential

func CreateADClientSecretCredential(ctx context.Context, params map[string]string) (*azidentity.ClientSecretCredential, error)

func CreateRoleAssignment

func CreateRoleAssignment(ctx context.Context, params map[string]string, binding IAMRoleAssignment) error

func DeleteRoleAssignment

func DeleteRoleAssignment(ctx context.Context, params map[string]string, binding IAMRoleAssignment) error

func GetPrincipalIdByName

func GetPrincipalIdByName(ctx context.Context, params map[string]string, principalType armauthorization.PrincipalType, name string) string

func GetPrincipalNameById

func GetPrincipalNameById(ctx context.Context, params map[string]string, principalType armauthorization.PrincipalType, id string) string

func GetRoleIdByName

func GetRoleIdByName(ctx context.Context, params map[string]string, roleName string) (*string, error)

Types

type AccessProviderFeedbackHandler added in v0.3.0

type AccessProviderFeedbackHandler interface {
	Error(err string, apIds ...string)
	Warning(warning string, apIds ...string)
}

type AccessProviderFeedbackMap added in v0.3.0

type AccessProviderFeedbackMap map[string]sync_to_target.AccessProviderSyncFeedback

type IAMRoleAssignment

type IAMRoleAssignment struct {
	PrincipalId      string                         `json:"principalId"`
	PrincipalType    armauthorization.PrincipalType `json:"principalType"`
	RoleName         string                         `json:"roleName"`
	RoleDefinitionID string                         `json:"roleDefinitionId"`
	Scope            string                         `json:"scope"`
}

func GetRoleAssignments

func GetRoleAssignments(ctx context.Context, params map[string]string) ([]IAMRoleAssignment, error)

type IamClient added in v0.3.0

type IamClient struct {
	// contains filtered or unexported fields
}

func NewIamClient added in v0.3.0

func NewIamClient(ctx context.Context, params map[string]string) (*IamClient, error)

func (*IamClient) GetPrincipalIdByName added in v0.3.0

func (c *IamClient) GetPrincipalIdByName(principalType armauthorization.PrincipalType, name string) string

func (*IamClient) GetPrincipalNameById added in v0.3.0

func (c *IamClient) GetPrincipalNameById(principalType armauthorization.PrincipalType, id string) string

Jump to

Keyboard shortcuts

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