Documentation ¶
Index ¶
- Constants
- Variables
- func LoadBalancerPorts(lb *armnetwork.LoadBalancer) (loadBalancerPorts []uint16)
- func NewAuthorizer() (*azidentity.DefaultAzureCredential, error)
- func NewAzureComputeDiscovery(opts ...DiscoveryOption) discovery.Discoverer
- func NewAzureNetworkDiscovery(opts ...DiscoveryOption) discovery.Discoverer
- func NewAzureResourceGroupDiscovery(opts ...DiscoveryOption) discovery.Discoverer
- func NewAzureStorageDiscovery(opts ...DiscoveryOption) discovery.Discoverer
- type ClientCreateFunc
- type DiscoveryOption
Constants ¶
View Source
const ( StorageComponent = "storage" ComputeComponent = "compute" NetworkComponent = "network" DefenderStorageType = "StorageAccounts" DefenderVirtualMachineType = "VirtualMachines" DataSourceTypeDisc = "Microsoft.Compute/disks" DataSourceTypeStorageAccountObject = "Microsoft.Storage/storageAccounts/blobServices" Duration30Days = time.Duration(30 * time.Hour * 24) Duration7Days = time.Duration(7 * time.Hour * 24) AES256 = "AES256" RetentionPeriod90Days = 90 )
Variables ¶
View Source
var ( ErrCouldNotAuthenticate = errors.New("could not authenticate to Azure") ErrCouldNotGetSubscriptions = errors.New("could not get azure subscription") ErrNoCredentialsConfigured = errors.New("no credentials were configured") ErrGettingNextPage = errors.New("error getting next page") ErrVaultInstanceIsEmpty = errors.New("vault and/or instance is nil") )
View Source
var ( ErrEmptyStorageAccount = errors.New("storage account is empty") ErrMissingDiskEncryptionSetID = errors.New("no disk encryption set ID was specified") ErrBackupStorageNotAvailable = errors.New("backup storages not available") )
View Source
var (
ErrEmptyVirtualMachine = errors.New("virtual machine is empty")
)
Functions ¶
func LoadBalancerPorts ¶ added in v1.3.10
func LoadBalancerPorts(lb *armnetwork.LoadBalancer) (loadBalancerPorts []uint16)
func NewAuthorizer ¶ added in v1.3.13
func NewAuthorizer() (*azidentity.DefaultAzureCredential, error)
NewAuthorizer returns the Azure credential using one of the following authentication types (in the following order):
EnvironmentCredential ManagedIdentityCredential AzureCLICredential
func NewAzureComputeDiscovery ¶ added in v1.3.3
func NewAzureComputeDiscovery(opts ...DiscoveryOption) discovery.Discoverer
func NewAzureNetworkDiscovery ¶ added in v1.3.5
func NewAzureNetworkDiscovery(opts ...DiscoveryOption) discovery.Discoverer
func NewAzureResourceGroupDiscovery ¶ added in v1.10.0
func NewAzureResourceGroupDiscovery(opts ...DiscoveryOption) discovery.Discoverer
func NewAzureStorageDiscovery ¶
func NewAzureStorageDiscovery(opts ...DiscoveryOption) discovery.Discoverer
Types ¶
type ClientCreateFunc ¶ added in v1.6.2
type ClientCreateFunc[T any] func(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*T, error)
ClientCreateFunc is a type that describes a function to create a new Azure SDK client.
type DiscoveryOption ¶ added in v1.3.3
type DiscoveryOption func(a *azureDiscovery)
func WithAuthorizer ¶ added in v1.3.3
func WithAuthorizer(authorizer azcore.TokenCredential) DiscoveryOption
func WithCloudServiceID ¶ added in v1.6.2
func WithCloudServiceID(csID string) DiscoveryOption
func WithResourceGroup ¶ added in v1.7.4
func WithResourceGroup(rg string) DiscoveryOption
WithResourceGroup is a DiscoveryOption that scopes the discovery to a specific resource group.
func WithSender ¶ added in v1.3.3
func WithSender(sender policy.Transporter) DiscoveryOption
Click to show internal directories.
Click to hide internal directories.