scanners

package
v0.0.0-...-1a5cf3a Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: MIT Imports: 82 Imported by: 0

Documentation

Overview

Copyright (c) Microsoft Corporation. Licensed under the MIT License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetScanners

func GetScanners() []azqr.IAzureScanner

GetScanners returns a list of all scanners

Types

type AdvisorResult

type AdvisorResult struct {
	RecommendationID, SubscriptionID, SubscriptionName, Type, Name, ResourceID, Category, Impact, Description string
}

AdvisorResult - Advisor result

type AdvisorScanner

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

AdvisorScanner - Advisor scanner

func (*AdvisorScanner) Init

func (s *AdvisorScanner) Init(config *azqr.ScannerConfig) error

Init - Initializes the Advisor Scanner

func (*AdvisorScanner) ListRecommendations

func (s *AdvisorScanner) ListRecommendations() ([]AdvisorResult, error)

ListRecommendations - Lists Azure Advisor recommendations.

func (*AdvisorScanner) Scan

func (s *AdvisorScanner) Scan(scan bool, config *azqr.ScannerConfig) []AdvisorResult

type ArmBatchRequest

type ArmBatchRequest struct {
	Requests []ArmBatchRequestItem `json:"requests"`
}

type ArmBatchRequestItem

type ArmBatchRequestItem struct {
	HttpMethod  string `json:"httpMethod"`
	RelativeUrl string `json:"relativeUrl"`
}

type ArmBatchResponse

type ArmBatchResponse struct {
	Responses []ArmBatchResponseItem `json:"responses"`
}

type ArmBatchResponseItem

type ArmBatchResponseItem struct {
	Content armmonitor.DiagnosticSettingsResourceCollection `json:"content"`
}

type CostResult

type CostResult struct {
	From, To time.Time
	Items    []*CostResultItem
}

CostResult - Cost result

type CostResultItem

type CostResultItem struct {
	SubscriptionID, SubscriptionName, ServiceName, Value, Currency string
}

CostResultItem - Cost result ite,

type CostScanner

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

CostScanner - Cost scanner

func (*CostScanner) Init

func (s *CostScanner) Init(config *azqr.ScannerConfig) error

Init - Initializes the Cost Scanner

func (*CostScanner) QueryCosts

func (s *CostScanner) QueryCosts() (*CostResult, error)

QueryCosts - Query Costs.

func (*CostScanner) Scan

func (s *CostScanner) Scan(scan bool, config *azqr.ScannerConfig) *CostResult

type DefenderResult

type DefenderResult struct {
	SubscriptionID, SubscriptionName, Name, Tier string
	Deprecated                                   bool
}

DefenderResult - Defender result

type DefenderScanner

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

DefenderScanner - Defender scanner

func (*DefenderScanner) Init

func (s *DefenderScanner) Init(config *azqr.ScannerConfig) error

Init - Initializes the Defender Scanner

func (*DefenderScanner) ListConfiguration

func (s *DefenderScanner) ListConfiguration() ([]DefenderResult, error)

ListConfiguration - Lists Microsoft Defender for Cloud pricing configurations in the subscription.

func (*DefenderScanner) Scan

func (s *DefenderScanner) Scan(scan bool, config *azqr.ScannerConfig) []DefenderResult

type DiagnosticSettingsScanner

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

DiagnosticSettingsScanner - scanner for diagnostic settings

func (*DiagnosticSettingsScanner) Init

Init - Initializes the DiagnosticSettingsScanner

func (*DiagnosticSettingsScanner) ListResourcesWithDiagnosticSettings

func (d *DiagnosticSettingsScanner) ListResourcesWithDiagnosticSettings(resources []*string) (map[string]bool, error)

ListResourcesWithDiagnosticSettings - Lists all resources with diagnostic settings

func (*DiagnosticSettingsScanner) Scan

func (d *DiagnosticSettingsScanner) Scan(resources []*string) map[string]bool

type PrivateEndpointScanner

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

PrivateEndpointScanner - Scanner for Private Endpoints

func (*PrivateEndpointScanner) Init

Init - Initializes the PrivateEndpointScanner

func (*PrivateEndpointScanner) ListResourcesWithPrivateEndpoints

func (s *PrivateEndpointScanner) ListResourcesWithPrivateEndpoints() (map[string]bool, error)

ListResourcesWithPrivateEndpoints - Lists all resources with private endpoints

func (*PrivateEndpointScanner) Scan

func (s *PrivateEndpointScanner) Scan(config *azqr.ScannerConfig) map[string]bool

type PublicIPScanner

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

PublicIPScanner - Scanner for Public IPs

func (*PublicIPScanner) Init

func (s *PublicIPScanner) Init(config *azqr.ScannerConfig) error

Init - Initializes the PublicIPScanner

func (*PublicIPScanner) ListPublicIPs

func (s *PublicIPScanner) ListPublicIPs() (map[string]*armnetwork.PublicIPAddress, error)

ListPublicIPs - Lists all Public IPs

func (*PublicIPScanner) Scan

func (s *PublicIPScanner) Scan(config *azqr.ScannerConfig) map[string]*armnetwork.PublicIPAddress

type ResourceScanner

type ResourceScanner struct{}

func (ResourceScanner) GetAllResources

func (sc ResourceScanner) GetAllResources(ctx context.Context, cred azcore.TokenCredential, subscriptions map[string]string, filters *azqr.Filters) []*azqr.Resource

func (ResourceScanner) GetCountPerResourceType

func (sc ResourceScanner) GetCountPerResourceType(ctx context.Context, cred azcore.TokenCredential, subscriptions map[string]string, recommendations map[string]map[string]azqr.AprlRecommendation) []azqr.ResourceTypeCount

type SubcriptionScanner

type SubcriptionScanner struct{}

func (SubcriptionScanner) ListSubscriptions

func (sc SubcriptionScanner) ListSubscriptions(ctx context.Context, cred azcore.TokenCredential, subscriptionID string, filters *azqr.Filters, options *arm.ClientOptions) map[string]string

Jump to

Keyboard shortcuts

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