Documentation ¶
Index ¶
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 * time.Hour * 24 )
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") ErrBackupStorageNotAvailable = errors.New("backup storages not available") )
View Source
var (
ErrEmptyVirtualMachine = errors.New("virtual machine is empty")
)
View Source
var (
ErrMissingDiskEncryptionSetID = errors.New("no disk encryption set ID was specified")
)
Functions ¶
func NewAuthorizer ¶
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 NewAzureDiscovery ¶
func NewAzureDiscovery(opts ...DiscoveryOption) discovery.Discoverer
Types ¶
type ClientCreateFunc ¶
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 ¶
type DiscoveryOption func(a *azureDiscovery)
func WithAuthorizer ¶
func WithAuthorizer(authorizer azcore.TokenCredential) DiscoveryOption
func WithCloudServiceID ¶
func WithCloudServiceID(csID string) DiscoveryOption
func WithResourceGroup ¶
func WithResourceGroup(rg string) DiscoveryOption
WithResourceGroup is a DiscoveryOption that scopes the discovery to a specific resource group.
func WithSender ¶
func WithSender(sender policy.Transporter) DiscoveryOption
Source Files ¶
- azure.go
- azure_clients.go
- azure_properties.go
- backup_discover.go
- backup_handle.go
- backup_properties.go
- compute_discover.go
- compute_handle.go
- compute_properties.go
- network_discover.go
- network_handle.go
- network_properties.go
- resource_group_discover.go
- resource_group_handle.go
- storage_discover.go
- storage_handle.go
- storage_properties.go
Click to show internal directories.
Click to hide internal directories.