azure

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateIdentity

func CreateIdentity(subscriptionID, resourceGroup, azureClientID, identityName, keyvaultName string) error

CreateIdentity will create a user-assigned identity on Azure, assign 'Reader' role to the identity and assign 'Managed Identity Operator' role to service principal

func DeleteIdentity

func DeleteIdentity(resourceGroup, identityName string) error

DeleteIdentity will delete a given user-assigned identity on Azure

func EnableSystemAssignedIdentityOnVM

func EnableSystemAssignedIdentityOnVM(resourceGroup, vmName string) error

EnableSystemAssignedIdentityOnVM will enable a system assigned identity to a VM

func EnableSystemAssignedIdentityOnVMSS

func EnableSystemAssignedIdentityOnVMSS(resourceGroup, vmName string) error

EnableSystemAssignedIdentityOnVMSS will enable a system assigned identity to a VM

func EnableUserAssignedIdentityOnVM

func EnableUserAssignedIdentityOnVM(resourceGroup, vmName, identityName string) error

EnableUserAssignedIdentityOnVM will enable a user assigned identity to a VM

func EnableUserAssignedIdentityOnVMSS

func EnableUserAssignedIdentityOnVMSS(resourceGroup, vmName, identityName string) error

EnableUserAssignedIdentityOnVMSS will enable a user assigned identity to a VM

func GetIdentityClientID

func GetIdentityClientID(resourceGroup, identityName string) (string, error)

GetIdentityClientID will return the client id of a user-assigned identity on Azure

func GetIdentityPrincipalID

func GetIdentityPrincipalID(resourceGroup, identityName string) (string, error)

GetIdentityPrincipalID will return the principal id (objecet id) of a user-assigned identity on Azure

func GetVMSSSystemAssignedIdentity

func GetVMSSSystemAssignedIdentity(resourceGroup, name string) (string, string, error)

GetVMSSSystemAssignedIdentity will return the principal ID and tenant ID of a system assigned identity

func GetVMSSUserAssignedIdentities

func GetVMSSUserAssignedIdentities(resourceGroup, name string) (map[string]UserAssignedIdentity, error)

GetVMSSUserAssignedIdentities will return the list of user assigned identity in a given VM

func GetVMSystemAssignedIdentity

func GetVMSystemAssignedIdentity(resourceGroup, vmName string) (string, string, error)

GetVMSystemAssignedIdentity will return the principal ID and tenant ID of a system assigned identity

func GetVMUserAssignedIdentities

func GetVMUserAssignedIdentities(resourceGroup, vmName string) (map[string]UserAssignedIdentity, error)

GetVMUserAssignedIdentities will return the list of user assigned identity in a given VM

func RemoveSystemAssignedIdentityFromVM

func RemoveSystemAssignedIdentityFromVM(resourceGroup, vmName string) error

RemoveSystemAssignedIdentityFromVM will remove the system assigned identity to a VM

func RemoveSystemAssignedIdentityFromVMSS

func RemoveSystemAssignedIdentityFromVMSS(resourceGroup, name string) error

RemoveSystemAssignedIdentityFromVMSS will remove the system assigned identity to a VMSS

func RemoveUserAssignedIdentityFromVM

func RemoveUserAssignedIdentityFromVM(resourceGroup, vmName, identityName string) error

RemoveUserAssignedIdentityFromVM will remove a user assigned identity to a VM

func RemoveUserAssignedIdentityFromVMSS

func RemoveUserAssignedIdentityFromVMSS(resourceGroup, vmName, identityName string) error

RemoveUserAssignedIdentityFromVMSS will remove a user assigned identity to a VMSS

func StartKubelet

func StartKubelet(resourceGroup, vmName string) error

StartKubelet will start the kubelet on a given VM

func StartVM

func StartVM(resourceGroup, vmName string) error

StartVM will start a stopped VM

func StopKubelet

func StopKubelet(resourceGroup, vmName string) error

StopKubelet will stop the kubelet on a given VM

func StopVM

func StopVM(resourceGroup, vmName string) error

StopVM will stop a running VM

func UserIdentityAssignedToVMSS

func UserIdentityAssignedToVMSS(resourceGroup, vmssName, identityName string) (bool, error)

func WaitOnReaderRoleAssignment

func WaitOnReaderRoleAssignment(subscriptionID, resourceGroup, identityName, keyvaultName string) (bool, error)

WaitOnReaderRoleAssignment will block until the assignement of 'Reader' role to an identity is executed successfully

Types

type Resource

type Resource = azure.Resource

type UserAssignedIdentity

type UserAssignedIdentity struct {
	ClientID    string `json:"clientId"`
	PrincipalID string `json:"principalId"`
}

UserAssignedIdentity is used to parse user assigned identity data from 'az vm identity show'

type VMIdentity

type VMIdentity struct {
	PrincipalID            string           `json:"principalId"`
	TenantID               string           `json:"tenantId"`
	Type                   string           `json:"type"`
	UserAssignedIdentities *json.RawMessage `json:"userAssignedIdentities"`
}

VMIdentity is used to parse system assigned identity data from 'az vm identity show'

Jump to

Keyboard shortcuts

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