azure

package
v0.1.54 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2025 License: GPL-3.0 Imports: 44 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Fetch bool
View Source
var SetActive bool
View Source
var ShowActive bool

Functions

func ChangeActiveSub

func ChangeActiveSub(azProfile AzureProfile)

func ChangeActiveSubscription

func ChangeActiveSubscription(subs []AzureProfileSubscription)

func CombineAllCostMeters

func CombineAllCostMeters(costDataPath string) (allCostMetersByMeterIdentifier map[string]lib.MongoDbCostItem, allCostMetersSlice []lib.MongoDbCostItem)

func CombineCostDataSlices

func CombineCostDataSlices(basePath string, saveOutput bool) (combinedSlice []lib.MongoDbCostItem)

func CombineCostExportCSVData

func CombineCostExportCSVData(dataPath string) lib.CostExportData

func CombineCostExportJSONData

func CombineCostExportJSONData(dataPath string) lib.CostExportData

func ConvertCsvDataToExcel

func ConvertCsvDataToExcel(sheetName string, inFileName string, outFileName string)

func ConvertCsvFileToExcel

func ConvertCsvFileToExcel(sheetName string, inFileName string, outFileName string)

func CostDataByInstanceId

func CostDataByInstanceId(data lib.AggregatedCostData) map[string][]lib.AggregatedCostItem

func CostDataToExcel

func CostDataToExcel(data lib.TransformedCostItemsByTenant, outFileName string)

func DeallocateAzureVm added in v0.1.15

func DeallocateAzureVm(resourceId string, mat *lib.AzureMultiAuthToken)

func DeallocateMultipleAzureVms added in v0.1.15

func DeallocateMultipleAzureVms(resourceIds []string, token *lib.AzureMultiAuthToken)

func DownloadAllBlobsInContainer

func DownloadAllBlobsInContainer(options lib.StorageAccountRequestOptions) (numFilesDownloaded int)

func DownloadAllConfiguredTenantCostExportsForMonth

func DownloadAllConfiguredTenantCostExportsForMonth(opts lib.DownloadAllConfiguredTenantCostExportsForMonthOptions, cldConfOpts *lib.CldConfigOptions)

func FlattenAggregatedCostData

func FlattenAggregatedCostData(data lib.AggregatedCostData, resources []lib.AzureResourceDetails) []lib.AzureResourceDetails

func GatherRelatedResourcesAndCostMeters

func GatherRelatedResourcesAndCostMeters(costData []lib.AggregatedCostItem, resources []lib.AzureResourceDetails, progBarNum int, progBarTotal int) (map[string][]lib.AzureResourceDetails, []lib.AzureResourceDetails)

func GenerateMonthlyCostReport

func GenerateMonthlyCostReport(outputDirectory string, outputFileName string, blobPrefix string, costExportMonth string)

Generates monthly cost report from Cost Data stored in Azure Blob Storages, exported from Azure

outputDirectory = Base directory to store downloaded data and generated Excel workbook.

Full save directory would be outputDirectory + "/cost-exports/" + lastMonth.Format("2006") + lastMonth.Format("01") + "/"

blobPrefix is the directory within the Blob Container to find files.

Full blob prefix becomes blobPrefix + "/" + lastMonth.Format("2006") + lastMonth.Format("01")

func GetAlertDataFromSearchResultsLink(linkToFilteredSearchResultsAPI string, token *lib.AzureMultiAuthToken) (alertData []map[string]any)

func GetAllGalleryImages

func GetAllGalleryImages(subscriptionId string, resourceGroup string, galleryName string, mat *lib.AzureMultiAuthToken) (images []lib.GalleryImage)

func GetAllImagesAndVersionsForAllGalleries

func GetAllImagesAndVersionsForAllGalleries(tokens lib.AllTenantTokens) (imagesWithVersions []lib.GalleryImage)

func GetAllImagesAndVersionsForGallery

func GetAllImagesAndVersionsForGallery(subscriptionId string, resourceGroup string, galleryName string, mat *lib.AzureMultiAuthToken) (imagesWithVersions []lib.GalleryImage)

func GetAllResourcesForAllConfiguredTenants

func GetAllResourcesForAllConfiguredTenants(opts *lib.GetAllResourcesForAllConfiguredTenantsOptions, tokens lib.AllTenantTokens) (allResources map[string]TenantResourceList, allResourcesSlice []lib.AzureResourceDetails)

func GetAllTenantSPTokens

func GetAllTenantSPTokens(options lib.AzureMultiAuthTokenRequestOptions, cldConfOpts *lib.CldConfigOptions) (lib.AllTenantTokens, error)

Gets a token for each tenant configured in the cld config file

Default path for config file is ~/.config/cld/cldConfig.json

First parameter passed into this function overwrites the config file path

func GetAppRegDataForAllConfiguredTenants

func GetAppRegDataForAllConfiguredTenants(outputPath string) (allAppRegistrations []EntraApplication, expiringCreds []EntraExpiringCredential)

func GetAzCliToken

func GetAzCliToken() lib.AzureMultiAuthToken

func GetAzureEnvVariables

func GetAzureEnvVariables(requiredEnvVars lib.AzureAuthRequirements) *lib.AzureAuthDetails

func GetAzureResourceSKUsForSubscription

func GetAzureResourceSKUsForSubscription(opts lib.GetAllResourcesForAllConfiguredTenantsOptions) (processedSkus []lib.AzureResourceSku)

func GetAzureVMStatus added in v0.1.15

func GetAzureVMStatus(resourceId string, mat *lib.AzureMultiAuthToken)

func GetAzureVm added in v0.1.15

func GetAzureVm(subscriptionId string, resourceGroupName string, vmName string, mat *lib.AzureMultiAuthToken)

func GetB2CUserByObjectId

func GetB2CUserByObjectId(objectId string, token *lib.AzureMultiAuthToken) (user interface{})

func GetB2CUserByUPN

func GetB2CUserByUPN(upn string, token *lib.AzureMultiAuthToken) (user interface{})

func GetCostExportCSVFileData

func GetCostExportCSVFileData(fileName string) (lib.CostExportData, error)

func GetCostExportJSONFileData

func GetCostExportJSONFileData(fileName string) (lib.CostExportData, error)

func GetGalleryImage

func GetGalleryImage(subscriptionId string, resourceGroup string, galleryName string, galleryImageName string, mat *lib.AzureMultiAuthToken) lib.GalleryImage

func GetGalleryImageVersions

func GetGalleryImageVersions(subscriptionId string, resourceGroup string, galleryName string, galleryImageName string, mat lib.AzureMultiAuthToken) (imageVersions lib.GalleryImageVersionList, imageVersionsDetailed []lib.GalleryImageVersionDetailed)

func GetLogAnalyticsToken

func GetLogAnalyticsToken() (*lib.TokenRequestResponse, error)

func GetLogAnalyticsWorkbookQuery added in v0.1.52

func GetLogAnalyticsWorkbookQuery(resourceId string, token *lib.AzureMultiAuthToken) string

func GetMultipleAzureVMStatuses added in v0.1.15

func GetMultipleAzureVMStatuses(resourceIds []string, token *lib.AzureMultiAuthToken)

func GetServicePrincipalMultiAuthToken

func GetServicePrincipalMultiAuthToken(spDetails lib.AzureMultiAuthTokenRequestOptions) (*lib.AzureMultiAuthToken, error)

func GetServicePrincipalToken

func GetServicePrincipalToken(tenantId string, matOptions lib.AzureMultiAuthTokenRequestOptions, cldConfigOpts *lib.CldConfigOptions, mut *sync.Mutex) (*lib.AzureTokenData, error)

func GetSkusWithVcpus

func GetSkusWithVcpus(resSkus []lib.AzureResourceSku) (vcpuSkus []lib.AzureVirtualMachineSku)

func GetTenantAzCred

func GetTenantAzCred(tenantName string, getWriteToken bool, cldConfOpts *lib.CldConfigOptions) (*azidentity.ClientSecretCredential, error)

func GetToken

func GetToken(tenantName string, cldConfigOpts *lib.CldConfigOptions) lib.AzureMultiAuthToken

func GetVcpuCountForAllConfiguredTenants

func GetVcpuCountForAllConfiguredTenants(
	allResources map[string]TenantResourceList,
	opts *lib.GetAllResourcesForAllConfiguredTenantsOptions,
	cfg lib.CldConfigTenants,
) (
	vmResources map[string][]lib.AzureResourceDetails,
	vmResByType map[string]map[string]lib.AzureResourceDetails,
	processedVms map[string][]lib.AzureResourceDetails,
	processedVmsSlice []lib.AzureResourceDetails,
	vCpuCountByTenant lib.VCpuCountByTenant,
	vCpuCountByTenantWithResources lib.VCpuCountByTenant,
)

func HttpGet

func HttpGet(urlString string, mat lib.AzureMultiAuthToken) ([]byte, error)

func HttpPatch

func HttpPatch(urlString string, body string, mat lib.AzureMultiAuthToken) ([]byte, []byte, error)

func HttpPost

func HttpPost(urlString string, body string, mat lib.AzureMultiAuthToken) ([]byte, []byte, error)

func HttpPut

func HttpPut(urlString string, mat lib.AzureMultiAuthToken) ([]byte, []byte, error)

func ListAllSubscriptionVnetsWithChan

func ListAllSubscriptionVnetsWithChan(subscriptionId string, mat lib.AzureMultiAuthToken, out chan<- Vnet, wg *lib.WaitGroupCount)

func ListAllTenantPIMScheduleInstances

func ListAllTenantPIMScheduleInstances(token *lib.AzureMultiAuthToken) (assignmentsSlice []RoleAssignmentScheduleInstance, eligibilitiesSlice []RoleEligibilityScheduleInstance)

func ListAllTenantPIMScheduleInstancesForAllTenants

func ListAllTenantPIMScheduleInstancesForAllTenants() (processedAssignments []RoleAssignmentScheduleInstance, processedEligibilities []RoleEligibilityScheduleInstance)

func ListAllVnetIPAddressesWithChan

func ListAllVnetIPAddressesWithChan(mat lib.AzureMultiAuthToken, vnet Vnet, publicIps chan<- IPAddressItem, privateIps chan<- IPAddressItem, wg *lib.WaitGroupCount)

func ListStorageContainerBlobs

func ListStorageContainerBlobs(options lib.StorageAccountRequestOptions, cldConfigOpts *lib.CldConfigOptions) lib.BlobList

func ListSubscriptions

func ListSubscriptions(token lib.AzureMultiAuthToken) ([]lib.FetchedSubscription, error)

Lists Azure subscriptions availabe to a given auth token

func MapVmSizeDetails

func MapVmSizeDetails(vmSize string, resourcesSkus []lib.AzureVirtualMachineSku) (mappedSku lib.AzureVirtualMachineSku)

func ProcessCostData

func ProcessCostData(data lib.AggregatedCostData) (costDataByMeterIdentifer map[string]lib.AggregatedCostItem, costDataSlice []lib.AggregatedCostItem)

func SortCostPerDay

func SortCostPerDay(costPerDay lib.CostPerDay) lib.CostPerDay

func StartAzureVm added in v0.1.15

func StartAzureVm(resourceId string, mat *lib.AzureMultiAuthToken)

func StartMultipleAzureVms added in v0.1.15

func StartMultipleAzureVms(resourceIds []string, token *lib.AzureMultiAuthToken)

func StopAzureVm added in v0.1.15

func StopAzureVm(resourceId string, mat *lib.AzureMultiAuthToken)

func StopAzureVms added in v0.1.15

func StopAzureVms(resourceIds []string, mat *lib.AzureMultiAuthToken)

func StopMultipleAzureVms added in v0.1.15

func StopMultipleAzureVms(resourceIds []string, token *lib.AzureMultiAuthToken)

func StorageBlobHttpGet

func StorageBlobHttpGet(options StorageAccountUploadBlobOptions, mat lib.AzureMultiAuthToken) ([]byte, error)

func TenantMapByDomain

func TenantMapByDomain() map[string]string

func TransformCostDataNew

func TransformCostDataNew(data lib.CostExportData, progBarNum int, progBarTotal int) lib.AggregatedCostData

func UnmarshalCostExportCSV

func UnmarshalCostExportCSV(reader *csv.Reader, v *lib.RowData, fileName string) error

func UploadBlobFromFile added in v0.1.34

func UploadBlobFromFile(fileName string, options StorageAccountUploadBlobOptions) (azblob.UploadFileResponse, error)

func UploadBlobFromString added in v0.1.34

func UploadBlobFromString(fileData string, options StorageAccountUploadBlobOptions) (azblob.UploadFileResponse, error)

Types

type AllTenantIPs

type AllTenantIPs map[string]IPAddressList

type AzureAlert added in v0.1.52

type AzureAlert struct {
	AffectedResource    string `json:"affectedResource,omitempty,omitzero" bson:"affectedResource,omitempty,omitzero"`
	AlertCreated        string `json:"alertCreated,omitempty,omitzero" bson:"alertCreated,omitempty,omitzero"`
	AlertLastModified   string `json:"alertLastModified,omitempty,omitzero" bson:"alertLastModified,omitempty,omitzero"`
	AlertLastModifiedBy string `json:"alertLastModifiedBy,omitempty,omitzero" bson:"alertLastModifiedBy,omitempty,omitzero"`
	AlertState          string `json:"alertState,omitempty,omitzero" bson:"alertState,omitempty,omitzero"`
	Description         string `json:"description,omitempty,omitzero" bson:"description,omitempty,omitzero"`
	Name                string `json:"name,omitempty,omitzero" bson:"name,omitempty,omitzero"`
	Results             string `json:"results,omitempty,omitzero" bson:"results,omitempty,omitzero"`
	Severity            string `json:"severity,omitempty,omitzero" bson:"severity,omitempty,omitzero"`
	TriageAlert         string `json:"triageAlert,omitempty,omitzero" bson:"triageAlert,omitempty,omitzero"`
	ID                  string `json:"id,omitempty,omitzero" bson:"id,omitempty,omitzero"`
	Properties          struct {
		Context struct {
			AffectedItems      string `json:"affectedItems,omitempty" bson:"affectedItems,omitempty"`
			AlertVersionNumber string `json:"alertVersionNumber,omitempty" bson:"alertVersionNumber,omitempty"`
			Category           string `json:"category,omitempty" bson:"category,omitempty"`
			Context            *struct {
				Condition struct {
					AllOf []struct {
						Dimensions []struct {
							Name  string `json:"name,omitempty,omitzero" bson:"name,omitempty,omitzero"`
							Value string `json:"value,omitempty,omitzero" bson:"value,omitempty,omitzero"`
						} `json:"dimensions,omitempty,omitzero" bson:"dimensions,omitempty,omitzero"`
						Event          any `json:"event,omitempty,omitzero" bson:"event,omitempty,omitzero"`
						FailingPeriods struct {
							MinFailingPeriodsToAlert  float64 `json:"minFailingPeriodsToAlert,omitempty,omitzero" bson:"minFailingPeriodsToAlert,omitempty,omitzero"`
							NumberOfEvaluationPeriods float64 `json:"numberOfEvaluationPeriods,omitempty,omitzero" bson:"numberOfEvaluationPeriods,omitempty,omitzero"`
						} `json:"failingPeriods,omitempty,omitzero" bson:"failingPeriods,omitempty,omitzero"`
						LinkToFilteredSearchResultsAPI string  `json:"linkToFilteredSearchResultsAPI,omitempty,omitzero" bson:"linkToFilteredSearchResultsAPI,omitempty,omitzero"`
						LinkToFilteredSearchResultsUi  string  `json:"linkToFilteredSearchResultsUI,omitempty,omitzero" bson:"linkToFilteredSearchResultsUI,omitempty,omitzero"`
						LinkToSearchResultsAPI         string  `json:"linkToSearchResultsAPI,omitempty,omitzero" bson:"linkToSearchResultsAPI,omitempty,omitzero"`
						LinkToSearchResultsUi          string  `json:"linkToSearchResultsUI,omitempty,omitzero" bson:"linkToSearchResultsUI,omitempty,omitzero"`
						MetricMeasureColumn            any     `json:"metricMeasureColumn,omitempty,omitzero" bson:"metricMeasureColumn,omitempty,omitzero"`
						MetricValue                    float64 `json:"metricValue,omitempty,omitzero" bson:"metricValue,omitempty,omitzero"`
						Operator                       string  `json:"operator,omitempty,omitzero" bson:"operator,omitempty,omitzero"`
						SearchQuery                    string  `json:"searchQuery,omitempty,omitzero" bson:"searchQuery,omitempty,omitzero"`
						TargetResourceTypes            string  `json:"targetResourceTypes,omitempty,omitzero" bson:"targetResourceTypes,omitempty,omitzero"`
						Threshold                      string  `json:"threshold,omitempty,omitzero" bson:"threshold,omitempty,omitzero"`
						TimeAggregation                string  `json:"timeAggregation,omitempty,omitzero" bson:"timeAggregation,omitempty,omitzero"`
					} `json:"allOf,omitempty,omitzero" bson:"allOf,omitempty,omitzero"`
					WindowEndTime   time.Time `json:"windowEndTime,omitempty,omitzero" bson:"windowEndTime,omitempty,omitzero"`
					WindowSize      string    `json:"windowSize,omitempty,omitzero" bson:"windowSize,omitempty,omitzero"`
					WindowStartTime time.Time `json:"windowStartTime,omitempty,omitzero" bson:"windowStartTime,omitempty,omitzero"`
				} `json:"condition,omitempty,omitzero" bson:"condition,omitempty,omitzero"`
				ConditionType     string    `json:"conditionType,omitempty,omitzero" bson:"conditionType,omitempty,omitzero"`
				Description       string    `json:"description,omitempty,omitzero" bson:"description,omitempty,omitzero"`
				ID                string    `json:"id,omitempty,omitzero" bson:"id,omitempty,omitzero"`
				Name              string    `json:"name,omitempty,omitzero" bson:"name,omitempty,omitzero"`
				PortalLink        string    `json:"portalLink,omitempty,omitzero" bson:"portalLink,omitempty,omitzero"`
				ResourceGroupName *string   `json:"resourceGroupName,omitempty,omitzero" bson:"resourceGroupName,omitempty,omitzero"`
				ResourceID        string    `json:"resourceId,omitempty,omitzero" bson:"resourceId,omitempty,omitzero"`
				ResourceName      *string   `json:"resourceName,omitempty,omitzero" bson:"resourceName,omitempty,omitzero"`
				ResourceType      *string   `json:"resourceType,omitempty,omitzero" bson:"resourceType,omitempty,omitzero"`
				Severity          string    `json:"severity,omitempty,omitzero" bson:"severity,omitempty,omitzero"`
				SubscriptionID    string    `json:"subscriptionId,omitempty,omitzero" bson:"subscriptionId,omitempty,omitzero"`
				Timestamp         time.Time `json:"timestamp,omitempty,omitzero" bson:"timestamp,omitempty,omitzero"`
			} `json:"context,omitempty" bson:"context,omitempty"`
			ExtendedInfo *struct {
				JobID              string  `json:"jobId,omitempty,omitzero" bson:"jobId,omitempty,omitzero"`
				OccurrenceCount    float64 `json:"occurrenceCount,omitempty,omitzero" bson:"occurrenceCount,omitempty,omitzero"`
				PossibleCauses     any     `json:"possibleCauses,omitempty,omitzero" bson:"possibleCauses,omitempty,omitzero"`
				RecommendedActions string  `json:"recommendedActions,omitempty,omitzero" bson:"recommendedActions,omitempty,omitzero"`
			} `json:"extendedInfo,omitempty" bson:"extendedInfo,omitempty"`
			FirstLevelContainerID  string    `json:"firstLevelContainerId,omitempty" bson:"firstLevelContainerId,omitempty"`
			FormattedSourceType    string    `json:"formattedSourceType,omitempty" bson:"formattedSourceType,omitempty"`
			LinkedResourceID       string    `json:"linkedResourceId,omitempty" bson:"linkedResourceId,omitempty"`
			LinkedResourceName     string    `json:"linkedResourceName,omitempty" bson:"linkedResourceName,omitempty"`
			Properties             *struct{} `json:"properties,omitempty,omitzero" bson:"properties,omitempty,omitzero"`
			ProtectedItemID        string    `json:"protectedItemId,omitempty" bson:"protectedItemId,omitempty"`
			SecondLevelContainerID any       `json:"secondLevelContainerId,omitempty" bson:"secondLevelContainerId,omitempty"`
			SourceID               string    `json:"sourceId,omitempty" bson:"sourceId,omitempty"`
			SourceType             string    `json:"sourceType,omitempty" bson:"sourceType,omitempty"`
			SourceVersion          string    `json:"sourceVersion,omitempty" bson:"sourceVersion,omitempty"`
			Status                 string    `json:"status,omitempty" bson:"status,omitempty"`
			Version                string    `json:"version,omitempty" bson:"version,omitempty"`
		} `json:"context,omitempty,omitzero" bson:"context,omitempty,omitzero"`
		CustomProperties *struct{} `json:"customProperties,omitempty" bson:"customProperties,omitempty"`
		Essentials       struct {
			ActionStatus struct {
				IsSuppressed bool `json:"isSuppressed,omitempty,omitzero" bson:"isSuppressed,omitempty,omitzero"`
			} `json:"actionStatus,omitempty,omitzero" bson:"actionStatus,omitempty,omitzero"`
			AlertRule            string    `json:"alertRule,omitempty" bson:"alertRule,omitempty"`
			AlertState           string    `json:"alertState,omitempty,omitzero" bson:"alertState,omitempty,omitzero"`
			Description          string    `json:"description,omitempty,omitzero" bson:"description,omitempty,omitzero"`
			IsStatefulAlert      *bool     `json:"isStatefulAlert,omitempty,omitzero" bson:"isStatefulAlert,omitempty,omitzero"`
			LastModifiedDateTime time.Time `json:"lastModifiedDateTime,omitempty,omitzero" bson:"lastModifiedDateTime,omitempty,omitzero"`
			LastModifiedUserName string    `json:"lastModifiedUserName,omitempty,omitzero" bson:"lastModifiedUserName,omitempty,omitzero"`
			MonitorCondition     string    `json:"monitorCondition,omitempty,omitzero" bson:"monitorCondition,omitempty,omitzero"`
			MonitorService       string    `json:"monitorService,omitempty,omitzero" bson:"monitorService,omitempty,omitzero"`
			Severity             string    `json:"severity,omitempty,omitzero" bson:"severity,omitempty,omitzero"`
			SignalType           string    `json:"signalType,omitempty,omitzero" bson:"signalType,omitempty,omitzero"`
			SourceCreatedID      string    `json:"sourceCreatedId,omitempty,omitzero" bson:"sourceCreatedId,omitempty,omitzero"`
			StartDateTime        time.Time `json:"startDateTime,omitempty,omitzero" bson:"startDateTime,omitempty,omitzero"`
			TargetResource       string    `json:"targetResource,omitempty,omitzero" bson:"targetResource,omitempty,omitzero"`
			TargetResourceGroup  string    `json:"targetResourceGroup,omitempty,omitzero" bson:"targetResourceGroup,omitempty,omitzero"`
			TargetResourceName   string    `json:"targetResourceName,omitempty,omitzero" bson:"targetResourceName,omitempty,omitzero"`
			TargetResourceType   string    `json:"targetResourceType,omitempty,omitzero" bson:"targetResourceType,omitempty,omitzero"`
		} `json:"essentials,omitempty,omitzero" bson:"essentials,omitempty,omitzero"`
	} `json:"properties,omitempty,omitzero" bson:"properties,omitempty,omitzero"`
}

type AzureAlertProcessed added in v0.1.52

type AzureAlertProcessed struct {
	AffectedResource               string    `json:"affectedResource,omitempty,omitzero" bson:"affectedResource,omitempty,omitzero"`
	AlertCreated                   time.Time `json:"alertCreated,omitempty,omitzero" bson:"alertCreated,omitempty,omitzero"`
	AlertLastModified              time.Time `json:"alertLastModified,omitempty,omitzero" bson:"alertLastModified,omitempty,omitzero"`
	AlertLastModifiedBy            string    `json:"alertLastModifiedBy,omitempty,omitzero" bson:"alertLastModifiedBy,omitempty,omitzero"`
	AlertState                     string    `json:"alertState,omitempty,omitzero" bson:"alertState,omitempty,omitzero"`
	Description                    string    `json:"description,omitempty,omitzero" bson:"description,omitempty,omitzero"`
	Name                           string    `json:"name,omitempty,omitzero" bson:"name,omitempty,omitzero"`
	Results                        string    `json:"results,omitempty,omitzero" bson:"results,omitempty,omitzero"`
	Severity                       string    `json:"severity,omitempty,omitzero" bson:"severity,omitempty,omitzero"`
	TriageAlert                    string    `json:"triageAlert,omitempty,omitzero" bson:"triageAlert,omitempty,omitzero"`
	ID                             string    `json:"id,omitempty,omitzero" bson:"id,omitempty,omitzero"`
	LinkToFilteredSearchResultsAPI string    `json:"linkToFilteredSearchResultsAPI,omitempty,omitzero" bson:"linkToFilteredSearchResultsAPI,omitempty,omitzero"`
	Properties                     struct {
		Context struct {
			AffectedItems      string `json:"affectedItems,omitempty" bson:"affectedItems,omitempty"`
			AlertVersionNumber string `json:"alertVersionNumber,omitempty" bson:"alertVersionNumber,omitempty"`
			Category           string `json:"category,omitempty" bson:"category,omitempty"`
			Context            *struct {
				ConditionType     string    `json:"conditionType,omitempty,omitzero" bson:"conditionType,omitempty,omitzero"`
				Description       string    `json:"description,omitempty,omitzero" bson:"description,omitempty,omitzero"`
				ID                string    `json:"id,omitempty,omitzero" bson:"id,omitempty,omitzero"`
				Name              string    `json:"name,omitempty,omitzero" bson:"name,omitempty,omitzero"`
				PortalLink        string    `json:"portalLink,omitempty,omitzero" bson:"portalLink,omitempty,omitzero"`
				ResourceGroupName *string   `json:"resourceGroupName,omitempty,omitzero" bson:"resourceGroupName,omitempty,omitzero"`
				ResourceID        string    `json:"resourceId,omitempty,omitzero" bson:"resourceId,omitempty,omitzero"`
				ResourceName      *string   `json:"resourceName,omitempty,omitzero" bson:"resourceName,omitempty,omitzero"`
				ResourceType      *string   `json:"resourceType,omitempty,omitzero" bson:"resourceType,omitempty,omitzero"`
				Severity          string    `json:"severity,omitempty,omitzero" bson:"severity,omitempty,omitzero"`
				SubscriptionID    string    `json:"subscriptionId,omitempty,omitzero" bson:"subscriptionId,omitempty,omitzero"`
				Timestamp         time.Time `json:"timestamp,omitempty,omitzero" bson:"timestamp,omitempty,omitzero"`
			} `json:"context,omitempty" bson:"context,omitempty"`
			ExtendedInfo *struct {
				JobID              string  `json:"jobId,omitempty,omitzero" bson:"jobId,omitempty,omitzero"`
				OccurrenceCount    float64 `json:"occurrenceCount,omitempty,omitzero" bson:"occurrenceCount,omitempty,omitzero"`
				PossibleCauses     any     `json:"possibleCauses,omitempty,omitzero" bson:"possibleCauses,omitempty,omitzero"`
				RecommendedActions string  `json:"recommendedActions,omitempty,omitzero" bson:"recommendedActions,omitempty,omitzero"`
			} `json:"extendedInfo,omitempty" bson:"extendedInfo,omitempty"`
			FirstLevelContainerID  string    `json:"firstLevelContainerId,omitempty" bson:"firstLevelContainerId,omitempty"`
			FormattedSourceType    string    `json:"formattedSourceType,omitempty" bson:"formattedSourceType,omitempty"`
			LinkedResourceID       string    `json:"linkedResourceId,omitempty" bson:"linkedResourceId,omitempty"`
			LinkedResourceName     string    `json:"linkedResourceName,omitempty" bson:"linkedResourceName,omitempty"`
			Properties             *struct{} `json:"properties,omitempty,omitzero" bson:"properties,omitempty,omitzero"`
			ProtectedItemID        string    `json:"protectedItemId,omitempty" bson:"protectedItemId,omitempty"`
			SecondLevelContainerID any       `json:"secondLevelContainerId,omitempty" bson:"secondLevelContainerId,omitempty"`
			SourceID               string    `json:"sourceId,omitempty" bson:"sourceId,omitempty"`
			SourceType             string    `json:"sourceType,omitempty" bson:"sourceType,omitempty"`
			SourceVersion          string    `json:"sourceVersion,omitempty" bson:"sourceVersion,omitempty"`
			Status                 string    `json:"status,omitempty" bson:"status,omitempty"`
			Version                string    `json:"version,omitempty" bson:"version,omitempty"`
		} `json:"context,omitempty,omitzero" bson:"context,omitempty,omitzero"`
		Essentials struct {
			ActionStatus struct {
				IsSuppressed bool `json:"isSuppressed,omitempty,omitzero" bson:"isSuppressed,omitempty,omitzero"`
			} `json:"actionStatus,omitempty,omitzero" bson:"actionStatus,omitempty,omitzero"`
			AlertRule            string    `json:"alertRule,omitempty" bson:"alertRule,omitempty"`
			AlertState           string    `json:"alertState,omitempty,omitzero" bson:"alertState,omitempty,omitzero"`
			Description          string    `json:"description,omitempty,omitzero" bson:"description,omitempty,omitzero"`
			IsStatefulAlert      *bool     `json:"isStatefulAlert,omitempty,omitzero" bson:"isStatefulAlert,omitempty,omitzero"`
			LastModifiedDateTime time.Time `json:"lastModifiedDateTime,omitempty,omitzero" bson:"lastModifiedDateTime,omitempty,omitzero"`
			LastModifiedUserName string    `json:"lastModifiedUserName,omitempty,omitzero" bson:"lastModifiedUserName,omitempty,omitzero"`
			MonitorCondition     string    `json:"monitorCondition,omitempty,omitzero" bson:"monitorCondition,omitempty,omitzero"`
			MonitorService       string    `json:"monitorService,omitempty,omitzero" bson:"monitorService,omitempty,omitzero"`
			Severity             string    `json:"severity,omitempty,omitzero" bson:"severity,omitempty,omitzero"`
			SignalType           string    `json:"signalType,omitempty,omitzero" bson:"signalType,omitempty,omitzero"`
			SourceCreatedID      string    `json:"sourceCreatedId,omitempty,omitzero" bson:"sourceCreatedId,omitempty,omitzero"`
			StartDateTime        time.Time `json:"startDateTime,omitempty,omitzero" bson:"startDateTime,omitempty,omitzero"`
			TargetResource       string    `json:"targetResource,omitempty,omitzero" bson:"targetResource,omitempty,omitzero"`
			TargetResourceGroup  string    `json:"targetResourceGroup,omitempty,omitzero" bson:"targetResourceGroup,omitempty,omitzero"`
			TargetResourceName   string    `json:"targetResourceName,omitempty,omitzero" bson:"targetResourceName,omitempty,omitzero"`
			TargetResourceType   string    `json:"targetResourceType,omitempty,omitzero" bson:"targetResourceType,omitempty,omitzero"`
		} `json:"essentials,omitempty,omitzero" bson:"essentials,omitempty,omitzero"`
	} `json:"properties,omitempty,omitzero" bson:"properties,omitempty,omitzero"`
	TenantName       string           `json:"tenantName,omitempty,omitzero" bson:"tenantName,omitempty,omitzero"`
	LastAzureSync    time.Time        `json:"lastAzureSync,omitempty,omitzero" bson:"lastAzureSync,omitempty,omitzero"`
	LastDatabaseSync time.Time        `json:"lastDatabaseSync,omitempty,omitzero" bson:"lastDatabaseSync,omitempty,omitzero"`
	AlertData        []map[string]any `json:"alertData,omitempty,omitzero" bson:"alertData,omitempty,omitzero"`
}

func GetAzureWorkbookAlerts added in v0.1.52

func GetAzureWorkbookAlerts(graphQuery string, token *lib.AzureMultiAuthToken) (alerts []AzureAlertProcessed)

type AzureAsyncOpUpdateResponse added in v0.1.15

type AzureAsyncOpUpdateResponse struct {
	EndTime   time.Time `json:"endTime,omitempty,omitzero" bson:"endTime,omitempty,omitzero"`
	Name      string    `json:"name,omitempty,omitzero" bson:"name,omitempty,omitzero"`
	StartTime time.Time `json:"startTime,omitempty,omitzero" bson:"startTime,omitempty,omitzero"`
	Status    string    `json:"status,omitempty,omitzero" bson:"status,omitempty,omitzero"`
}

type AzureAsyncRequestResponse added in v0.1.15

type AzureAsyncRequestResponse struct {
	AzureAsyncnotification                        []string `json:"Azure-Asyncnotification,omitempty,omitzero" bson:"Azure-Asyncnotification,omitempty,omitzero"`
	AzureAsyncoperation                           []string `json:"Azure-Asyncoperation,omitempty,omitzero" bson:"Azure-Asyncoperation,omitempty,omitzero"`
	CacheControl                                  []string `json:"Cache-Control,omitempty,omitzero" bson:"Cache-Control,omitempty,omitzero"`
	ContentLength                                 []string `json:"Content-Length,omitempty,omitzero" bson:"Content-Length,omitempty,omitzero"`
	Date                                          []string `json:"Date,omitempty,omitzero" bson:"Date,omitempty,omitzero"`
	Expires                                       []string `json:"Expires,omitempty,omitzero" bson:"Expires,omitempty,omitzero"`
	Location                                      []string `json:"Location,omitempty,omitzero" bson:"Location,omitempty,omitzero"`
	Pragma                                        []string `json:"Pragma,omitempty,omitzero" bson:"Pragma,omitempty,omitzero"`
	StrictTransportSecurity                       []string `json:"Strict-Transport-Security,omitempty,omitzero" bson:"Strict-Transport-Security,omitempty,omitzero"`
	XCache                                        []string `json:"X-Cache,omitempty,omitzero" bson:"X-Cache,omitempty,omitzero"`
	XContentTypeOptions                           []string `json:"X-Content-Type-Options,omitempty,omitzero" bson:"X-Content-Type-Options,omitempty,omitzero"`
	XMsCorrelationRequestID                       []string `json:"X-Ms-Correlation-Request-Id,omitempty,omitzero" bson:"X-Ms-Correlation-Request-Id,omitempty,omitzero"`
	XMsRatelimitRemainingResource                 []string `json:"X-Ms-Ratelimit-Remaining-Resource,omitempty,omitzero" bson:"X-Ms-Ratelimit-Remaining-Resource,omitempty,omitzero"`
	XMsRatelimitRemainingSubscriptionGlobalWrites []string `` /* 155-byte string literal not displayed */
	XMsRatelimitRemainingSubscriptionWrites       []string `` /* 141-byte string literal not displayed */
	XMsRequestID                                  []string `json:"X-Ms-Request-Id,omitempty,omitzero" bson:"X-Ms-Request-Id,omitempty,omitzero"`
	XMsRoutingRequestID                           []string `json:"X-Ms-Routing-Request-Id,omitempty,omitzero" bson:"X-Ms-Routing-Request-Id,omitempty,omitzero"`
	XMsedgeRef                                    []string `json:"X-Msedge-Ref,omitempty,omitzero" bson:"X-Msedge-Ref,omitempty,omitzero"`
}

type AzureB2CUser

type AzureB2CUser struct {
	AccountEnabled                                           bool      `json:"accountEnabled,omitempty,omitzero" bson:"accountEnabled,omitempty,omitzero"`
	CreatedDateTime                                          time.Time `json:"createdDateTime,omitempty,omitzero" bson:"createdDateTime,omitempty,omitzero"`
	CreationType                                             string    `json:"creationType,omitempty,omitzero" bson:"creationType,omitempty,omitzero"`
	DisplayName                                              string    `json:"displayName,omitempty,omitzero" bson:"displayName,omitempty,omitzero"`
	Extension4e4fa41c1d3246639764b37ff949534dLastLogonTime   time.Time `` /* 165-byte string literal not displayed */
	Extension4e4fa41c1d3246639764b37ff949534dPasswordResetOn time.Time `` /* 169-byte string literal not displayed */
	ID                                                       string    `json:"id,omitempty,omitzero" bson:"id,omitempty,omitzero"`
	UserPrincipalName                                        string    `json:"userPrincipalName,omitempty,omitzero" bson:"userPrincipalName,omitempty,omitzero"`
}

type AzureCostData

type AzureCostData map[string]AzureTenantCostData

type AzureCostDataMeter

type AzureCostDataMeter map[string]lib.AggregatedCostItem

type AzureProfile

type AzureProfile struct {
	InstallationID string                     `json:"installationId"`
	Subscriptions  []AzureProfileSubscription `json:"subscriptions"`
}

func GetCliSubs

func GetCliSubs() (AzureProfile, []byte)

func (*AzureProfile) PrintSubs

func (s *AzureProfile) PrintSubs()

func (*AzureProfile) Sort

func (s *AzureProfile) Sort()

type AzureProfileSubscription

type AzureProfileSubscription struct {
	EnvironmentName  string `json:"environmentName"`
	HomeTenantID     string `json:"homeTenantId,omitempty"`
	ID               string `json:"id"`
	IsDefault        bool   `json:"isDefault"`
	ManagedByTenants []struct {
		TenantID string `json:"tenantId"`
	} `json:"managedByTenants"`
	Name                string `json:"name"`
	State               string `json:"state"`
	TenantDefaultDomain string `json:"tenantDefaultDomain,omitempty"`
	TenantDisplayName   string `json:"tenantDisplayName,omitempty"`
	TenantMappedName    string `json:"tenantMappedName,omitempty"`
	TenantID            string `json:"tenantId"`
	User                struct {
		Name string `json:"name"`
		Type string `json:"type"`
	} `json:"user"`
}

func GetActiveCliSub

func GetActiveCliSub() (*AzureProfileSubscription, error)

type AzureProfileTenant

type AzureProfileTenant struct {
	TenantDefaultDomain string `json:"tenantDefaultDomain,omitempty"`
	TenantDisplayName   string `json:"tenantDisplayName,omitempty"`
	TenantID            string `json:"tenantId"`
	TenantMappedName    string `json:"tenantMappedName,omitempty"`
}

type AzureRequestOptions

type AzureRequestOptions struct {
	SubscriptionId    string
	ResourceId        string
	ResourceGroupName string
	ResourceName      string
	TenantId          string
	TenantName        string

	ConfigFilePath string
}

type AzureResourceIPConfig added in v0.1.17

type AzureResourceIPConfig struct {
	ID               string    `json:"id,omitempty" bson:"id,omitempty"`
	Name             string    `json:"name,omitempty" bson:"name,omitempty"`
	Type             string    `json:"type,omitempty" bson:"type,omitempty"`
	TenantName       string    `json:"tenantName,omitempty" bson:"tenantName,omitempty"`
	TenantId         string    `json:"tenantId,omitempty" bson:"tenantId,omitempty"`
	SubscriptionName string    `json:"subscriptionName,omitempty" bson:"subscriptionName,omitempty"`
	SubscriptionId   string    `json:"subscriptionId,omitempty" bson:"subscriptionId,omitempty"`
	PrivateIPs       []string  `json:"privateIps,omitempty" bson:"privateIps,omitempty"`
	PublicIPs        []string  `json:"publicIps,omitempty" bson:"publicIps,omitempty"`
	SubnetIds        []string  `json:"snetIds,omitempty" bson:"snetIds,omitempty"`
	AttachedVmId     string    `json:"attachedVmId,omitempty" bson:"attachedVmId,omitempty"`
	AttachedVmName   string    `json:"attachedVmName,omitempty" bson:"attachedVmName,omitempty"`
	LastAzureSync    time.Time `json:"lastAzureSync,omitempty" bson:"lastAzureSync,omitempty"`
	LastDBSync       time.Time `json:"lastDatabaseSync,omitempty" bson:"lastDatabaseSync,omitempty"`
}

func GetAllTenantIpAddresses added in v0.1.17

func GetAllTenantIpAddresses(outputFile string, token *lib.AzureMultiAuthToken) []AzureResourceIPConfig

func GetAllVMIpAddrForAllConfiguredTenants added in v0.1.26

func GetAllVMIpAddrForAllConfiguredTenants(opts *lib.GetAllResourcesForAllConfiguredTenantsOptions, tokens lib.AllTenantTokens) (allResourceIPs []AzureResourceIPConfig)

type AzureTenantCostData

type AzureTenantCostData map[string]AzureCostDataMeter

type B2CUser added in v0.1.51

type B2CUser struct {
	AccountEnabled         bool `json:"accountEnabled"`
	AgeGroup               any  `json:"ageGroup"`
	AlternativeSecurityIds []struct {
		IdentityProvider any     `json:"identityProvider"`
		Key              string  `json:"key"`
		Type             float64 `json:"type"`
	} `json:"alternativeSecurityIds"`
	AssignedLicenses  []any `json:"assignedLicenses"`
	AssignedPlans     []any `json:"assignedPlans"`
	AuthorizationInfo struct {
		CertificateUserIds []any `json:"certificateUserIds"`
	} `json:"authorizationInfo"`
	BusinessPhones                 []any `json:"businessPhones"`
	City                           any   `json:"city"`
	CloudRealtimeCommunicationInfo struct {
		CloudMsRtcOwnerUrn          any   `json:"cloudMSRtcOwnerUrn"`
		CloudMsRtcPolicyAssignments []any `json:"cloudMSRtcPolicyAssignments"`
		CloudMsRtcPool              any   `json:"cloudMSRtcPool"`
		CloudMsRtcServiceAttributes any   `json:"cloudMSRtcServiceAttributes"`
		CloudSipLine                any   `json:"cloudSipLine"`
		CloudSipProxyAddress        any   `json:"cloudSipProxyAddress"`
		IsSipEnabled                any   `json:"isSipEnabled"`
	} `json:"cloudRealtimeCommunicationInfo"`
	CompanyName                                              any       `json:"companyName"`
	ConsentProvidedForMinor                                  any       `json:"consentProvidedForMinor"`
	Country                                                  any       `json:"country"`
	CreatedDateTime                                          time.Time `json:"createdDateTime"`
	CreationType                                             *string   `json:"creationType"`
	DeletedDateTime                                          any       `json:"deletedDateTime"`
	Department                                               any       `json:"department"`
	DeviceKeys                                               []any     `json:"deviceKeys"`
	DisplayName                                              string    `json:"displayName"`
	EmployeeHireDate                                         any       `json:"employeeHireDate"`
	EmployeeID                                               any       `json:"employeeId"`
	EmployeeLeaveDateTime                                    any       `json:"employeeLeaveDateTime"`
	EmployeeOrgData                                          any       `json:"employeeOrgData"`
	EmployeeType                                             any       `json:"employeeType"`
	ExtensionF0e6c33abb094f2596ccacdf3a141aafLastLogonTime   time.Time `json:"extension_f0e6c33abb094f2596ccacdf3a141aaf_lastLogonTime,omitempty"`
	ExtensionF0e6c33abb094f2596ccacdf3a141aafPasswordResetOn time.Time `json:"extension_f0e6c33abb094f2596ccacdf3a141aaf_passwordResetOn,omitempty"`
	ExternalUserConvertedOn                                  any       `json:"externalUserConvertedOn"`
	ExternalUserInformation                                  struct {
		AcceptedAsMail   *string    `json:"acceptedAsMail"`
		AcceptedDateTime *time.Time `json:"acceptedDateTime"`
		InviteReplyUrls  []any      `json:"inviteReplyUrls"`
		InviteResources  []any      `json:"inviteResources"`
		InvitedAsMail    *string    `json:"invitedAsMail"`
		InvitedDateTime  time.Time  `json:"invitedDateTime"`
		SignInNames      []string   `json:"signInNames"`
	} `json:"externalUserInformation"`
	ExternalUserState               *string    `json:"externalUserState"`
	ExternalUserStateChangeDateTime *time.Time `json:"externalUserStateChangeDateTime"`
	FaxNumber                       any        `json:"faxNumber"`
	GivenName                       *string    `json:"givenName"`
	ID                              string     `json:"id"`
	Identities                      []struct {
		Issuer           string  `json:"issuer"`
		IssuerAssignedID *string `json:"issuerAssignedId"`
		SignInType       string  `json:"signInType"`
	} `json:"identities"`
	ImAddresses                   []any   `json:"imAddresses"`
	InfoCatalogs                  []any   `json:"infoCatalogs"`
	IsLicenseReconciliationNeeded bool    `json:"isLicenseReconciliationNeeded"`
	IsManagementRestricted        any     `json:"isManagementRestricted"`
	IsResourceAccount             any     `json:"isResourceAccount"`
	JobTitle                      any     `json:"jobTitle"`
	LegalAgeGroupClassification   any     `json:"legalAgeGroupClassification"`
	Mail                          *string `json:"mail"`
	MailNickname                  string  `json:"mailNickname"`
	MobilePhone                   any     `json:"mobilePhone"`
	NetID                         string  `json:"netId"`
	OfficeLocation                any     `json:"officeLocation"`
	OnPremisesDistinguishedName   any     `json:"onPremisesDistinguishedName"`
	OnPremisesDomainName          any     `json:"onPremisesDomainName"`
	OnPremisesExtensionAttributes struct {
		ExtensionAttribute1  any `json:"extensionAttribute1"`
		ExtensionAttribute10 any `json:"extensionAttribute10"`
		ExtensionAttribute11 any `json:"extensionAttribute11"`
		ExtensionAttribute12 any `json:"extensionAttribute12"`
		ExtensionAttribute13 any `json:"extensionAttribute13"`
		ExtensionAttribute14 any `json:"extensionAttribute14"`
		ExtensionAttribute15 any `json:"extensionAttribute15"`
		ExtensionAttribute2  any `json:"extensionAttribute2"`
		ExtensionAttribute3  any `json:"extensionAttribute3"`
		ExtensionAttribute4  any `json:"extensionAttribute4"`
		ExtensionAttribute5  any `json:"extensionAttribute5"`
		ExtensionAttribute6  any `json:"extensionAttribute6"`
		ExtensionAttribute7  any `json:"extensionAttribute7"`
		ExtensionAttribute8  any `json:"extensionAttribute8"`
		ExtensionAttribute9  any `json:"extensionAttribute9"`
	} `json:"onPremisesExtensionAttributes"`
	OnPremisesImmutableID        any   `json:"onPremisesImmutableId"`
	OnPremisesLastSyncDateTime   any   `json:"onPremisesLastSyncDateTime"`
	OnPremisesObjectIdentifier   any   `json:"onPremisesObjectIdentifier"`
	OnPremisesProvisioningErrors []any `json:"onPremisesProvisioningErrors"`
	OnPremisesSamAccountName     any   `json:"onPremisesSamAccountName"`
	OnPremisesSecurityIdentifier any   `json:"onPremisesSecurityIdentifier"`
	OnPremisesSipInfo            struct {
		IsSipEnabled          bool `json:"isSipEnabled"`
		SipDeploymentLocation any  `json:"sipDeploymentLocation"`
		SipPrimaryAddress     any  `json:"sipPrimaryAddress"`
	} `json:"onPremisesSipInfo"`
	OnPremisesSyncEnabled       any      `json:"onPremisesSyncEnabled"`
	OnPremisesUserPrincipalName any      `json:"onPremisesUserPrincipalName"`
	OtherMails                  []string `json:"otherMails"`
	PasswordPolicies            *string  `json:"passwordPolicies"`
	PasswordProfile             *struct {
		ForceChangePasswordNextSignIn        bool `json:"forceChangePasswordNextSignIn"`
		ForceChangePasswordNextSignInWithMfa bool `json:"forceChangePasswordNextSignInWithMfa"`
		Password                             any  `json:"password"`
	} `json:"passwordProfile"`
	PortalSetting                   any       `json:"portalSetting"`
	PostalCode                      any       `json:"postalCode"`
	PreferredDataLocation           any       `json:"preferredDataLocation"`
	PreferredLanguage               any       `json:"preferredLanguage"`
	ProvisionedPlans                []any     `json:"provisionedPlans"`
	ProxyAddresses                  []string  `json:"proxyAddresses"`
	RefreshTokensValidFromDateTime  time.Time `json:"refreshTokensValidFromDateTime"`
	ReleaseTrack                    any       `json:"releaseTrack"`
	SecurityIdentifier              string    `json:"securityIdentifier"`
	ServiceProvisioningErrors       []any     `json:"serviceProvisioningErrors"`
	ShowInAddressList               *bool     `json:"showInAddressList"`
	SignInSessionsValidFromDateTime time.Time `json:"signInSessionsValidFromDateTime"`
	State                           any       `json:"state"`
	StreetAddress                   any       `json:"streetAddress"`
	Surname                         *string   `json:"surname"`
	UsageLocation                   any       `json:"usageLocation"`
	UserPrincipalName               string    `json:"userPrincipalName"`
	UserType                        string    `json:"userType"`
}

type B2CUserMinimal added in v0.1.51

type B2CUserMinimal struct {
	AccountEnabled                                           bool      `json:"accountEnabled,omitempty,omitzero" bson:"accountEnabled,omitempty,omitzero"`
	AccountLocked                                            bool      `json:"accountLocked,omitempty,omitzero" bson:"accountLocked,omitempty,omitzero"`
	CreatedDateTime                                          time.Time `json:"createdDateTime,omitempty,omitzero" bson:"createdDateTime,omitempty,omitzero"`
	CreationType                                             *string   `json:"creationType,omitempty,omitzero" bson:"creationType,omitempty,omitzero"`
	DisplayName                                              string    `json:"displayName,omitempty,omitzero" bson:"displayName,omitempty,omitzero"`
	Extension4e4fa41c1d3246639764b37ff949534dLastLogonTime   time.Time `` /* 147-byte string literal not displayed */
	Extension4e4fa41c1d3246639764b37ff949534dPasswordResetOn time.Time `` /* 151-byte string literal not displayed */
	ExternalUserInformation                                  struct {
		AcceptedAsMail   any       `json:"acceptedAsMail,omitempty,omitzero" bson:"acceptedAsMail,omitempty,omitzero"`
		AcceptedDateTime any       `json:"acceptedDateTime,omitempty,omitzero" bson:"acceptedDateTime,omitempty,omitzero"`
		InviteReplyUrls  []any     `json:"inviteReplyUrls,omitempty,omitzero" bson:"inviteReplyUrls,omitempty,omitzero"`
		InviteResources  []any     `json:"inviteResources,omitempty,omitzero" bson:"inviteResources,omitempty,omitzero"`
		InvitedAsMail    any       `json:"invitedAsMail,omitempty,omitzero" bson:"invitedAsMail,omitempty,omitzero"`
		InvitedDateTime  time.Time `json:"invitedDateTime,omitempty,omitzero" bson:"invitedDateTime,omitempty,omitzero"`
		SignInNames      []string  `json:"signInNames,omitempty,omitzero" bson:"signInNames,omitempty,omitzero"`
	} `json:"externalUserInformation,omitempty,omitzero" bson:"externalUserInformation,omitempty,omitzero"`
	ID         string `json:"id,omitempty,omitzero" bson:"id,omitempty,omitzero"`
	Identities []struct {
		Issuer           string  `json:"issuer,omitempty,omitzero" bson:"issuer,omitempty,omitzero"`
		IssuerAssignedID *string `json:"issuerAssignedId,omitempty,omitzero" bson:"issuerAssignedId,omitempty,omitzero"`
		SignInType       string  `json:"signInType,omitempty,omitzero" bson:"signInType,omitempty,omitzero"`
	} `json:"identities,omitempty,omitzero" bson:"identities,omitempty,omitzero"`
	MailNickname     string `json:"mailNickname,omitempty,omitzero" bson:"mailNickname,omitempty,omitzero"`
	PasswordPolicies any    `json:"passwordPolicies,omitempty,omitzero" bson:"passwordPolicies,omitempty,omitzero"`
	PasswordProfile  *struct {
		ForceChangePasswordNextSignIn        bool `json:"forceChangePasswordNextSignIn,omitempty,omitzero" bson:"forceChangePasswordNextSignIn,omitempty,omitzero"`
		ForceChangePasswordNextSignInWithMfa bool `json:"forceChangePasswordNextSignInWithMfa,omitempty,omitzero" bson:"forceChangePasswordNextSignInWithMfa,omitempty,omitzero"`
		Password                             any  `json:"password,omitempty,omitzero" bson:"password,omitempty,omitzero"`
	} `json:"passwordProfile,omitempty,omitzero" bson:"passwordProfile,omitempty,omitzero"`
	RefreshTokensValidFromDateTime  time.Time `json:"refreshTokensValidFromDateTime,omitempty,omitzero" bson:"refreshTokensValidFromDateTime,omitempty,omitzero"`
	SecurityIdentifier              string    `json:"securityIdentifier,omitempty,omitzero" bson:"securityIdentifier,omitempty,omitzero"`
	SignInSessionsValidFromDateTime time.Time `json:"signInSessionsValidFromDateTime,omitempty,omitzero" bson:"signInSessionsValidFromDateTime,omitempty,omitzero"`
	UserPrincipalName               string    `json:"userPrincipalName,omitempty,omitzero" bson:"userPrincipalName,omitempty,omitzero"`
	UserType                        string    `json:"userType,omitempty,omitzero" bson:"userType,omitempty,omitzero"`
	B2CTenant                       string    `json:"b2cTenant,omitempty,omitzero" bson:"b2cTenant,omitempty,omitzero"`
	LastDBSync                      time.Time `json:"lastDBSync,omitempty,omitzero" bson:"lastDBSync,omitempty,omitzero"`
}

func GetAllB2CTenantUsers added in v0.1.51

func GetAllB2CTenantUsers() (users []B2CUserMinimal)

type CheckStorageAccountTlsVersionsResponse added in v0.1.29

type CheckStorageAccountTlsVersionsResponse struct {
	Count           float64                    `json:"count,omitempty,omitzero" bson:"count,omitempty,omitzero"`
	Data            []StorageAccountTlsVersion `json:"data,omitempty,omitzero" bson:"data,omitempty,omitzero"`
	Facets          []any                      `json:"facets,omitempty,omitzero" bson:"facets,omitempty,omitzero"`
	ResultTruncated string                     `json:"resultTruncated,omitempty,omitzero" bson:"resultTruncated,omitempty,omitzero"`
	TotalRecords    float64                    `json:"totalRecords,omitempty,omitzero" bson:"totalRecords,omitempty,omitzero"`
	SkipToken       string                     `json:"$skipToken,omitempty,omitzero" bson:"$skipToken,omitempty,omitzero"`
}

type CombinedFlowLogs

type CombinedFlowLogs struct {
	NsgFlowLogs []NsgFlowLogRecord
	FileCount   int
}

func CombineLogFileRecords

func CombineLogFileRecords(dataPath string) CombinedFlowLogs

func (*CombinedFlowLogs) FilterIp

func (r *CombinedFlowLogs) FilterIp(filter string, filterDirection string)

type ContainerRegisryResponse

type ContainerRegisryResponse struct {
	Value []ContainerRegistry
}

type ContainerRegistriesPerSub

type ContainerRegistriesPerSub struct {
	SubscriptionName    string
	SubscriptionID      string
	TenantName          string
	TenantID            string
	NumACRs             int
	ContainerRegistries []ContainerRegistry
}

type ContainerRegistry

type ContainerRegistry struct {
	ID         string `json:"id"`
	Location   string `json:"location"`
	Name       string `json:"name"`
	Properties struct {
		AdminUserEnabled      bool      `json:"adminUserEnabled"`
		AnonymousPullEnabled  bool      `json:"anonymousPullEnabled"`
		CreationDate          time.Time `json:"creationDate"`
		DataEndpointEnabled   bool      `json:"dataEndpointEnabled"`
		DataEndpointHostNames []string  `json:"dataEndpointHostNames"`
		Encryption            struct {
			Status string `json:"status"`
		} `json:"encryption"`
		LoginServer              string `json:"loginServer"`
		NetworkRuleBypassOptions string `json:"networkRuleBypassOptions"`
		NetworkRuleSet           struct {
			DefaultAction string `json:"defaultAction"`
			IpRules       []any  `json:"ipRules"`
		} `json:"networkRuleSet"`
		Policies struct {
			AzureAdAuthenticationAsArmPolicy struct {
				Status string `json:"status"`
			} `json:"azureADAuthenticationAsArmPolicy"`
			ExportPolicy struct {
				Status string `json:"status"`
			} `json:"exportPolicy"`
			QuarantinePolicy struct {
				Status string `json:"status"`
			} `json:"quarantinePolicy"`
			RetentionPolicy struct {
				Days            int       `json:"days"`
				LastUpdatedTime time.Time `json:"lastUpdatedTime"`
				Status          string    `json:"status"`
			} `json:"retentionPolicy"`
			SoftDeletePolicy struct {
				LastUpdatedTime time.Time `json:"lastUpdatedTime"`
				RetentionDays   int       `json:"retentionDays"`
				Status          string    `json:"status"`
			} `json:"softDeletePolicy"`
			TrustPolicy struct {
				Status string `json:"status"`
				Type   string `json:"type"`
			} `json:"trustPolicy"`
		} `json:"policies"`
		PrivateEndpointConnections []struct {
			ID         string `json:"id"`
			Name       string `json:"name"`
			Properties struct {
				PrivateEndpoint struct {
					ID string `json:"id"`
				} `json:"privateEndpoint"`
				PrivateLinkServiceConnectionState struct {
					Description string `json:"description"`
					Status      string `json:"status"`
				} `json:"privateLinkServiceConnectionState"`
				ProvisioningState string `json:"provisioningState"`
			} `json:"properties"`
			Type string `json:"type"`
		} `json:"privateEndpointConnections"`
		ProvisioningState   string `json:"provisioningState"`
		PublicNetworkAccess string `json:"publicNetworkAccess"`
		ZoneRedundancy      string `json:"zoneRedundancy"`
	} `json:"properties"`
	Sku struct {
		Name string `json:"name"`
		Tier string `json:"tier"`
	} `json:"sku"`
	SystemData struct {
		CreatedAt          time.Time `json:"createdAt"`
		CreatedBy          string    `json:"createdBy"`
		CreatedByType      string    `json:"createdByType"`
		LastModifiedAt     time.Time `json:"lastModifiedAt"`
		LastModifiedBy     string    `json:"lastModifiedBy"`
		LastModifiedByType string    `json:"lastModifiedByType"`
	} `json:"systemData"`
	Tags struct{} `json:"tags"`
	Type string   `json:"type"`
}

type EntraApplication

type EntraApplication struct {
	AddIns *[]struct {
		ID         string `json:"id,omitempty" bson:"id,omitempty"`
		Properties []struct {
			Key   string `json:"key,omitempty" bson:"key,omitempty"`
			Value string `json:"value,omitempty" bson:"value,omitempty"`
		} `json:"properties,omitempty" bson:"properties,omitempty"`
		Type string `json:"type,omitempty" bson:"type,omitempty"`
	} `json:"addIns,omitempty" bson:"addIns,omitempty"`
	API *struct {
		AcceptMappedClaims      *bool     `json:"acceptMappedClaims,omitempty" bson:"acceptMappedClaims,omitempty"`
		KnownClientApplications *[]string `json:"knownClientApplications,omitempty" bson:"knownClientApplications,omitempty"`
		Oauth2PermissionScopes  *[]struct {
			AdminConsentDescription string `json:"adminConsentDescription,omitempty" bson:"adminConsentDescription,omitempty"`
			AdminConsentDisplayName string `json:"adminConsentDisplayName,omitempty" bson:"adminConsentDisplayName,omitempty"`
			ID                      string `json:"id,omitempty" bson:"id,omitempty"`
			IsEnabled               bool   `json:"isEnabled,omitempty" bson:"isEnabled,omitempty"`
			IsPrivate               bool   `json:"isPrivate,omitempty" bson:"isPrivate,omitempty"`
			Type                    string `json:"type,omitempty" bson:"type,omitempty"`
			UserConsentDescription  string `json:"userConsentDescription,omitempty" bson:"userConsentDescription,omitempty"`
			UserConsentDisplayName  string `json:"userConsentDisplayName,omitempty" bson:"userConsentDisplayName,omitempty"`
			Value                   string `json:"value,omitempty" bson:"value,omitempty"`
		} `json:"oauth2PermissionScopes,omitempty" bson:"oauth2PermissionScopes,omitempty"`
		PreAuthorizedApplications *[]struct {
			AppID         string    `json:"appId,omitempty" bson:"appId,omitempty"`
			PermissionIds *[]string `json:"permissionIds,omitempty" bson:"permissionIds,omitempty"`
		} `json:"preAuthorizedApplications,omitempty" bson:"preAuthorizedApplications,omitempty"`
		RequestedAccessTokenVersion *float64 `json:"requestedAccessTokenVersion,omitempty" bson:"requestedAccessTokenVersion,omitempty"`
		TokenEncryptionSetting      *struct {
			Audience              any `json:"audience,omitempty" bson:"audience,omitempty"`
			AutomatedTokenVersion *struct {
				Available []any `json:"available,omitempty" bson:"available,omitempty"`
				Current   any   `json:"current,omitempty" bson:"current,omitempty"`
			} `json:"automatedTokenVersion,omitempty" bson:"automatedTokenVersion,omitempty"`
			Scheme any `json:"scheme,omitempty" bson:"scheme,omitempty"`
		} `json:"tokenEncryptionSetting,omitempty" bson:"tokenEncryptionSetting,omitempty"`
	} `json:"api,omitempty" bson:"api,omitempty"`
	AppCapabilities []any  `json:"appCapabilities,omitempty" bson:"appCapabilities,omitempty"`
	AppID           string `json:"appId,omitempty" bson:"appId,omitempty"`
	AppRoles        *[]struct {
		AllowedMemberTypes         []string `json:"allowedMemberTypes,omitempty" bson:"allowedMemberTypes,omitempty"`
		Description                string   `json:"description,omitempty" bson:"description,omitempty"`
		DisplayName                string   `json:"displayName,omitempty" bson:"displayName,omitempty"`
		ID                         string   `json:"id,omitempty" bson:"id,omitempty"`
		IsEnabled                  bool     `json:"isEnabled,omitempty" bson:"isEnabled,omitempty"`
		IsPreAuthorizationRequired bool     `json:"isPreAuthorizationRequired,omitempty" bson:"isPreAuthorizationRequired,omitempty"`
		IsPrivate                  bool     `json:"isPrivate,omitempty" bson:"isPrivate,omitempty"`
		Origin                     string   `json:"origin,omitempty" bson:"origin,omitempty"`
		Value                      *string  `json:"value,omitempty" bson:"value,omitempty"`
	} `json:"appRoles,omitempty" bson:"appRoles,omitempty"`
	ApplicationTemplateID     *string   `json:"applicationTemplateId,omitempty" bson:"applicationTemplateId,omitempty"`
	BillingInformation        any       `json:"billingInformation,omitempty" bson:"billingInformation,omitempty"`
	Certification             any       `json:"certification,omitempty" bson:"certification,omitempty"`
	CreatedDateTime           time.Time `json:"createdDateTime,omitempty" bson:"createdDateTime,omitempty"`
	DefaultRedirectURI        *string   `json:"defaultRedirectUri,omitempty" bson:"defaultRedirectUri,omitempty"`
	DeletedDateTime           any       `json:"deletedDateTime,omitempty" bson:"deletedDateTime,omitempty"`
	Description               string    `json:"description,omitempty" bson:"description,omitempty"`
	DisabledByMicrosoftStatus any       `json:"disabledByMicrosoftStatus,omitempty" bson:"disabledByMicrosoftStatus,omitempty"`
	DisplayName               string    `json:"displayName,omitempty" bson:"displayName,omitempty"`
	GroupMembershipClaims     *string   `json:"groupMembershipClaims,omitempty" bson:"groupMembershipClaims,omitempty"`
	ID                        string    `json:"id,omitempty" bson:"objectId,omitempty"`
	IdentifierUris            []string  `json:"identifierUris,omitempty" bson:"identifierUris,omitempty"`
	Info                      *struct {
		LogoURL             any `json:"logoUrl,omitempty" bson:"logoUrl,omitempty"`
		MarketingURL        any `json:"marketingUrl,omitempty" bson:"marketingUrl,omitempty"`
		PrivacyStatementURL any `json:"privacyStatementUrl,omitempty" bson:"privacyStatementUrl,omitempty"`
		SupportURL          any `json:"supportUrl,omitempty" bson:"supportUrl,omitempty"`
		TermsOfServiceURL   any `json:"termsOfServiceUrl,omitempty" bson:"termsOfServiceUrl,omitempty"`
	} `json:"info,omitempty" bson:"info,omitempty"`
	IsAuthorizationServiceEnabled bool  `json:"isAuthorizationServiceEnabled,omitempty" bson:"isAuthorizationServiceEnabled,omitempty"`
	IsDeviceOnlyAuthSupported     *bool `json:"isDeviceOnlyAuthSupported,omitempty" bson:"isDeviceOnlyAuthSupported,omitempty"`
	IsDisabled                    any   `json:"isDisabled,omitempty" bson:"isDisabled,omitempty"`
	IsFallbackPublicClient        *bool `json:"isFallbackPublicClient,omitempty" bson:"isFallbackPublicClient,omitempty"`
	IsManagementRestricted        any   `json:"isManagementRestricted,omitempty" bson:"isManagementRestricted,omitempty"`
	KeyCredentials                *[]struct {
		CustomKeyIdentifier string    `json:"customKeyIdentifier,omitempty" bson:"customKeyIdentifier,omitempty"`
		DisplayName         string    `json:"displayName,omitempty" bson:"displayName,omitempty"`
		EndDateTime         time.Time `json:"endDateTime,omitempty" bson:"endDateTime,omitempty"`
		HasExtendedValue    any       `json:"hasExtendedValue,omitempty" bson:"hasExtendedValue,omitempty"`
		Key                 any       `json:"key,omitempty" bson:"key,omitempty"`
		KeyID               string    `json:"keyId,omitempty" bson:"keyId,omitempty"`
		StartDateTime       time.Time `json:"startDateTime,omitempty" bson:"startDateTime,omitempty"`
		Type                string    `json:"type,omitempty" bson:"type,omitempty"`
		Usage               string    `json:"usage,omitempty" bson:"usage,omitempty"`
	} `json:"keyCredentials,omitempty" bson:"keyCredentials,omitempty"`
	MigrationStatus                 any  `json:"migrationStatus,omitempty" bson:"migrationStatus,omitempty"`
	NativeAuthenticationApisEnabled any  `json:"nativeAuthenticationApisEnabled,omitempty" bson:"nativeAuthenticationApisEnabled,omitempty"`
	Notes                           any  `json:"notes,omitempty" bson:"notes,omitempty"`
	Oauth2RequirePostResponse       bool `json:"oauth2RequirePostResponse,omitempty" bson:"oauth2RequirePostResponse,omitempty"`
	OptionalClaims                  *struct {
		AccessToken []any `json:"accessToken,omitempty" bson:"accessToken,omitempty"`
		IDToken     []any `json:"idToken,omitempty" bson:"idToken,omitempty"`
		Saml2Token  []struct {
			AdditionalProperties []any  `json:"additionalProperties,omitempty" bson:"additionalProperties,omitempty"`
			Essential            bool   `json:"essential,omitempty" bson:"essential,omitempty"`
			Name                 string `json:"name,omitempty" bson:"name,omitempty"`
			Source               any    `json:"source,omitempty" bson:"source,omitempty"`
		} `json:"saml2Token,omitempty" bson:"saml2Token,omitempty"`
	} `json:"optionalClaims,omitempty" bson:"optionalClaims,omitempty"`
	OrgRestrictions         []any `json:"orgRestrictions,omitempty" bson:"orgRestrictions,omitempty"`
	ParentalControlSettings *struct {
		CountriesBlockedForMinors []any  `json:"countriesBlockedForMinors,omitempty" bson:"countriesBlockedForMinors,omitempty"`
		LegalAgeGroupRule         string `json:"legalAgeGroupRule,omitempty" bson:"legalAgeGroupRule,omitempty"`
	} `json:"parentalControlSettings,omitempty" bson:"parentalControlSettings,omitempty"`
	PasswordCredentials *[]struct {
		CustomKeyIdentifier string    `json:"customKeyIdentifier,omitempty" bson:"customKeyIdentifier,omitempty"`
		DisplayName         string    `json:"displayName,omitempty" bson:"displayName,omitempty"`
		EndDateTime         time.Time `json:"endDateTime,omitempty" bson:"endDateTime,omitempty"`
		Hint                string    `json:"hint,omitempty" bson:"hint,omitempty"`
		KeyID               string    `json:"keyId,omitempty" bson:"keyId,omitempty"`
		SecretText          any       `json:"secretText,omitempty" bson:"secretText,omitempty"`
		StartDateTime       time.Time `json:"startDateTime,omitempty" bson:"startDateTime,omitempty"`
	} `json:"passwordCredentials,omitempty" bson:"passwordCredentials,omitempty"`
	PublicClient *struct {
		RedirectUris []any `json:"redirectUris,omitempty" bson:"redirectUris,omitempty"`
	} `json:"publicClient,omitempty" bson:"publicClient,omitempty"`
	PublisherDomain              string `json:"publisherDomain,omitempty" bson:"publisherDomain,omitempty"`
	RequestSignatureVerification *struct {
		AllowedWeakAlgorithms   any  `json:"allowedWeakAlgorithms,omitempty" bson:"allowedWeakAlgorithms,omitempty"`
		IsSignedRequestRequired bool `json:"isSignedRequestRequired,omitempty" bson:"isSignedRequestRequired,omitempty"`
	} `json:"requestSignatureVerification,omitempty" bson:"requestSignatureVerification,omitempty"`
	RequiredResourceAccess *[]struct {
		ResourceAccess *[]struct {
			ID   string `json:"id,omitempty" bson:"id,omitempty"`
			Type string `json:"type,omitempty" bson:"type,omitempty"`
		} `json:"resourceAccess,omitempty" bson:"resourceAccess,omitempty"`
		ResourceAppID string `json:"resourceAppId,omitempty" bson:"resourceAppId,omitempty"`
	} `json:"requiredResourceAccess,omitempty" bson:"requiredResourceAccess,omitempty"`
	SamlMetadataURL                   any `json:"samlMetadataUrl,omitempty" bson:"samlMetadataUrl,omitempty"`
	ServiceManagementReference        any `json:"serviceManagementReference,omitempty" bson:"serviceManagementReference,omitempty"`
	ServicePrincipalLockConfiguration *struct {
		AllProperties              bool `json:"allProperties,omitempty" bson:"allProperties,omitempty"`
		CredentialsWithUsageSign   bool `json:"credentialsWithUsageSign,omitempty" bson:"credentialsWithUsageSign,omitempty"`
		CredentialsWithUsageVerify bool `json:"credentialsWithUsageVerify,omitempty" bson:"credentialsWithUsageVerify,omitempty"`
		IdentifierUris             bool `json:"identifierUris,omitempty" bson:"identifierUris,omitempty"`
		IsEnabled                  bool `json:"isEnabled,omitempty" bson:"isEnabled,omitempty"`
		TokenEncryptionKeyID       bool `json:"tokenEncryptionKeyId,omitempty" bson:"tokenEncryptionKeyId,omitempty"`
	} `json:"servicePrincipalLockConfiguration,omitempty" bson:"servicePrincipalLockConfiguration,omitempty"`
	SignInAudience string `json:"signInAudience,omitempty" bson:"signInAudience,omitempty"`
	Spa            *struct {
		RedirectUris *[]string `json:"redirectUris,omitempty" bson:"redirectUris,omitempty"`
	} `json:"spa,omitempty" bson:"spa,omitempty"`
	Tags                 *[]string `json:"tags,omitempty" bson:"tags,omitempty"`
	TenantName           string    `json:"tenantName,omitempty" bson:"tenantName,omitempty"`
	TenantId             string    `json:"tenantId,omitempty" bson:"tenantId,omitempty"`
	TokenEncryptionKeyID *string   `json:"tokenEncryptionKeyId,omitempty" bson:"tokenEncryptionKeyId,omitempty"`
	UniqueName           any       `json:"uniqueName,omitempty" bson:"uniqueName,omitempty"`
	VerifiedPublisher    *struct {
		AddedDateTime       any `json:"addedDateTime,omitempty" bson:"addedDateTime,omitempty"`
		DisplayName         any `json:"displayName,omitempty" bson:"displayName,omitempty"`
		VerifiedPublisherID any `json:"verifiedPublisherId,omitempty" bson:"verifiedPublisherId,omitempty"`
	} `json:"verifiedPublisher,omitempty" bson:"verifiedPublisher,omitempty"`
	Web *struct {
		HomePageURL           *string `json:"homePageUrl,omitempty" bson:"homePageUrl,omitempty"`
		ImplicitGrantSettings struct {
			EnableAccessTokenIssuance bool `json:"enableAccessTokenIssuance,omitempty" bson:"enableAccessTokenIssuance,omitempty"`
			EnableIDTokenIssuance     bool `json:"enableIdTokenIssuance,omitempty" bson:"enableIdTokenIssuance,omitempty"`
		} `json:"implicitGrantSettings,omitempty" bson:"implicitGrantSettings,omitempty"`
		LogoutURL           any `json:"logoutUrl,omitempty" bson:"logoutUrl,omitempty"`
		RedirectURISettings *[]struct {
			Index any    `json:"index,omitempty" bson:"index,omitempty"`
			URI   string `json:"uri,omitempty" bson:"uri,omitempty"`
		} `json:"redirectUriSettings,omitempty" bson:"redirectUriSettings,omitempty"`
		RedirectUris []string `json:"redirectUris,omitempty" bson:"redirectUris,omitempty"`
	} `json:"web,omitempty" bson:"web,omitempty"`
	Windows       any       `json:"windows,omitempty" bson:"windows,omitempty"`
	MongoDbId     string    `json:"_id,omitempty" bson:"_id,omitempty"`
	LastAzureSync time.Time `json:"lastAzureSync,omitempty" bson:"lastAzureSync,omitempty" fake:"-"`
	LastDBSync    time.Time `json:"lastDatabaseSync,omitempty" bson:"lastDatabaseSync,omitempty" fake:"-"`
}

func ListEntraAppRegistrations

func ListEntraAppRegistrations(token *lib.AzureMultiAuthToken) []EntraApplication

type EntraExpiringCredential

type EntraExpiringCredential struct {
	AppRegAppID             string    `json:"appId,omitempty" bson:"appId,omitempty"`
	AppRegDescription       string    `json:"description,omitempty" bson:"description,omitempty"`
	AppRegDisplayName       string    `json:"appRegDisplayName,omitempty" bson:"appRegDisplayName,omitempty"`
	AppRegCreatedDateTime   time.Time `json:"appRegCreatedDateTime,omitempty" bson:"appRegCreatedDateTime,omitempty"`
	AppRegObjectID          string    `json:"appRegObjectId,omitempty" bson:"appRegObjectId,omitempty"`
	CredCustomKeyIdentifier string    `json:"credCustomKeyIdentifier,omitempty" bson:"credCustomKeyIdentifier,omitempty"`
	CredDisplayName         string    `json:"credDisplayName,omitempty" bson:"credDisplayName,omitempty"`
	CredEndDateTime         time.Time `json:"credEndDateTime,omitempty" bson:"credEndDateTime,omitempty"`
	CredID                  string    `json:"credId,omitempty" bson:"credId,omitempty"`
	CredKeyType             string    `json:"credKeyType,omitempty" bson:"credKeyType,omitempty"`
	CredKeyUsage            string    `json:"credKeyUsage,omitempty" bson:"credKeyUsage,omitempty"`
	CredStartDateTime       time.Time `json:"credStartDateTime,omitempty" bson:"credStartDateTime,omitempty"`
	CredType                string    `json:"credType,omitempty" bson:"credType,omitempty"`
	MongoDbId               string    `json:"_id,omitempty" bson:"_id,omitempty"`
	TenantName              string    `json:"tenantName,omitempty" bson:"tenantName,omitempty"`
	TenantId                string    `json:"tenantId,omitempty" bson:"tenantId,omitempty"`
	LastAzureSync           time.Time `json:"lastAzureSync,omitempty" bson:"lastAzureSync,omitempty" fake:"-"`
	LastDBSync              time.Time `json:"lastDatabaseSync,omitempty" bson:"lastDatabaseSync,omitempty" fake:"-"`
}

func GetAppRegExpiringCredData

func GetAppRegExpiringCredData(apps []EntraApplication, daysUntilExpired int) (expiringCredentials []EntraExpiringCredential)

type EntraListApplicationsResponse

type EntraListApplicationsResponse struct {
	OdataContext string             `json:"@odata.context,omitempty" bson:"@odata.context,omitempty"`
	NextLink     string             `json:"@odata.nextLink,omitempty" bson:"@odata.nextLink,omitempty"`
	Value        []EntraApplication `json:"value,omitempty" bson:"value,omitempty"`
}

type EntraRoleDefinition

type EntraRoleDefinition struct {
	Description     string `json:"description,omitempty" bson:"description,omitempty"`
	DisplayName     string `json:"displayName,omitempty" bson:"displayName,omitempty"`
	ID              string `json:"id,omitempty" bson:"id,omitempty"`
	IsBuiltIn       bool   `json:"isBuiltIn,omitempty" bson:"isBuiltIn,omitempty"`
	IsEnabled       bool   `json:"isEnabled,omitempty" bson:"isEnabled,omitempty"`
	RolePermissions []struct {
		AllowedResourceActions []string `json:"allowedResourceActions,omitempty" bson:"allowedResourceActions,omitempty"`
		Condition              *string  `json:"condition,omitempty" bson:"condition,omitempty"`
	} `json:"rolePermissions,omitempty" bson:"rolePermissions,omitempty"`
}

func ListEntraRoleDefinitions

func ListEntraRoleDefinitions(mat lib.AzureMultiAuthToken) ([]EntraRoleDefinition, error)

type GetAlertDataFromSearchResultsLinkResult added in v0.1.52

type GetAlertDataFromSearchResultsLinkResult struct {
	Tables []struct {
		Columns []struct {
			Name string `json:"name"`
			Type string `json:"type"`
		} `json:"columns"`
		Name string  `json:"name"`
		Rows [][]any `json:"rows"`
	} `json:"tables"`
}

type GetAllB2CTenantUsersResponse added in v0.1.51

type GetAllB2CTenantUsersResponse struct {
	Context  string    `json:"@odata.context"`
	NextLink string    `json:"@odata.nextLink"`
	Value    []B2CUser `json:"value"`
}

type GetAllImageGalleriesForSubscriptionResponse

type GetAllImageGalleriesForSubscriptionResponse struct {
	Value []ImageGallery `json:"value,omitempty,omitzero" bson:"value,omitempty,omitzero"`
}

type GetAzureAlertsResponse added in v0.1.52

type GetAzureAlertsResponse struct {
	Count           float64      `json:"count,omitempty,omitzero" bson:"count,omitempty,omitzero"`
	Data            []AzureAlert `json:"data,omitempty,omitzero" bson:"data,omitempty,omitzero"`
	Facets          []any        `json:"facets,omitempty,omitzero" bson:"facets,omitempty,omitzero"`
	ResultTruncated string       `json:"resultTruncated,omitempty,omitzero" bson:"resultTruncated,omitempty,omitzero"`
	TotalRecords    float64      `json:"totalRecords,omitempty,omitzero" bson:"totalRecords,omitempty,omitzero"`
}

type GetAzureDevOpsPipelineTokensOptionsTenantConfig

type GetAzureDevOpsPipelineTokensOptionsTenantConfig struct {
	TenantName          string
	TenantID            string
	ClientID            string
	ServiceConnectionID string
}

type IPAddressItem

type IPAddressItem struct {
	ResourceName string `json:"name"`
	ResourceID   string `json:"id"`
	ResourceType string `json:"type"`
	IpAddress    string
	Vnet         string
	Subnet       string
	Tags         map[string]string
}

type IPAddressList

type IPAddressList struct {
	PrivateAddresses []IPAddressItem
	PublicAddresses  []IPAddressItem
}

func ListAllTenantIpAddresses

func ListAllTenantIpAddresses(token lib.AzureMultiAuthToken) IPAddressList

func ListAllVnetIPAddresses

func ListAllVnetIPAddresses(mat lib.AzureMultiAuthToken, vnet Vnet) IPAddressList

type ImageGallery

type ImageGallery struct {
	ID             string `json:"id,omitempty,omitzero" bson:"id,omitempty,omitzero"`
	Location       string `json:"location,omitempty,omitzero" bson:"location,omitempty,omitzero"`
	Name           string `json:"name,omitempty,omitzero" bson:"name,omitempty,omitzero"`
	SubscriptionId string `json:"subscriptionId,omitempty,omitzero" bson:"subscriptionId,omitempty,omitzero"`
	ResourceGroup  string `json:"resourceGroup,omitempty,omitzero" bson:"resourceGroup,omitempty,omitzero"`
	TenantName     string `json:"tenantName,omitempty,omitzero" bson:"tenantName,omitempty,omitzero"`
	Properties     struct {
		Description string `json:"description,omitempty" bson:"description,omitempty"`
		Identifier  struct {
			UniqueName string `json:"uniqueName,omitempty,omitzero" bson:"uniqueName,omitempty,omitzero"`
		} `json:"identifier,omitempty,omitzero" bson:"identifier,omitempty,omitzero"`
		ProvisioningState string `json:"provisioningState,omitempty,omitzero" bson:"provisioningState,omitempty,omitzero"`
		SoftDeletePolicy  *struct {
			IsSoftDeleteEnabled bool `json:"isSoftDeleteEnabled,omitempty,omitzero" bson:"isSoftDeleteEnabled,omitempty,omitzero"`
		} `json:"softDeletePolicy,omitempty" bson:"softDeletePolicy,omitempty"`
	} `json:"properties,omitempty,omitzero" bson:"properties,omitempty,omitzero"`
	Tags *struct {
		CitrixCustomerID           string `json:"CitrixCustomerId,omitempty,omitzero" bson:"CitrixCustomerId,omitempty,omitzero"`
		CitrixProvisioningSchemeID string `json:"CitrixProvisioningSchemeId,omitempty,omitzero" bson:"CitrixProvisioningSchemeId,omitempty,omitzero"`
		CitrixResource             string `json:"CitrixResource,omitempty,omitzero" bson:"CitrixResource,omitempty,omitzero"`
		CitrixVirtualSiteID        string `json:"CitrixVirtualSiteId,omitempty,omitzero" bson:"CitrixVirtualSiteId,omitempty,omitzero"`
	} `json:"tags,omitempty" bson:"tags,omitempty"`
	Type string `json:"type,omitempty,omitzero" bson:"type,omitempty,omitzero"`
}

func GetAllImageGalleriesForAllConfiguredTenants

func GetAllImageGalleriesForAllConfiguredTenants(tokens lib.AllTenantTokens) (imageGalleries []ImageGallery)

func GetAllImageGalleriesForSubscription

func GetAllImageGalleriesForSubscription(subscriptionId string, mat *lib.AzureMultiAuthToken) (imageGalleries []ImageGallery)

func GetAllImageGalleriesForTenant

func GetAllImageGalleriesForTenant(mat *lib.AzureMultiAuthToken) (imageGalleries []ImageGallery)

type IpList

type IpList struct {
	SourceIps []string
	DestIps   []string
}

func GetUniqueIpAddresses

func GetUniqueIpAddresses(dataset []NsgFlowLogRecord) IpList

func (*IpList) FilterSourceIp

func (m *IpList) FilterSourceIp(filter string)

func (*IpList) PrintCount

func (m *IpList) PrintCount()

func (*IpList) PrintTable

func (m *IpList) PrintTable()

type ListAllResourceGroupsResponse

type ListAllResourceGroupsResponse struct {
	Count           float64         `json:"count"`
	Data            []ResourceGroup `json:"data"`
	Facets          []any           `json:"facets"`
	ResultTruncated string          `json:"resultTruncated"`
	TotalRecords    float64         `json:"totalRecords"`
	SkipToken       string          `json:"$skipToken"`
}

type ListAllResourcesResponse

type ListAllResourcesResponse struct {
	Value    []ListRspResource `json:"value,omitempty,omitzero" bson:"value,omitempty,omitzero"`
	NextLink string            `json:"nextLink,omitempty,omitzero" bson:"nextLink,omitempty,omitzero"`
}

type ListEntraRoleDefinitionsResponse

type ListEntraRoleDefinitionsResponse struct {
	Odata_Context string                `json:"@odata.context,omitempty" bson:"@odata.context,omitempty"`
	Value         []EntraRoleDefinition `json:"value,omitempty" bson:"value,omitempty"`
}

type ListManagementGroupsResponse

type ListManagementGroupsResponse struct {
	Value []ManagementGroup `json:"value,omitempty,omitzero" bson:"value,omitempty,omitzero"`
}

type ListResourceRoleDefinitionsResponse

type ListResourceRoleDefinitionsResponse struct {
	Value []ResourceRoleDefinition `json:"value,omitempty,omitzero" bson:"value,omitempty,omitzero"`
}

type ListRoleAssignmentScheduleInstancesResponse

type ListRoleAssignmentScheduleInstancesResponse struct {
	Value []RoleAssignmentScheduleInstance `json:"value,omitempty" bson:"value,omitempty"`
}

type ListRoleAssignmentSchedulesResponse

type ListRoleAssignmentSchedulesResponse struct {
	Odata_Context  string                   `json:"@odata.context,omitempty" bson:"@odata.context,omitempty"`
	Odata_NextLink string                   `json:"@odata.nextLink,omitempty" bson:"@odata.nextLink,omitempty"`
	Value          []RoleAssignmentSchedule `json:"value,omitempty" bson:"value,omitempty"`
}

type ListRoleEligibilityScheduleInstancesResponse

type ListRoleEligibilityScheduleInstancesResponse struct {
	Value []RoleEligibilityScheduleInstance `json:"value,omitempty" bson:"value,omitempty"`
}

type ListRspResource

type ListRspResource struct {
	ID       string `json:"id,omitempty,omitzero" bson:"id,omitempty,omitzero"`
	Identity *struct {
		PrincipalID string `json:"principalId,omitempty,omitzero" bson:"principalId,omitempty,omitzero"`
		TenantID    string `json:"tenantId,omitempty,omitzero" bson:"tenantId,omitempty,omitzero"`
		Type        string `json:"type,omitempty,omitzero" bson:"type,omitempty,omitzero"`
	} `json:"identity,omitempty" bson:"identity,omitempty"`
	Location  string `json:"location,omitempty,omitzero" bson:"location,omitempty,omitzero"`
	ManagedBy string `json:"managedBy,omitempty" bson:"managedBy,omitempty"`
	Name      string `json:"name,omitempty,omitzero" bson:"name,omitempty,omitzero"`
	Sku       *struct {
		Name string `json:"name,omitempty,omitzero" bson:"name,omitempty,omitzero"`
		Tier string `json:"tier,omitempty,omitzero" bson:"tier,omitempty,omitzero"`
	} `json:"sku,omitempty" bson:"sku,omitempty"`
	Tags  map[string]string `json:"tags,omitempty" bson:"tags,omitempty"`
	Type  string            `json:"type,omitempty,omitzero" bson:"type,omitempty,omitzero"`
	Zones []string          `json:"zones,omitempty" bson:"zones,omitempty"`
}

type ListSubnetsResponse

type ListSubnetsResponse struct {
	Value []SubnetResponse `json:"value"`
}

type LogAnalyticsTables

type LogAnalyticsTables []struct {
	ID         string `json:"id"`
	Name       string `json:"name"`
	Properties struct {
		ArchiveRetentionInDays   int    `json:"archiveRetentionInDays"`
		Plan                     string `json:"plan"`
		ProvisioningState        string `json:"provisioningState"`
		RetentionInDays          int    `json:"retentionInDays"`
		RetentionInDaysAsDefault bool   `json:"retentionInDaysAsDefault"`
		Schema                   struct {
			Columns []struct {
				IsDefaultDisplay bool   `json:"isDefaultDisplay"`
				IsHidden         bool   `json:"isHidden"`
				Name             string `json:"name"`
				Type             string `json:"type"`
			} `json:"columns,omitempty"`
			IsTroubleshootingAllowed bool     `json:"isTroubleshootingAllowed"`
			Name                     string   `json:"name"`
			Solutions                []string `json:"solutions"`
			StandardColumns          []struct {
				Description      string `json:"description"`
				IsDefaultDisplay bool   `json:"isDefaultDisplay"`
				IsHidden         bool   `json:"isHidden"`
				Name             string `json:"name"`
				Type             string `json:"type"`
			} `json:"standardColumns"`
			TableSubType string `json:"tableSubType"`
			TableType    string `json:"tableType"`
		} `json:"schema"`
		TotalRetentionInDays          int  `json:"totalRetentionInDays"`
		TotalRetentionInDaysAsDefault bool `json:"totalRetentionInDaysAsDefault"`
	} `json:"properties"`
}

type LogAnalyticsWorkbook added in v0.1.52

type LogAnalyticsWorkbook struct {
	Etag     string `json:"etag"`
	ID       string `json:"id"`
	Identity struct {
		Type string `json:"type"`
	} `json:"identity"`
	Kind       string `json:"kind"`
	Location   string `json:"location"`
	Name       string `json:"name"`
	Properties struct {
		Category       string    `json:"category"`
		DisplayName    string    `json:"displayName"`
		Revision       string    `json:"revision"`
		SerializedData string    `json:"serializedData"`
		SourceID       string    `json:"sourceId"`
		StorageURI     any       `json:"storageUri"`
		Tags           any       `json:"tags"`
		TimeModified   time.Time `json:"timeModified"`
		UserID         string    `json:"userId"`
		Version        string    `json:"version"`
	} `json:"properties"`
	Tags struct {
		HiddenTitle string `json:"hidden-title"`
	} `json:"tags"`
	Type string `json:"type"`
}

type LogAnalyticsWorkbookSerializedData added in v0.1.52

type LogAnalyticsWorkbookSerializedData struct {
	FallbackResourceIds []string `json:"fallbackResourceIds"`
	IsLocked            bool     `json:"isLocked"`
	Items               []struct {
		Content struct {
			CrossComponentResources []string `json:"crossComponentResources"`
			GridSettings            struct {
				Formatters []struct {
					ColumnMatch   string `json:"columnMatch"`
					FormatOptions *struct {
						ArmActionContext *struct {
							Description string `json:"description"`
							Headers     []any  `json:"headers"`
							HTTPMethod  string `json:"httpMethod"`
							Params      []any  `json:"params"`
							Path        string `json:"path"`
							RunLabel    string `json:"runLabel"`
							Title       string `json:"title"`
						} `json:"armActionContext,omitempty"`
						CustomColumnWidthSetting string  `json:"customColumnWidthSetting,omitempty"`
						LinkIsContextBlade       bool    `json:"linkIsContextBlade"`
						LinkLabel                string  `json:"linkLabel,omitempty"`
						LinkTarget               *string `json:"linkTarget"`
						ShowIcon                 bool    `json:"showIcon,omitempty"`
						ThresholdsGrid           []struct {
							Operator       string  `json:"operator"`
							Representation string  `json:"representation"`
							Text           string  `json:"text"`
							ThresholdValue *string `json:"thresholdValue"`
						} `json:"thresholdsGrid,omitempty"`
						ThresholdsOptions string `json:"thresholdsOptions,omitempty"`
					} `json:"formatOptions,omitempty"`
					Formatter float64 `json:"formatter"`
				} `json:"formatters"`
			} `json:"gridSettings"`
			NoDataMessage      string  `json:"noDataMessage"`
			NoDataMessageStyle float64 `json:"noDataMessageStyle"`
			Query              string  `json:"query"`
			QueryType          float64 `json:"queryType"`
			ResourceType       string  `json:"resourceType"`
			ShowRefreshButton  bool    `json:"showRefreshButton"`
			Size               float64 `json:"size"`
			SortBy             []any   `json:"sortBy"`
			Version            string  `json:"version"`
		} `json:"content"`
		Name string  `json:"name"`
		Type float64 `json:"type"`
	} `json:"items"`
	Version string `json:"version"`
}

type ManagementGroup

type ManagementGroup struct {
	ID         string `json:"id,omitempty,omitzero" bson:"id,omitempty,omitzero"`
	Name       string `json:"name,omitempty,omitzero" bson:"name,omitempty,omitzero"`
	Properties struct {
		DisplayName string `json:"displayName,omitempty,omitzero" bson:"displayName,omitempty,omitzero"`
		TenantID    string `json:"tenantId,omitempty,omitzero" bson:"tenantId,omitempty,omitzero"`
	} `json:"properties,omitempty,omitzero" bson:"properties,omitempty,omitzero"`
	Type string `json:"type,omitempty,omitzero" bson:"type,omitempty,omitzero"`
}

func ListManagementGroups

func ListManagementGroups(token *lib.AzureMultiAuthToken) ([]ManagementGroup, error)

type NsgFlowLog

type NsgFlowLog struct {
	Records []NsgFlowLogRecord
}

func GetFlowLogData

func GetFlowLogData(path string) NsgFlowLog

type NsgFlowLogRecord

type NsgFlowLogRecord struct {
	Category      string `json:"category"`
	MacAddress    string `json:"macAddress"`
	OperationName string `json:"operationName"`
	Properties    struct {
		Version int `json:"Version"`
		Flows   []struct {
			Flows []struct {
				FlowTuples []string `json:"flowTuples"`
				Mac        string   `json:"mac"`
			} `json:"flows"`
			Rule string `json:"rule"`
		} `json:"flows"`
	} `json:"properties"`
	ResourceID string    `json:"resourceId"`
	SystemID   string    `json:"systemId"`
	Time       time.Time `json:"time"`
}

func (*NsgFlowLogRecord) PrintJSON

func (r *NsgFlowLogRecord) PrintJSON()

type ProcessedSubnet

type ProcessedSubnet struct {
	ID         string `json:"id"`
	Name       string `json:"name"`
	VnetName   string `json:"vnetName"`
	Properties struct {
		AddressPrefix string `json:"addressPrefix"`
		Delegations   []struct {
			ID         string `json:"id"`
			Name       string `json:"name"`
			Properties struct {
				Actions           []string `json:"actions"`
				ProvisioningState string   `json:"provisioningState"`
				ServiceName       string   `json:"serviceName"`
			} `json:"properties"`
			Type string `json:"type"`
		} `json:"delegations"`
		IpConfigurations []struct {
			ID string `json:"id"`
		} `json:"ipConfigurations"`
		NetworkSecurityGroup struct {
			ID string `json:"id"`
		} `json:"networkSecurityGroup"`
		PrivateEndpointNetworkPolicies    string `json:"privateEndpointNetworkPolicies"`
		PrivateLinkServiceNetworkPolicies string `json:"privateLinkServiceNetworkPolicies"`
		ProvisioningState                 string `json:"provisioningState"`
		Purpose                           string `json:"purpose"`
		ServiceEndpoints                  []any  `json:"serviceEndpoints"`
	} `json:"properties"`
	Type string `json:"type"`
}

type ProcessedVnetPeering

type ProcessedVnetPeering struct {
	Name                      string   `json:"name"`
	RemoteAddressSpace        []string `json:"remoteAddressSpace"`
	RemoteGateways            []string `json:"remoteGateways"`
	RemoteVirtualNetwork      string   `json:"remoteVirtualNetwork"`
	UseRemoteGateways         bool     `json:"useRemoteGateways"`
	AllowForwardedTraffic     bool     `json:"allowForwardedTraffic"`
	AllowGatewayTransit       bool     `json:"allowGatewayTransit"`
	AllowVirtualNetworkAccess bool     `json:"allowVirtualNetworkAccess"`
	PeeringState              string   `json:"peeringState"`
	ProvisioningState         string   `json:"provisioningState"`
	PeeringSyncLevel          string   `json:"peeringSyncLevel"`
}

type PublicIpAddress

type PublicIpAddress struct {
	Etag       string `json:"etag"`
	ID         string `json:"id"`
	Location   string `json:"location"`
	Name       string `json:"name"`
	Properties struct {
		DdosSettings struct {
			ProtectionMode string `json:"protectionMode"`
		} `json:"ddosSettings"`
		IdleTimeoutInMinutes int    `json:"idleTimeoutInMinutes"`
		IpAddress            string `json:"ipAddress"`
		IpConfiguration      struct {
			ID string `json:"id"`
		} `json:"ipConfiguration"`
		IpTags                   []any  `json:"ipTags"`
		ProvisioningState        string `json:"provisioningState"`
		PublicIpAddressVersion   string `json:"publicIPAddressVersion"`
		PublicIpAllocationMethod string `json:"publicIPAllocationMethod"`
		ResourceGuid             string `json:"resourceGuid"`
	} `json:"properties"`
	Sku struct {
		Name string `json:"name"`
		Tier string `json:"tier"`
	} `json:"sku"`
	Tags map[string]string `json:"tags"`
	Type string            `json:"type"`
}

type ResourceGraphGetIpsResponse added in v0.1.17

type ResourceGraphGetIpsResponse struct {
	Count           float64                 `json:"count,omitempty,omitzero" bson:"count,omitempty,omitzero"`
	Data            []AzureResourceIPConfig `json:"data,omitempty,omitzero" bson:"data,omitempty,omitzero"`
	Facets          []interface{}           `json:"facets,omitempty,omitzero" bson:"facets,omitempty,omitzero"`
	ResultTruncated string                  `json:"resultTruncated,omitempty,omitzero" bson:"resultTruncated,omitempty,omitzero"`
	SkipToken       string                  `json:"$skipToken,omitempty,omitzero" bson:"$skipToken,omitempty,omitzero"`
	TotalRecords    float64                 `json:"totalRecords,omitempty,omitzero" bson:"totalRecords,omitempty,omitzero"`
}

type ResourceGraphResponse

type ResourceGraphResponse struct {
	Count           float64                    `json:"count"`
	Data            []lib.AzureResourceDetails `json:"data"`
	Facets          []interface{}              `json:"facets"`
	ResultTruncated string                     `json:"resultTruncated"`
	SkipToken       string                     `json:"$skipToken"`
	TotalRecords    float64                    `json:"totalRecords"`
}

type ResourceGroup

type ResourceGroup struct {
	ExtendedLocation any    `json:"extendedLocation"`
	ID               string `json:"id"`
	Identity         any    `json:"identity"`
	Kind             string `json:"kind"`
	Location         string `json:"location"`
	ManagedBy        string `json:"managedBy"`
	Name             string `json:"name"`
	Plan             any    `json:"plan"`
	Properties       struct {
		ProvisioningState string `json:"provisioningState"`
	} `json:"properties"`
	ResourceGroup  string            `json:"resourceGroup"`
	Sku            any               `json:"sku"`
	SubscriptionID string            `json:"subscriptionId"`
	Tags           map[string]string `json:"tags"`
	TenantID       string            `json:"tenantId"`
	Type           string            `json:"type"`
	Zones          any               `json:"zones"`
	TenantName     string            `json:"tenantName"`
	LastAzureSync  time.Time         `json:"lastAzureSync,omitempty" bson:"lastAzureSync,omitempty"`
	LastDBSync     time.Time         `json:"lastDatabaseSync,omitempty" bson:"lastDatabaseSync,omitempty"`
}

func GetAllResGrpsForAllConfiguredTenants

func GetAllResGrpsForAllConfiguredTenants(opts *lib.GetAllResourcesForAllConfiguredTenantsOptions, tokens lib.AllTenantTokens) (allResGrps []ResourceGroup)

func GetAllTenantResourceGroups

func GetAllTenantResourceGroups(outputFile string, token *lib.AzureMultiAuthToken) (allResGrps []ResourceGroup)

type ResourceRoleDefinition

type ResourceRoleDefinition struct {
	ID         string `json:"id,omitempty,omitzero" bson:"id,omitempty,omitzero"`
	Name       string `json:"name,omitempty,omitzero" bson:"name,omitempty,omitzero"`
	Properties struct {
		AssignableScopes []string  `json:"assignableScopes,omitempty,omitzero" bson:"assignableScopes,omitempty,omitzero"`
		CreatedBy        any       `json:"createdBy,omitempty,omitzero" bson:"createdBy,omitempty,omitzero"`
		CreatedOn        time.Time `json:"createdOn,omitempty,omitzero" bson:"createdOn,omitempty,omitzero"`
		Description      string    `json:"description,omitempty,omitzero" bson:"description,omitempty,omitzero"`
		Permissions      []struct {
			Actions        []string `json:"actions,omitempty,omitzero" bson:"actions,omitempty,omitzero"`
			DataActions    []any    `json:"dataActions,omitempty,omitzero" bson:"dataActions,omitempty,omitzero"`
			NotActions     []any    `json:"notActions,omitempty,omitzero" bson:"notActions,omitempty,omitzero"`
			NotDataActions []any    `json:"notDataActions,omitempty,omitzero" bson:"notDataActions,omitempty,omitzero"`
		} `json:"permissions,omitempty,omitzero" bson:"permissions,omitempty,omitzero"`
		RoleName  string    `json:"roleName,omitempty,omitzero" bson:"roleName,omitempty,omitzero"`
		Type      string    `json:"type,omitempty,omitzero" bson:"type,omitempty,omitzero"`
		UpdatedBy any       `json:"updatedBy,omitempty,omitzero" bson:"updatedBy,omitempty,omitzero"`
		UpdatedOn time.Time `json:"updatedOn,omitempty,omitzero" bson:"updatedOn,omitempty,omitzero"`
	} `json:"properties,omitempty,omitzero" bson:"properties,omitempty,omitzero"`
	Type string `json:"type,omitempty,omitzero" bson:"type,omitempty,omitzero"`
}

type ResponseBody

type ResponseBody struct {
	Value LogAnalyticsTables `json:"value"`
}

type RoleAssignmentSchedule

type RoleAssignmentSchedule struct {
	ActivatedUsing   any           `json:"activatedUsing,omitempty" bson:"activatedUsing,omitempty"`
	AppScopeID       any           `json:"appScopeId,omitempty" bson:"appScopeId,omitempty"`
	AssignmentType   string        `json:"assignmentType,omitempty" bson:"assignmentType,omitempty"`
	CreatedDateTime  *time.Time    `json:"createdDateTime,omitempty" bson:"createdDateTime,omitempty"`
	CreatedUsing     *string       `json:"createdUsing,omitempty" bson:"createdUsing,omitempty"`
	DirectoryScopeID string        `json:"directoryScopeId,omitempty" bson:"directoryScopeId,omitempty"`
	ID               string        `json:"id,omitempty" bson:"id,omitempty"`
	MemberType       string        `json:"memberType,omitempty" bson:"memberType,omitempty"`
	ModifiedDateTime any           `json:"modifiedDateTime,omitempty" bson:"modifiedDateTime,omitempty"`
	Principal        RolePrinciple `json:"principal,omitempty" bson:"principal,omitempty"`
	PrincipalID      string        `json:"principalId,omitempty" bson:"principalId,omitempty"`
	RoleDefinition   struct {
		Description     string `json:"description,omitempty" bson:"description,omitempty"`
		DisplayName     string `json:"displayName,omitempty" bson:"displayName,omitempty"`
		ID              string `json:"id,omitempty" bson:"id,omitempty"`
		IsBuiltIn       bool   `json:"isBuiltIn,omitempty" bson:"isBuiltIn,omitempty"`
		IsEnabled       bool   `json:"isEnabled,omitempty" bson:"isEnabled,omitempty"`
		ResourceScopes  []any  `json:"resourceScopes,omitempty" bson:"resourceScopes,omitempty"`
		RolePermissions []any  `json:"rolePermissions,omitempty" bson:"rolePermissions,omitempty"`
		TemplateID      string `json:"templateId,omitempty" bson:"templateId,omitempty"`
		Version         any    `json:"version,omitempty" bson:"version,omitempty"`
	} `json:"roleDefinition,omitempty" bson:"roleDefinition,omitempty"`
	RoleDefinitionID string `json:"roleDefinitionId,omitempty" bson:"roleDefinitionId,omitempty"`
	ScheduleInfo     struct {
		Expiration struct {
			Duration    any        `json:"duration,omitempty" bson:"duration,omitempty"`
			EndDateTime *time.Time `json:"endDateTime,omitempty" bson:"endDateTime,omitempty"`
			Type        string     `json:"type,omitempty" bson:"type,omitempty"`
		} `json:"expiration,omitempty" bson:"expiration,omitempty"`
		Recurrence    any       `json:"recurrence,omitempty" bson:"recurrence,omitempty"`
		StartDateTime time.Time `json:"startDateTime,omitempty" bson:"startDateTime,omitempty"`
	} `json:"scheduleInfo,omitempty" bson:"scheduleInfo,omitempty"`
	Status string `json:"status,omitempty" bson:"status,omitempty"`
}

type RoleAssignmentScheduleInstance

type RoleAssignmentScheduleInstance struct {
	ID         string `json:"id,omitempty" bson:"_id,omitempty"`
	Name       string `json:"name,omitempty" bson:"name,omitempty"`
	Properties struct {
		AssignmentType     string    `json:"assignmentType,omitempty" bson:"assignmentType,omitempty"`
		CreatedOn          time.Time `json:"createdOn,omitempty" bson:"createdOn,omitempty"`
		EndDateTime        time.Time `json:"endDateTime,omitempty" bson:"endDateTime,omitempty"`
		ExpandedProperties struct {
			Principal struct {
				DisplayName string `json:"displayName,omitempty" bson:"displayName,omitempty"`
				ID          string `json:"id,omitempty" bson:"id,omitempty"`
				Type        string `json:"type,omitempty" bson:"type,omitempty"`
			} `json:"principal,omitempty" bson:"principal,omitempty"`
			RoleDefinition struct {
				DisplayName string `json:"displayName,omitempty" bson:"displayName,omitempty"`
				ID          string `json:"id,omitempty" bson:"id,omitempty"`
				Type        string `json:"type,omitempty" bson:"type,omitempty"`
			} `json:"roleDefinition,omitempty" bson:"roleDefinition,omitempty"`
			Scope struct {
				DisplayName string `json:"displayName,omitempty" bson:"displayName,omitempty"`
				ID          string `json:"id,omitempty" bson:"id,omitempty"`
				Type        string `json:"type,omitempty" bson:"type,omitempty"`
			} `json:"scope,omitempty" bson:"scope,omitempty"`
		} `json:"expandedProperties,omitempty" bson:"expandedProperties,omitempty"`
		LinkedRoleEligibilityScheduleID         string    `json:"linkedRoleEligibilityScheduleId,omitempty" bson:"linkedRoleEligibilityScheduleId,omitempty"`
		LinkedRoleEligibilityScheduleInstanceID string    `json:"linkedRoleEligibilityScheduleInstanceId,omitempty" bson:"linkedRoleEligibilityScheduleInstanceId,omitempty"`
		MemberType                              string    `json:"memberType,omitempty" bson:"memberType,omitempty"`
		OriginRoleAssignmentID                  string    `json:"originRoleAssignmentId,omitempty" bson:"originRoleAssignmentId,omitempty"`
		PrincipalID                             string    `json:"principalId,omitempty" bson:"principalId,omitempty"`
		PrincipalType                           string    `json:"principalType,omitempty" bson:"principalType,omitempty"`
		RoleAssignmentScheduleID                string    `json:"roleAssignmentScheduleId,omitempty" bson:"roleAssignmentScheduleId,omitempty"`
		RoleDefinitionID                        string    `json:"roleDefinitionId,omitempty" bson:"roleDefinitionId,omitempty"`
		Scope                                   string    `json:"scope,omitempty" bson:"scope,omitempty"`
		StartDateTime                           time.Time `json:"startDateTime,omitempty" bson:"startDateTime,omitempty"`
		Status                                  string    `json:"status,omitempty" bson:"status,omitempty"`
	} `json:"properties,omitempty" bson:"properties,omitempty"`
	Type          string    `json:"type,omitempty" bson:"type,omitempty"`
	ScopeType     string    `json:"scopeType,omitempty" bson:"scopeType,omitempty"`
	LastAzureSync time.Time `json:"lastAzureSync,omitempty" bson:"lastAzureSync,omitempty" fake:"-"`
	LastDBSync    time.Time `json:"lastDatabaseSync,omitempty" bson:"lastDatabaseSync,omitempty" fake:"-"`
	TenantName    string    `json:"tenantName,omitempty" bson:"tenantName,omitempty" fake:"-"`
}

func ListRoleAssignmentScheduleInstances

func ListRoleAssignmentScheduleInstances(scope string, token *lib.AzureMultiAuthToken) ([]RoleAssignmentScheduleInstance, error)

type RoleAssignmentScheduleProcessed

type RoleAssignmentScheduleProcessed struct {
	ActivatedUsing any `json:"activatedUsing,omitempty" bson:"activatedUsing,omitempty"`
	Principal      struct {
		Odata_Type                string   `json:"@odata.type,omitempty" bson:"@odata.type,omitempty"`
		AccountEnabled            bool     `json:"accountEnabled,omitempty" bson:"accountEnabled,omitempty"`
		AppDescription            any      `json:"appDescription,omitempty" bson:"appDescription,omitempty"`
		AppDisplayName            string   `json:"appDisplayName,omitempty" bson:"appDisplayName,omitempty"`
		AppID                     string   `json:"appId,omitempty" bson:"appId,omitempty"`
		Description               *string  `json:"description,omitempty" bson:"description,omitempty"`
		DisplayName               string   `json:"displayName,omitempty" bson:"displayName,omitempty"`
		ID                        string   `json:"id,omitempty" bson:"id,omitempty"`
		ManagedIdentityResourceID any      `json:"managedIdentityResourceId,omitempty" bson:"managedIdentityResourceId,omitempty"`
		ServicePrincipalNames     []string `json:"servicePrincipalNames,omitempty" bson:"servicePrincipalNames,omitempty"`
		ServicePrincipalType      string   `json:"servicePrincipalType,omitempty" bson:"servicePrincipalType,omitempty"`
		Tags                      []string `json:"tags,omitempty" bson:"tags,omitempty"`
		UserPrincipalName         string   `json:"userPrincipalName,omitempty" bson:"userPrincipalName,omitempty"`
		UserType                  string   `json:"userType,omitempty" bson:"userType,omitempty"`
	} `json:"principal,omitempty" bson:"principal,omitempty"`
	PrincipalID    string `json:"principalId,omitempty" bson:"principalId,omitempty"`
	RoleDefinition struct {
		Description     string `json:"description,omitempty" bson:"description,omitempty"`
		DisplayName     string `json:"displayName,omitempty" bson:"displayName,omitempty"`
		ID              string `json:"id,omitempty" bson:"id,omitempty"`
		IsBuiltIn       bool   `json:"isBuiltIn,omitempty" bson:"isBuiltIn,omitempty"`
		IsEnabled       bool   `json:"isEnabled,omitempty" bson:"isEnabled,omitempty"`
		ResourceScopes  []any  `json:"resourceScopes,omitempty" bson:"resourceScopes,omitempty"`
		RolePermissions []any  `json:"rolePermissions,omitempty" bson:"rolePermissions,omitempty"`
	} `json:"roleDefinition,omitempty" bson:"roleDefinition,omitempty"`
	RoleDefinitionID string `json:"roleDefinitionId,omitempty" bson:"roleDefinitionId,omitempty"`
}

type RoleEligibilityScheduleInstance

type RoleEligibilityScheduleInstance struct {
	ID         string `json:"id,omitempty" bson:"id,omitempty"`
	Name       string `json:"name,omitempty" bson:"name,omitempty"`
	Properties struct {
		CreatedOn          time.Time `json:"createdOn,omitempty" bson:"createdOn,omitempty"`
		EndDateTime        time.Time `json:"endDateTime,omitempty" bson:"endDateTime,omitempty"`
		ExpandedProperties struct {
			Principal struct {
				DisplayName string `json:"displayName,omitempty" bson:"displayName,omitempty"`
				ID          string `json:"id,omitempty" bson:"id,omitempty"`
				Type        string `json:"type,omitempty" bson:"type,omitempty"`
			} `json:"principal,omitempty" bson:"principal,omitempty"`
			RoleDefinition struct {
				DisplayName string `json:"displayName,omitempty" bson:"displayName,omitempty"`
				ID          string `json:"id,omitempty" bson:"id,omitempty"`
				Type        string `json:"type,omitempty" bson:"type,omitempty"`
			} `json:"roleDefinition,omitempty" bson:"roleDefinition,omitempty"`
			Scope struct {
				DisplayName string `json:"displayName,omitempty" bson:"displayName,omitempty"`
				ID          string `json:"id,omitempty" bson:"id,omitempty"`
				Type        string `json:"type,omitempty" bson:"type,omitempty"`
			} `json:"scope,omitempty" bson:"scope,omitempty"`
		} `json:"expandedProperties,omitempty" bson:"expandedProperties,omitempty"`
		MemberType                string    `json:"memberType,omitempty" bson:"memberType,omitempty"`
		PrincipalID               string    `json:"principalId,omitempty" bson:"principalId,omitempty"`
		PrincipalType             string    `json:"principalType,omitempty" bson:"principalType,omitempty"`
		RoleDefinitionID          string    `json:"roleDefinitionId,omitempty" bson:"roleDefinitionId,omitempty"`
		RoleEligibilityScheduleID string    `json:"roleEligibilityScheduleId,omitempty" bson:"roleEligibilityScheduleId,omitempty"`
		Scope                     string    `json:"scope,omitempty" bson:"scope,omitempty"`
		StartDateTime             time.Time `json:"startDateTime,omitempty" bson:"startDateTime,omitempty"`
		Status                    string    `json:"status,omitempty" bson:"status,omitempty"`
	} `json:"properties,omitempty" bson:"properties,omitempty"`
	Type          string    `json:"type,omitempty" bson:"type,omitempty"`
	ScopeType     string    `json:"scopeType,omitempty" bson:"scopeType,omitempty"`
	LastAzureSync time.Time `json:"lastAzureSync,omitempty" bson:"lastAzureSync,omitempty" fake:"-"`
	LastDBSync    time.Time `json:"lastDatabaseSync,omitempty" bson:"lastDatabaseSync,omitempty" fake:"-"`
	TenantName    string    `json:"tenantName,omitempty" bson:"tenantName,omitempty" fake:"-"`
}

func ListRoleEligibilityScheduleInstances

func ListRoleEligibilityScheduleInstances(scope string, token *lib.AzureMultiAuthToken) ([]RoleEligibilityScheduleInstance, error)

type RolePrinciple

type RolePrinciple struct {
	Odata_Type     string `json:"@odata.type,omitempty" bson:"@odata.type,omitempty"`
	AccountEnabled bool   `json:"accountEnabled,omitempty" bson:"accountEnabled,omitempty"`
	// AddIns                 []any  `json:"addIns,omitempty" bson:"addIns,omitempty"`
	// AgeGroup               any    `json:"ageGroup,omitempty" bson:"ageGroup,omitempty"`
	// AlternativeNames       []any  `json:"alternativeNames,omitempty" bson:"alternativeNames,omitempty"`
	// AlternativeSecurityIds []any  `json:"alternativeSecurityIds,omitempty" bson:"alternativeSecurityIds,omitempty"`
	// API                    *struct {
	// 	ResourceSpecificApplicationPermissions []any `json:"resourceSpecificApplicationPermissions,omitempty" bson:"resourceSpecificApplicationPermissions,omitempty"`
	// } `json:"api,omitempty" bson:"api,omitempty"`
	// AppData                   any    `json:"appData,omitempty" bson:"appData,omitempty"`
	AppDescription any    `json:"appDescription,omitempty" bson:"appDescription,omitempty"`
	AppDisplayName string `json:"appDisplayName,omitempty" bson:"appDisplayName,omitempty"`
	AppID          string `json:"appId,omitempty" bson:"appId,omitempty"`
	// AppMetadata               any    `json:"appMetadata,omitempty" bson:"appMetadata,omitempty"`
	// AppOwnerOrganizationID    string `json:"appOwnerOrganizationId,omitempty" bson:"appOwnerOrganizationId,omitempty"`
	// AppRoleAssignmentRequired bool   `json:"appRoleAssignmentRequired,omitempty" bson:"appRoleAssignmentRequired,omitempty"`
	// AppRoles                  []any  `json:"appRoles,omitempty" bson:"appRoles,omitempty"`
	// ApplicationTemplateID     any    `json:"applicationTemplateId,omitempty" bson:"applicationTemplateId,omitempty"`
	// AssignedLicenses          []struct {
	// 	DisabledPlans []string `json:"disabledPlans,omitempty" bson:"disabledPlans,omitempty"`
	// 	SkuID         string   `json:"skuId,omitempty" bson:"skuId,omitempty"`
	// } `json:"assignedLicenses,omitempty" bson:"assignedLicenses,omitempty"`
	// AssignedPlans []struct {
	// 	AssignedDateTime time.Time `json:"assignedDateTime,omitempty" bson:"assignedDateTime,omitempty"`
	// 	CapabilityStatus string    `json:"capabilityStatus,omitempty" bson:"capabilityStatus,omitempty"`
	// 	Service          string    `json:"service,omitempty" bson:"service,omitempty"`
	// 	ServicePlanID    string    `json:"servicePlanId,omitempty" bson:"servicePlanId,omitempty"`
	// } `json:"assignedPlans,omitempty" bson:"assignedPlans,omitempty"`
	// AuthorizationInfo *struct {
	// 	CertificateUserIds []any `json:"certificateUserIds,omitempty" bson:"certificateUserIds,omitempty"`
	// } `json:"authorizationInfo,omitempty" bson:"authorizationInfo,omitempty"`
	// BusinessPhones                 []any `json:"businessPhones,omitempty" bson:"businessPhones,omitempty"`
	// Certification                  any   `json:"certification,omitempty" bson:"certification,omitempty"`
	// City                           any   `json:"city,omitempty" bson:"city,omitempty"`
	// Classification                 any   `json:"classification,omitempty" bson:"classification,omitempty"`
	// CloudRealtimeCommunicationInfo *struct {
	// 	CloudMsRtcOwnerUrn          any      `json:"cloudMSRtcOwnerUrn,omitempty" bson:"cloudMSRtcOwnerUrn,omitempty"`
	// 	CloudMsRtcPolicyAssignments []string `json:"cloudMSRtcPolicyAssignments,omitempty" bson:"cloudMSRtcPolicyAssignments,omitempty"`
	// 	CloudMsRtcPool              *string  `json:"cloudMSRtcPool,omitempty" bson:"cloudMSRtcPool,omitempty"`
	// 	CloudMsRtcServiceAttributes *struct {
	// 		ApplicationOption   any     `json:"applicationOption,omitempty" bson:"applicationOption,omitempty"`
	// 		DeploymentLocator   string  `json:"deploymentLocator,omitempty" bson:"deploymentLocator,omitempty"`
	// 		HideFromAddressList any     `json:"hideFromAddressList,omitempty" bson:"hideFromAddressList,omitempty"`
	// 		OptionFlag          float64 `json:"optionFlag,omitempty" bson:"optionFlag,omitempty"`
	// 	} `json:"cloudMSRtcServiceAttributes,omitempty" bson:"cloudMSRtcServiceAttributes,omitempty"`
	// 	CloudSipLine         any     `json:"cloudSipLine,omitempty" bson:"cloudSipLine,omitempty"`
	// 	CloudSipProxyAddress *string `json:"cloudSipProxyAddress,omitempty" bson:"cloudSipProxyAddress,omitempty"`
	// 	IsSipEnabled         *bool   `json:"isSipEnabled,omitempty" bson:"isSipEnabled,omitempty"`
	// } `json:"cloudRealtimeCommunicationInfo,omitempty" bson:"cloudRealtimeCommunicationInfo,omitempty"`
	// CompanyName               any       `json:"companyName,omitempty" bson:"companyName,omitempty"`
	// ConsentProvidedForMinor   any       `json:"consentProvidedForMinor,omitempty" bson:"consentProvidedForMinor,omitempty"`
	// Country                   any       `json:"country,omitempty" bson:"country,omitempty"`
	// CreatedByAppID            string    `json:"createdByAppId,omitempty" bson:"createdByAppId,omitempty"`
	// CreatedDateTime           time.Time `json:"createdDateTime,omitempty" bson:"createdDateTime,omitempty"`
	// CreationType              any       `json:"creationType,omitempty" bson:"creationType,omitempty"`
	// DeletedDateTime           any       `json:"deletedDateTime,omitempty" bson:"deletedDateTime,omitempty"`
	// Department                *string   `json:"department,omitempty" bson:"department,omitempty"`
	Description *string `json:"description,omitempty" bson:"description,omitempty"`
	// DeviceKeys                []any     `json:"deviceKeys,omitempty" bson:"deviceKeys,omitempty"`
	// DeviceManagementAppType   any       `json:"deviceManagementAppType,omitempty" bson:"deviceManagementAppType,omitempty"`
	// DisabledByMicrosoftStatus any       `json:"disabledByMicrosoftStatus,omitempty" bson:"disabledByMicrosoftStatus,omitempty"`
	DisplayName string `json:"displayName,omitempty" bson:"displayName,omitempty"`
	// EmployeeHireDate          any       `json:"employeeHireDate,omitempty" bson:"employeeHireDate,omitempty"`
	// EmployeeID                any       `json:"employeeId,omitempty" bson:"employeeId,omitempty"`
	// EmployeeLeaveDateTime     any       `json:"employeeLeaveDateTime,omitempty" bson:"employeeLeaveDateTime,omitempty"`
	// EmployeeOrgData           any       `json:"employeeOrgData,omitempty" bson:"employeeOrgData,omitempty"`
	// EmployeeType              any       `json:"employeeType,omitempty" bson:"employeeType,omitempty"`
	// ErrorURL                  any       `json:"errorUrl,omitempty" bson:"errorUrl,omitempty"`
	// ExpirationDateTime        any       `json:"expirationDateTime,omitempty" bson:"expirationDateTime,omitempty"`
	// ExternalUserConvertedOn   any       `json:"externalUserConvertedOn,omitempty" bson:"externalUserConvertedOn,omitempty"`
	// ExternalUserInformation   *struct {
	// 	AcceptedAsMail   any       `json:"acceptedAsMail,omitempty" bson:"acceptedAsMail,omitempty"`
	// 	AcceptedDateTime any       `json:"acceptedDateTime,omitempty" bson:"acceptedDateTime,omitempty"`
	// 	InviteReplyUrls  []any     `json:"inviteReplyUrls,omitempty" bson:"inviteReplyUrls,omitempty"`
	// 	InviteResources  []any     `json:"inviteResources,omitempty" bson:"inviteResources,omitempty"`
	// 	InvitedAsMail    any       `json:"invitedAsMail,omitempty" bson:"invitedAsMail,omitempty"`
	// 	InvitedDateTime  time.Time `json:"invitedDateTime,omitempty" bson:"invitedDateTime,omitempty"`
	// 	SignInNames      []string  `json:"signInNames,omitempty" bson:"signInNames,omitempty"`
	// } `json:"externalUserInformation,omitempty" bson:"externalUserInformation,omitempty"`
	// ExternalUserState               any     `json:"externalUserState,omitempty" bson:"externalUserState,omitempty"`
	// ExternalUserStateChangeDateTime any     `json:"externalUserStateChangeDateTime,omitempty" bson:"externalUserStateChangeDateTime,omitempty"`
	// FaxNumber                       any     `json:"faxNumber,omitempty" bson:"faxNumber,omitempty"`
	// GivenName                       *string `json:"givenName,omitempty" bson:"givenName,omitempty"`
	// GroupTypes                      []any   `json:"groupTypes,omitempty" bson:"groupTypes,omitempty"`
	// Homepage                        *string `json:"homepage,omitempty" bson:"homepage,omitempty"`
	ID string `json:"id,omitempty" bson:"id,omitempty"`
	// Identities                      []struct {
	// 	Issuer           string `json:"issuer,omitempty" bson:"issuer,omitempty"`
	// 	IssuerAssignedID string `json:"issuerAssignedId,omitempty" bson:"issuerAssignedId,omitempty"`
	// 	SignInType       string `json:"signInType,omitempty" bson:"signInType,omitempty"`
	// } `json:"identities,omitempty" bson:"identities,omitempty"`
	// ImAddresses []string `json:"imAddresses,omitempty" bson:"imAddresses,omitempty"`
	// Info        *struct {
	// 	LogoURL             any `json:"logoUrl,omitempty" bson:"logoUrl,omitempty"`
	// 	MarketingURL        any `json:"marketingUrl,omitempty" bson:"marketingUrl,omitempty"`
	// 	PrivacyStatementURL any `json:"privacyStatementUrl,omitempty" bson:"privacyStatementUrl,omitempty"`
	// 	SupportURL          any `json:"supportUrl,omitempty" bson:"supportUrl,omitempty"`
	// 	TermsOfServiceURL   any `json:"termsOfServiceUrl,omitempty" bson:"termsOfServiceUrl,omitempty"`
	// } `json:"info,omitempty" bson:"info,omitempty"`
	// InfoCatalogs                  []any   `json:"infoCatalogs,omitempty" bson:"infoCatalogs,omitempty"`
	// IsAssignableToRole            bool    `json:"isAssignableToRole,omitempty" bson:"isAssignableToRole,omitempty"`
	// IsAuthorizationServiceEnabled bool    `json:"isAuthorizationServiceEnabled,omitempty" bson:"isAuthorizationServiceEnabled,omitempty"`
	// IsLicenseReconciliationNeeded bool    `json:"isLicenseReconciliationNeeded,omitempty" bson:"isLicenseReconciliationNeeded,omitempty"`
	// IsManagementRestricted        any     `json:"isManagementRestricted,omitempty" bson:"isManagementRestricted,omitempty"`
	IsResourceAccount any `json:"isResourceAccount,omitempty" bson:"isResourceAccount,omitempty"`
	// JobTitle                      any     `json:"jobTitle,omitempty" bson:"jobTitle,omitempty"`
	// KeyCredentials                []any   `json:"keyCredentials,omitempty" bson:"keyCredentials,omitempty"`
	// LegalAgeGroupClassification   any     `json:"legalAgeGroupClassification,omitempty" bson:"legalAgeGroupClassification,omitempty"`
	// LoginURL                      any     `json:"loginUrl,omitempty" bson:"loginUrl,omitempty"`
	// LogoutURL                     any     `json:"logoutUrl,omitempty" bson:"logoutUrl,omitempty"`
	// Mail                          *string `json:"mail,omitempty" bson:"mail,omitempty"`
	// MailEnabled                   bool    `json:"mailEnabled,omitempty" bson:"mailEnabled,omitempty"`
	// MailNickname                  string  `json:"mailNickname,omitempty" bson:"mailNickname,omitempty"`
	ManagedIdentityResourceID any `json:"managedIdentityResourceId,omitempty" bson:"managedIdentityResourceId,omitempty"`
	// MembershipRule                any     `json:"membershipRule,omitempty" bson:"membershipRule,omitempty"`
	// MembershipRuleProcessingState any     `json:"membershipRuleProcessingState,omitempty" bson:"membershipRuleProcessingState,omitempty"`
	// MicrosoftPolicyGroup          any     `json:"microsoftPolicyGroup,omitempty" bson:"microsoftPolicyGroup,omitempty"`
	// MobilePhone                   any     `json:"mobilePhone,omitempty" bson:"mobilePhone,omitempty"`
	// NetID                         string  `json:"netId,omitempty" bson:"netId,omitempty"`
	// Notes                         any     `json:"notes,omitempty" bson:"notes,omitempty"`
	// NotificationEmailAddresses    []any   `json:"notificationEmailAddresses,omitempty" bson:"notificationEmailAddresses,omitempty"`
	// OfficeLocation                any     `json:"officeLocation,omitempty" bson:"officeLocation,omitempty"`
	// OnPremisesDistinguishedName   *string `json:"onPremisesDistinguishedName,omitempty" bson:"onPremisesDistinguishedName,omitempty"`
	// OnPremisesDomainName          *string `json:"onPremisesDomainName,omitempty" bson:"onPremisesDomainName,omitempty"`
	// OnPremisesExtensionAttributes *struct {
	// 	ExtensionAttribute1  any `json:"extensionAttribute1,omitempty" bson:"extensionAttribute1,omitempty"`
	// 	ExtensionAttribute10 any `json:"extensionAttribute10,omitempty" bson:"extensionAttribute10,omitempty"`
	// 	ExtensionAttribute11 any `json:"extensionAttribute11,omitempty" bson:"extensionAttribute11,omitempty"`
	// 	ExtensionAttribute12 any `json:"extensionAttribute12,omitempty" bson:"extensionAttribute12,omitempty"`
	// 	ExtensionAttribute13 any `json:"extensionAttribute13,omitempty" bson:"extensionAttribute13,omitempty"`
	// 	ExtensionAttribute14 any `json:"extensionAttribute14,omitempty" bson:"extensionAttribute14,omitempty"`
	// 	ExtensionAttribute15 any `json:"extensionAttribute15,omitempty" bson:"extensionAttribute15,omitempty"`
	// 	ExtensionAttribute2  any `json:"extensionAttribute2,omitempty" bson:"extensionAttribute2,omitempty"`
	// 	ExtensionAttribute3  any `json:"extensionAttribute3,omitempty" bson:"extensionAttribute3,omitempty"`
	// 	ExtensionAttribute4  any `json:"extensionAttribute4,omitempty" bson:"extensionAttribute4,omitempty"`
	// 	ExtensionAttribute5  any `json:"extensionAttribute5,omitempty" bson:"extensionAttribute5,omitempty"`
	// 	ExtensionAttribute6  any `json:"extensionAttribute6,omitempty" bson:"extensionAttribute6,omitempty"`
	// 	ExtensionAttribute7  any `json:"extensionAttribute7,omitempty" bson:"extensionAttribute7,omitempty"`
	// 	ExtensionAttribute8  any `json:"extensionAttribute8,omitempty" bson:"extensionAttribute8,omitempty"`
	// 	ExtensionAttribute9  any `json:"extensionAttribute9,omitempty" bson:"extensionAttribute9,omitempty"`
	// } `json:"onPremisesExtensionAttributes,omitempty" bson:"onPremisesExtensionAttributes,omitempty"`
	// OnPremisesImmutableID        *string    `json:"onPremisesImmutableId,omitempty" bson:"onPremisesImmutableId,omitempty"`
	// OnPremisesLastSyncDateTime   *time.Time `json:"onPremisesLastSyncDateTime,omitempty" bson:"onPremisesLastSyncDateTime,omitempty"`
	// OnPremisesNetBiosName        any        `json:"onPremisesNetBiosName,omitempty" bson:"onPremisesNetBiosName,omitempty"`
	// OnPremisesObjectIdentifier   *string    `json:"onPremisesObjectIdentifier,omitempty" bson:"onPremisesObjectIdentifier,omitempty"`
	// OnPremisesProvisioningErrors []any      `json:"onPremisesProvisioningErrors,omitempty" bson:"onPremisesProvisioningErrors,omitempty"`
	// OnPremisesSamAccountName     *string    `json:"onPremisesSamAccountName,omitempty" bson:"onPremisesSamAccountName,omitempty"`
	// OnPremisesSecurityIdentifier *string    `json:"onPremisesSecurityIdentifier,omitempty" bson:"onPremisesSecurityIdentifier,omitempty"`
	// OnPremisesSipInfo            *struct {
	// 	IsSipEnabled          bool `json:"isSipEnabled,omitempty" bson:"isSipEnabled,omitempty"`
	// 	SipDeploymentLocation any  `json:"sipDeploymentLocation,omitempty" bson:"sipDeploymentLocation,omitempty"`
	// 	SipPrimaryAddress     any  `json:"sipPrimaryAddress,omitempty" bson:"sipPrimaryAddress,omitempty"`
	// } `json:"onPremisesSipInfo,omitempty" bson:"onPremisesSipInfo,omitempty"`
	// OnPremisesSyncEnabled       *bool   `json:"onPremisesSyncEnabled,omitempty" bson:"onPremisesSyncEnabled,omitempty"`
	// OnPremisesUserPrincipalName *string `json:"onPremisesUserPrincipalName,omitempty" bson:"onPremisesUserPrincipalName,omitempty"`
	// OrganizationID              string  `json:"organizationId,omitempty" bson:"organizationId,omitempty"`
	// OtherMails                  []any   `json:"otherMails,omitempty" bson:"otherMails,omitempty"`
	// PasswordCredentials         []any   `json:"passwordCredentials,omitempty" bson:"passwordCredentials,omitempty"`
	// PasswordPolicies            *string `json:"passwordPolicies,omitempty" bson:"passwordPolicies,omitempty"`
	// PasswordProfile             *struct {
	// 	ForceChangePasswordNextSignIn        bool `json:"forceChangePasswordNextSignIn,omitempty" bson:"forceChangePasswordNextSignIn,omitempty"`
	// 	ForceChangePasswordNextSignInWithMfa bool `json:"forceChangePasswordNextSignInWithMfa,omitempty" bson:"forceChangePasswordNextSignInWithMfa,omitempty"`
	// 	Password                             any  `json:"password,omitempty" bson:"password,omitempty"`
	// } `json:"passwordProfile,omitempty" bson:"passwordProfile,omitempty"`
	// PortalSetting                       any `json:"portalSetting,omitempty" bson:"portalSetting,omitempty"`
	// PostalCode                          any `json:"postalCode,omitempty" bson:"postalCode,omitempty"`
	// PreferredDataLocation               any `json:"preferredDataLocation,omitempty" bson:"preferredDataLocation,omitempty"`
	// PreferredLanguage                   any `json:"preferredLanguage,omitempty" bson:"preferredLanguage,omitempty"`
	// PreferredSingleSignOnMode           any `json:"preferredSingleSignOnMode,omitempty" bson:"preferredSingleSignOnMode,omitempty"`
	// PreferredTokenSigningKeyEndDateTime any `json:"preferredTokenSigningKeyEndDateTime,omitempty" bson:"preferredTokenSigningKeyEndDateTime,omitempty"`
	// PreferredTokenSigningKeyThumbprint  any `json:"preferredTokenSigningKeyThumbprint,omitempty" bson:"preferredTokenSigningKeyThumbprint,omitempty"`
	// ProvisionedPlans                    []struct {
	// 	CapabilityStatus   string `json:"capabilityStatus,omitempty" bson:"capabilityStatus,omitempty"`
	// 	ProvisioningStatus string `json:"provisioningStatus,omitempty" bson:"provisioningStatus,omitempty"`
	// 	Service            string `json:"service,omitempty" bson:"service,omitempty"`
	// } `json:"provisionedPlans,omitempty" bson:"provisionedPlans,omitempty"`
	// ProxyAddresses            []string `json:"proxyAddresses,omitempty" bson:"proxyAddresses,omitempty"`
	// PublishedPermissionScopes []struct {
	// 	AdminConsentDescription string `json:"adminConsentDescription,omitempty" bson:"adminConsentDescription,omitempty"`
	// 	AdminConsentDisplayName string `json:"adminConsentDisplayName,omitempty" bson:"adminConsentDisplayName,omitempty"`
	// 	ID                      string `json:"id,omitempty" bson:"id,omitempty"`
	// 	IsEnabled               bool   `json:"isEnabled,omitempty" bson:"isEnabled,omitempty"`
	// 	IsPrivate               bool   `json:"isPrivate,omitempty" bson:"isPrivate,omitempty"`
	// 	Type                    string `json:"type,omitempty" bson:"type,omitempty"`
	// 	UserConsentDescription  string `json:"userConsentDescription,omitempty" bson:"userConsentDescription,omitempty"`
	// 	UserConsentDisplayName  string `json:"userConsentDisplayName,omitempty" bson:"userConsentDisplayName,omitempty"`
	// 	Value                   string `json:"value,omitempty" bson:"value,omitempty"`
	// } `json:"publishedPermissionScopes,omitempty" bson:"publishedPermissionScopes,omitempty"`
	// PublisherName                          string    `json:"publisherName,omitempty" bson:"publisherName,omitempty"`
	// RefreshTokensValidFromDateTime         time.Time `json:"refreshTokensValidFromDateTime,omitempty" bson:"refreshTokensValidFromDateTime,omitempty"`
	// ReleaseTrack                           any       `json:"releaseTrack,omitempty" bson:"releaseTrack,omitempty"`
	// RenewedDateTime                        time.Time `json:"renewedDateTime,omitempty" bson:"renewedDateTime,omitempty"`
	// ReplyUrls                              []string  `json:"replyUrls,omitempty" bson:"replyUrls,omitempty"`
	// ResourceBehaviorOptions                []any     `json:"resourceBehaviorOptions,omitempty" bson:"resourceBehaviorOptions,omitempty"`
	// ResourceProvisioningOptions            []any     `json:"resourceProvisioningOptions,omitempty" bson:"resourceProvisioningOptions,omitempty"`
	// ResourceSpecificApplicationPermissions []any     `json:"resourceSpecificApplicationPermissions,omitempty" bson:"resourceSpecificApplicationPermissions,omitempty"`
	// SamlMetadataURL                        any       `json:"samlMetadataUrl,omitempty" bson:"samlMetadataUrl,omitempty"`
	// SamlSloBindingType                     string    `json:"samlSLOBindingType,omitempty" bson:"samlSLOBindingType,omitempty"`
	// SamlSingleSignOnSettings               any       `json:"samlSingleSignOnSettings,omitempty" bson:"samlSingleSignOnSettings,omitempty"`
	// SecurityEnabled                        bool      `json:"securityEnabled,omitempty" bson:"securityEnabled,omitempty"`
	// SecurityIdentifier    string   `json:"securityIdentifier,omitempty" bson:"securityIdentifier,omitempty"`
	ServicePrincipalNames []string `json:"servicePrincipalNames,omitempty" bson:"servicePrincipalNames,omitempty"`
	ServicePrincipalType  string   `json:"servicePrincipalType,omitempty" bson:"servicePrincipalType,omitempty"`
	// ServiceProvisioningErrors              []any     `json:"serviceProvisioningErrors,omitempty" bson:"serviceProvisioningErrors,omitempty"`
	// ShowInAddressList                      any       `json:"showInAddressList,omitempty" bson:"showInAddressList,omitempty"`
	// SignInAudience                         string    `json:"signInAudience,omitempty" bson:"signInAudience,omitempty"`
	// SignInSessionsValidFromDateTime        time.Time `json:"signInSessionsValidFromDateTime,omitempty" bson:"signInSessionsValidFromDateTime,omitempty"`
	// State                                  any       `json:"state,omitempty" bson:"state,omitempty"`
	// StreetAddress                          any       `json:"streetAddress,omitempty" bson:"streetAddress,omitempty"`
	// Surname                                *string   `json:"surname,omitempty" bson:"surname,omitempty"`
	Tags []string `json:"tags,omitempty" bson:"tags,omitempty"`
	// Theme                                  any       `json:"theme,omitempty" bson:"theme,omitempty"`
	// TokenEncryptionKeyID                   any       `json:"tokenEncryptionKeyId,omitempty" bson:"tokenEncryptionKeyId,omitempty"`
	// TokensRevocationDateTime               any       `json:"tokensRevocationDateTime,omitempty" bson:"tokensRevocationDateTime,omitempty"`
	// UniqueName                             any       `json:"uniqueName,omitempty" bson:"uniqueName,omitempty"`
	// UsageLocation                          *string   `json:"usageLocation,omitempty" bson:"usageLocation,omitempty"`
	UserPrincipalName string `json:"userPrincipalName,omitempty" bson:"userPrincipalName,omitempty"`
	UserType          string `json:"userType,omitempty" bson:"userType,omitempty"`
}

type StorageAccountBulkUploadBlobResponse added in v0.1.26

type StorageAccountBulkUploadBlobResponse struct {
	Errored  []string `json:"errored"`
	Uploaded []string `json:"uploaded"`
}

func BulkUploadBlob added in v0.1.26

func BulkUploadBlob(basePath string, options StorageAccountUploadBlobOptions) (responses StorageAccountBulkUploadBlobResponse)

type StorageAccountTlsVersion added in v0.1.29

type StorageAccountTlsVersion struct {
	ID                string    `json:"id,omitempty,omitzero" bson:"_id,omitempty,omitzero"`
	Name              string    `json:"name,omitempty,omitzero" bson:"name,omitempty,omitzero"`
	MinimumTlsVersion string    `json:"minimumTlsVersion,omitempty,omitzero" bson:"minimumTlsVersion,omitempty,omitzero"`
	ResourceGroup     string    `json:"resourceGroup,omitempty,omitzero" bson:"resourceGroup,omitempty,omitzero"`
	SubscriptionID    string    `json:"subscriptionId,omitempty,omitzero" bson:"subscriptionId,omitempty,omitzero"`
	SubscriptionName  string    `json:"subscriptionName,omitempty,omitzero" bson:"subscriptionName,omitempty,omitzero"`
	TenantID          string    `json:"tenantId,omitempty,omitzero" bson:"tenantId,omitempty,omitzero"`
	TenantName        string    `json:"tenantName,omitempty,omitzero" bson:"tenantName,omitempty,omitzero"`
	LastDBSync        time.Time `json:"lastDBSync,omitempty,omitzero" bson:"lastDBSync,omitempty,omitzero"`
	LastAzureSync     time.Time `json:"lastAzureSync,omitempty,omitzero" bson:"lastAzureSync,omitempty,omitzero"`
}

func CheckStorageAccountTlsVersions added in v0.1.29

func CheckStorageAccountTlsVersions(outputFile string, getAll bool, token *lib.AzureMultiAuthToken) (allResources []StorageAccountTlsVersion)

func CheckStorageAccountTlsVersionsForAllConfiguredTenants added in v0.1.29

func CheckStorageAccountTlsVersionsForAllConfiguredTenants(opts *lib.GetAllResourcesForAllConfiguredTenantsOptions, tokens lib.AllTenantTokens) (allResources []StorageAccountTlsVersion)

type StorageAccountUploadBlobOptions added in v0.1.26

type StorageAccountUploadBlobOptions struct {
	StorageAccountName   string
	ContainerName        string
	ConfiguredTenantName string
	BlobFileName         string
	BlobPrefix           string
}

type SubnetIPConfigResponse

type SubnetIPConfigResponse struct {
	Etag       string `json:"etag"`
	ID         string `json:"id"`
	Location   string `json:"location"`
	Name       string `json:"name"`
	Properties struct {
		AddressSpace struct {
			AddressPrefixes []string `json:"addressPrefixes"`
		} `json:"addressSpace"`
		DhcpOptions struct {
			DnsServers []any `json:"dnsServers"`
		} `json:"dhcpOptions"`
		EnableDdosProtection bool   `json:"enableDdosProtection"`
		ProvisioningState    string `json:"provisioningState"`
		ResourceGuid         string `json:"resourceGuid"`
		Subnets              []struct {
			Etag       string `json:"etag"`
			ID         string `json:"id"`
			Name       string `json:"name"`
			Properties struct {
				AddressPrefix    string `json:"addressPrefix"`
				Delegations      []any  `json:"delegations"`
				IpConfigurations []struct {
					Etag       string `json:"etag"`
					ID         string `json:"id"`
					Name       string `json:"name"`
					Resource   IPAddressItem
					Properties struct {
						Primary                         bool   `json:"primary,omitempty"`
						PrivateIpAddress                string `json:"privateIPAddress,omitempty"`
						PrivateIpAddressVersion         string `json:"privateIPAddressVersion,omitempty"`
						PrivateIpAllocationMethod       string `json:"privateIPAllocationMethod"`
						PrivateLinkConnectionProperties *struct {
							Fqdns              []string `json:"fqdns"`
							GroupID            string   `json:"groupId"`
							RequiredMemberName string   `json:"requiredMemberName"`
						} `json:"privateLinkConnectionProperties,omitempty"`
						ProvisioningState string `json:"provisioningState"`
						PublicIpAddress   *struct {
							ID string `json:"id"`
						} `json:"publicIPAddress,omitempty"`
						Subnet struct {
							ID string `json:"id"`
						} `json:"subnet"`
					} `json:"properties"`
					Type string `json:"type"`
				} `json:"ipConfigurations"`
				NetworkSecurityGroup *struct {
					ID string `json:"id"`
				} `json:"networkSecurityGroup,omitempty"`
				PrivateEndpointNetworkPolicies string `json:"privateEndpointNetworkPolicies"`
				PrivateEndpoints               []struct {
					ID string `json:"id"`
				} `json:"privateEndpoints,omitempty"`
				PrivateLinkServiceNetworkPolicies string `json:"privateLinkServiceNetworkPolicies"`
				ProvisioningState                 string `json:"provisioningState"`
				Purpose                           string `json:"purpose,omitempty"`
				RouteTable                        *struct {
					ID string `json:"id"`
				} `json:"routeTable,omitempty"`
				ServiceEndpoints []struct {
					Locations         []string `json:"locations"`
					ProvisioningState string   `json:"provisioningState"`
					Service           string   `json:"service"`
				} `json:"serviceEndpoints"`
			} `json:"properties"`
			Type string `json:"type"`
		} `json:"subnets"`
		VirtualNetworkPeerings []struct {
			Etag       string `json:"etag"`
			ID         string `json:"id"`
			Name       string `json:"name"`
			Properties struct {
				AllowForwardedTraffic     bool   `json:"allowForwardedTraffic"`
				AllowGatewayTransit       bool   `json:"allowGatewayTransit"`
				AllowVirtualNetworkAccess bool   `json:"allowVirtualNetworkAccess"`
				DoNotVerifyRemoteGateways bool   `json:"doNotVerifyRemoteGateways"`
				PeerCompleteVnets         bool   `json:"peerCompleteVnets"`
				PeeringState              string `json:"peeringState"`
				PeeringSyncLevel          string `json:"peeringSyncLevel"`
				ProvisioningState         string `json:"provisioningState"`
				RemoteAddressSpace        struct {
					AddressPrefixes []string `json:"addressPrefixes"`
				} `json:"remoteAddressSpace"`
				RemoteGateways []struct {
					ID string `json:"id"`
				} `json:"remoteGateways,omitempty"`
				RemoteVirtualNetwork struct {
					ID string `json:"id"`
				} `json:"remoteVirtualNetwork"`
				RemoteVirtualNetworkAddressSpace struct {
					AddressPrefixes []string `json:"addressPrefixes"`
				} `json:"remoteVirtualNetworkAddressSpace"`
				ResourceGuid     string `json:"resourceGuid"`
				RouteServiceVips struct {
					Af36ba888c9943f4A5e38fa90652cc96 string `json:"af36ba88-8c99-43f4-a5e3-8fa90652cc96,omitempty"`
				} `json:"routeServiceVips"`
				UseRemoteGateways bool `json:"useRemoteGateways"`
			} `json:"properties"`
			Type string `json:"type"`
		} `json:"virtualNetworkPeerings"`
	} `json:"properties"`
	Tags map[string]string `json:"tags"`
	Type string            `json:"type"`
}

type SubnetResponse

type SubnetResponse struct {
	Etag       string `json:"etag"`
	ID         string `json:"id"`
	Name       string `json:"name"`
	Properties struct {
		AddressPrefix string `json:"addressPrefix"`
		Delegations   []struct {
			Etag       string `json:"etag"`
			ID         string `json:"id"`
			Name       string `json:"name"`
			Properties struct {
				Actions           []string `json:"actions"`
				ProvisioningState string   `json:"provisioningState"`
				ServiceName       string   `json:"serviceName"`
			} `json:"properties"`
			Type string `json:"type"`
		} `json:"delegations"`
		IpConfigurations []struct {
			ID string `json:"id"`
		} `json:"ipConfigurations"`
		NetworkSecurityGroup struct {
			ID string `json:"id"`
		} `json:"networkSecurityGroup"`
		PrivateEndpointNetworkPolicies    string `json:"privateEndpointNetworkPolicies"`
		PrivateLinkServiceNetworkPolicies string `json:"privateLinkServiceNetworkPolicies"`
		ProvisioningState                 string `json:"provisioningState"`
		Purpose                           string `json:"purpose"`
		ServiceEndpoints                  []any  `json:"serviceEndpoints"`
	} `json:"properties"`
	Type string `json:"type"`
}

func ListVnetSubnets

func ListVnetSubnets(subscriptionId string, resourceGroupName string, virtualNetworkName string, mat lib.AzureMultiAuthToken) []SubnetResponse

type SubscriptionResGrpList

type SubscriptionResGrpList []ResourceGroup

type SubscriptionResourceList

type SubscriptionResourceList struct {
	ResourceCount int
	Resources     []lib.AzureResourceDetails
}

type TenantDetails

type TenantDetails struct {
	TenantId      string            `json:"id" bson:"_i,omitempty,omitzero"`
	TenantName    string            `json:"tenantName" bson:"tenantNam,omitempty,omitzero"`
	Subscriptions map[string]string `json:"subscriptions" bson:"subscription,omitempty,omitzero"`
}

type TenantList

type TenantList []TenantDetails

func ListAllAuthenticatedSubscriptions

func ListAllAuthenticatedSubscriptions(tokens *lib.AllTenantTokens) TenantList

type TenantResGrpList

type TenantResGrpList map[string]SubscriptionResGrpList

type TenantResourceList

type TenantResourceList struct {
	ResourceCount int
	Subscriptions map[string]SubscriptionResourceList
}

func GetAllTenantResources

func GetAllTenantResources(outputFile string, token *lib.AzureMultiAuthToken) TenantResourceList

type VirtualMachine added in v0.1.15

type VirtualMachine struct {
	ID         string `json:"id,omitempty,omitzero" bson:"id,omitempty,omitzero"`
	Location   string `json:"location,omitempty,omitzero" bson:"location,omitempty,omitzero"`
	Name       string `json:"name,omitempty,omitzero" bson:"name,omitempty,omitzero"`
	Properties struct {
		AdditionalCapabilities struct {
			HibernationEnabled bool `json:"hibernationEnabled,omitempty,omitzero" bson:"hibernationEnabled,omitempty,omitzero"`
		} `json:"additionalCapabilities,omitempty,omitzero" bson:"additionalCapabilities,omitempty,omitzero"`
		DiagnosticsProfile struct {
			BootDiagnostics struct {
				Enabled bool `json:"enabled,omitempty,omitzero" bson:"enabled,omitempty,omitzero"`
			} `json:"bootDiagnostics,omitempty,omitzero" bson:"bootDiagnostics,omitempty,omitzero"`
		} `json:"diagnosticsProfile,omitempty,omitzero" bson:"diagnosticsProfile,omitempty,omitzero"`
		HardwareProfile struct {
			VmSize string `json:"vmSize,omitempty,omitzero" bson:"vmSize,omitempty,omitzero"`
		} `json:"hardwareProfile,omitempty,omitzero" bson:"hardwareProfile,omitempty,omitzero"`
		NetworkProfile struct {
			NetworkInterfaces []struct {
				ID         string `json:"id,omitempty,omitzero" bson:"id,omitempty,omitzero"`
				Properties struct {
					DeleteOption string `json:"deleteOption,omitempty,omitzero" bson:"deleteOption,omitempty,omitzero"`
				} `json:"properties,omitempty,omitzero" bson:"properties,omitempty,omitzero"`
			} `json:"networkInterfaces,omitempty,omitzero" bson:"networkInterfaces,omitempty,omitzero"`
		} `json:"networkProfile,omitempty,omitzero" bson:"networkProfile,omitempty,omitzero"`
		OSProfile struct {
			AdminUsername            string `json:"adminUsername,omitempty,omitzero" bson:"adminUsername,omitempty,omitzero"`
			AllowExtensionOperations bool   `json:"allowExtensionOperations,omitempty,omitzero" bson:"allowExtensionOperations,omitempty,omitzero"`
			ComputerName             string `json:"computerName,omitempty,omitzero" bson:"computerName,omitempty,omitzero"`
			LinuxConfiguration       struct {
				DisablePasswordAuthentication bool `json:"disablePasswordAuthentication,omitempty,omitzero" bson:"disablePasswordAuthentication,omitempty,omitzero"`
				EnableVmAgentPlatformUpdates  bool `json:"enableVMAgentPlatformUpdates,omitempty,omitzero" bson:"enableVMAgentPlatformUpdates,omitempty,omitzero"`
				PatchSettings                 struct {
					AssessmentMode              string `json:"assessmentMode,omitempty,omitzero" bson:"assessmentMode,omitempty,omitzero"`
					AutomaticByPlatformSettings struct {
						BypassPlatformSafetyChecksOnUserSchedule bool   `` /* 133-byte string literal not displayed */
						RebootSetting                            string `json:"rebootSetting,omitempty,omitzero" bson:"rebootSetting,omitempty,omitzero"`
					} `json:"automaticByPlatformSettings,omitempty,omitzero" bson:"automaticByPlatformSettings,omitempty,omitzero"`
					PatchMode string `json:"patchMode,omitempty,omitzero" bson:"patchMode,omitempty,omitzero"`
				} `json:"patchSettings,omitempty,omitzero" bson:"patchSettings,omitempty,omitzero"`
				ProvisionVmAgent bool `json:"provisionVMAgent,omitempty,omitzero" bson:"provisionVMAgent,omitempty,omitzero"`
				SSH              struct {
					PublicKeys []struct {
						KeyData string `json:"keyData,omitempty,omitzero" bson:"keyData,omitempty,omitzero"`
						Path    string `json:"path,omitempty,omitzero" bson:"path,omitempty,omitzero"`
					} `json:"publicKeys,omitempty,omitzero" bson:"publicKeys,omitempty,omitzero"`
				} `json:"ssh,omitempty,omitzero" bson:"ssh,omitempty,omitzero"`
			} `json:"linuxConfiguration,omitempty,omitzero" bson:"linuxConfiguration,omitempty,omitzero"`
			RequireGuestProvisionSignal bool  `json:"requireGuestProvisionSignal,omitempty,omitzero" bson:"requireGuestProvisionSignal,omitempty,omitzero"`
			Secrets                     []any `json:"secrets,omitempty,omitzero" bson:"secrets,omitempty,omitzero"`
		} `json:"osProfile,omitempty,omitzero" bson:"osProfile,omitempty,omitzero"`
		ProvisioningState string `json:"provisioningState,omitempty,omitzero" bson:"provisioningState,omitempty,omitzero"`
		SecurityProfile   struct {
			SecurityType string `json:"securityType,omitempty,omitzero" bson:"securityType,omitempty,omitzero"`
			UefiSettings struct {
				SecureBootEnabled bool `json:"secureBootEnabled,omitempty,omitzero" bson:"secureBootEnabled,omitempty,omitzero"`
				VTpmEnabled       bool `json:"vTpmEnabled,omitempty,omitzero" bson:"vTpmEnabled,omitempty,omitzero"`
			} `json:"uefiSettings,omitempty,omitzero" bson:"uefiSettings,omitempty,omitzero"`
		} `json:"securityProfile,omitempty,omitzero" bson:"securityProfile,omitempty,omitzero"`
		StorageProfile struct {
			DataDisks          []any  `json:"dataDisks,omitempty,omitzero" bson:"dataDisks,omitempty,omitzero"`
			DiskControllerType string `json:"diskControllerType,omitempty,omitzero" bson:"diskControllerType,omitempty,omitzero"`
			ImageReference     struct {
				ExactVersion string `json:"exactVersion,omitempty,omitzero" bson:"exactVersion,omitempty,omitzero"`
				Offer        string `json:"offer,omitempty,omitzero" bson:"offer,omitempty,omitzero"`
				Publisher    string `json:"publisher,omitempty,omitzero" bson:"publisher,omitempty,omitzero"`
				Sku          string `json:"sku,omitempty,omitzero" bson:"sku,omitempty,omitzero"`
				Version      string `json:"version,omitempty,omitzero" bson:"version,omitempty,omitzero"`
			} `json:"imageReference,omitempty,omitzero" bson:"imageReference,omitempty,omitzero"`
			OSDisk struct {
				Caching      string  `json:"caching,omitempty,omitzero" bson:"caching,omitempty,omitzero"`
				CreateOption string  `json:"createOption,omitempty,omitzero" bson:"createOption,omitempty,omitzero"`
				DeleteOption string  `json:"deleteOption,omitempty,omitzero" bson:"deleteOption,omitempty,omitzero"`
				DiskSizeGb   float64 `json:"diskSizeGB,omitempty,omitzero" bson:"diskSizeGB,omitempty,omitzero"`
				ManagedDisk  struct {
					StorageAccountType string `json:"storageAccountType,omitempty,omitzero" bson:"storageAccountType,omitempty,omitzero"`
				} `json:"managedDisk,omitempty,omitzero" bson:"managedDisk,omitempty,omitzero"`
				OSType string `json:"osType,omitempty,omitzero" bson:"osType,omitempty,omitzero"`
			} `json:"osDisk,omitempty,omitzero" bson:"osDisk,omitempty,omitzero"`
		} `json:"storageProfile,omitempty,omitzero" bson:"storageProfile,omitempty,omitzero"`
		TimeCreated time.Time `json:"timeCreated,omitempty,omitzero" bson:"timeCreated,omitempty,omitzero"`
		VmID        string    `json:"vmId,omitempty,omitzero" bson:"vmId,omitempty,omitzero"`
	} `json:"properties,omitempty,omitzero" bson:"properties,omitempty,omitzero"`
	Type  string   `json:"type,omitempty,omitzero" bson:"type,omitempty,omitzero"`
	Zones []string `json:"zones,omitempty,omitzero" bson:"zones,omitempty,omitzero"`
}

type VirtualMachineInstanceView added in v0.1.15

type VirtualMachineInstanceView struct {
	BootDiagnostics struct{} `json:"bootDiagnostics,omitempty,omitzero" bson:"bootDiagnostics,omitempty,omitzero"`
	ComputerName    string   `json:"computerName,omitempty,omitzero" bson:"computerName,omitempty,omitzero"`
	Disks           []struct {
		Name     string `json:"name,omitempty,omitzero" bson:"name,omitempty,omitzero"`
		Statuses []struct {
			Code          string    `json:"code,omitempty,omitzero" bson:"code,omitempty,omitzero"`
			DisplayStatus string    `json:"displayStatus,omitempty,omitzero" bson:"displayStatus,omitempty,omitzero"`
			Level         string    `json:"level,omitempty,omitzero" bson:"level,omitempty,omitzero"`
			Time          time.Time `json:"time,omitempty,omitzero" bson:"time,omitempty,omitzero"`
		} `json:"statuses,omitempty,omitzero" bson:"statuses,omitempty,omitzero"`
	} `json:"disks,omitempty,omitzero" bson:"disks,omitempty,omitzero"`
	Extensions []struct {
		Name     string `json:"name,omitempty,omitzero" bson:"name,omitempty,omitzero"`
		Statuses []struct {
			Code          string `json:"code,omitempty,omitzero" bson:"code,omitempty,omitzero"`
			DisplayStatus string `json:"displayStatus,omitempty,omitzero" bson:"displayStatus,omitempty,omitzero"`
			Level         string `json:"level,omitempty,omitzero" bson:"level,omitempty,omitzero"`
			Message       string `json:"message,omitempty,omitzero" bson:"message,omitempty,omitzero"`
		} `json:"statuses,omitempty,omitzero" bson:"statuses,omitempty,omitzero"`
		Type               string `json:"type,omitempty,omitzero" bson:"type,omitempty,omitzero"`
		TypeHandlerVersion string `json:"typeHandlerVersion,omitempty,omitzero" bson:"typeHandlerVersion,omitempty,omitzero"`
	} `json:"extensions,omitempty,omitzero" bson:"extensions,omitempty,omitzero"`
	HyperVGeneration string `json:"hyperVGeneration,omitempty,omitzero" bson:"hyperVGeneration,omitempty,omitzero"`
	OSName           string `json:"osName,omitempty,omitzero" bson:"osName,omitempty,omitzero"`
	OSVersion        string `json:"osVersion,omitempty,omitzero" bson:"osVersion,omitempty,omitzero"`
	PatchStatus      struct {
		AvailablePatchSummary struct {
			AssessmentActivityID          string  `json:"assessmentActivityId,omitempty,omitzero" bson:"assessmentActivityId,omitempty,omitzero"`
			CriticalAndSecurityPatchCount float64 `json:"criticalAndSecurityPatchCount,omitempty,omitzero" bson:"criticalAndSecurityPatchCount,omitempty,omitzero"`
			Error                         struct {
				Code    string `json:"code,omitempty,omitzero" bson:"code,omitempty,omitzero"`
				Details []struct {
					Code    string `json:"code,omitempty,omitzero" bson:"code,omitempty,omitzero"`
					Message string `json:"message,omitempty,omitzero" bson:"message,omitempty,omitzero"`
				} `json:"details,omitempty,omitzero" bson:"details,omitempty,omitzero"`
				Message string `json:"message,omitempty,omitzero" bson:"message,omitempty,omitzero"`
			} `json:"error,omitempty,omitzero" bson:"error,omitempty,omitzero"`
			LastModifiedTime time.Time `json:"lastModifiedTime,omitempty,omitzero" bson:"lastModifiedTime,omitempty,omitzero"`
			OtherPatchCount  float64   `json:"otherPatchCount,omitempty,omitzero" bson:"otherPatchCount,omitempty,omitzero"`
			RebootPending    bool      `json:"rebootPending,omitempty,omitzero" bson:"rebootPending,omitempty,omitzero"`
			StartTime        time.Time `json:"startTime,omitempty,omitzero" bson:"startTime,omitempty,omitzero"`
			Status           string    `json:"status,omitempty,omitzero" bson:"status,omitempty,omitzero"`
		} `json:"availablePatchSummary,omitempty,omitzero" bson:"availablePatchSummary,omitempty,omitzero"`
		ConfigurationStatuses []struct {
			Code          string    `json:"code,omitempty,omitzero" bson:"code,omitempty,omitzero"`
			DisplayStatus string    `json:"displayStatus,omitempty,omitzero" bson:"displayStatus,omitempty,omitzero"`
			Level         string    `json:"level,omitempty,omitzero" bson:"level,omitempty,omitzero"`
			Time          time.Time `json:"time,omitempty,omitzero" bson:"time,omitempty,omitzero"`
		} `json:"configurationStatuses,omitempty,omitzero" bson:"configurationStatuses,omitempty,omitzero"`
	} `json:"patchStatus,omitempty,omitzero" bson:"patchStatus,omitempty,omitzero"`
	Statuses []struct {
		Code          string    `json:"code,omitempty,omitzero" bson:"code,omitempty,omitzero"`
		DisplayStatus string    `json:"displayStatus,omitempty,omitzero" bson:"displayStatus,omitempty,omitzero"`
		Level         string    `json:"level,omitempty,omitzero" bson:"level,omitempty,omitzero"`
		Time          time.Time `json:"time,omitempty" bson:"time,omitempty"`
	} `json:"statuses,omitempty,omitzero" bson:"statuses,omitempty,omitzero"`
	VmAgent struct {
		ExtensionHandlers []struct {
			Status struct {
				Code          string `json:"code,omitempty,omitzero" bson:"code,omitempty,omitzero"`
				DisplayStatus string `json:"displayStatus,omitempty,omitzero" bson:"displayStatus,omitempty,omitzero"`
				Level         string `json:"level,omitempty,omitzero" bson:"level,omitempty,omitzero"`
				Message       string `json:"message,omitempty,omitzero" bson:"message,omitempty,omitzero"`
			} `json:"status,omitempty,omitzero" bson:"status,omitempty,omitzero"`
			Type               string `json:"type,omitempty,omitzero" bson:"type,omitempty,omitzero"`
			TypeHandlerVersion string `json:"typeHandlerVersion,omitempty,omitzero" bson:"typeHandlerVersion,omitempty,omitzero"`
		} `json:"extensionHandlers,omitempty,omitzero" bson:"extensionHandlers,omitempty,omitzero"`
		Statuses []struct {
			Code          string    `json:"code,omitempty,omitzero" bson:"code,omitempty,omitzero"`
			DisplayStatus string    `json:"displayStatus,omitempty,omitzero" bson:"displayStatus,omitempty,omitzero"`
			Level         string    `json:"level,omitempty,omitzero" bson:"level,omitempty,omitzero"`
			Message       string    `json:"message,omitempty,omitzero" bson:"message,omitempty,omitzero"`
			Time          time.Time `json:"time,omitempty,omitzero" bson:"time,omitempty,omitzero"`
		} `json:"statuses,omitempty,omitzero" bson:"statuses,omitempty,omitzero"`
		VmAgentVersion string `json:"vmAgentVersion,omitempty,omitzero" bson:"vmAgentVersion,omitempty,omitzero"`
	} `json:"vmAgent,omitempty,omitzero" bson:"vmAgent,omitempty,omitzero"`
}

type VirtualNetworkPeering

type VirtualNetworkPeering struct {
	Etag       string `json:"etag"`
	ID         string `json:"id"`
	Name       string `json:"name"`
	Properties struct {
		AllowForwardedTraffic     bool   `json:"allowForwardedTraffic"`
		AllowGatewayTransit       bool   `json:"allowGatewayTransit"`
		AllowVirtualNetworkAccess bool   `json:"allowVirtualNetworkAccess"`
		DoNotVerifyRemoteGateways bool   `json:"doNotVerifyRemoteGateways"`
		PeerCompleteVnets         bool   `json:"peerCompleteVnets"`
		PeeringState              string `json:"peeringState"`
		PeeringSyncLevel          string `json:"peeringSyncLevel"`
		ProvisioningState         string `json:"provisioningState"`
		RemoteAddressSpace        struct {
			AddressPrefixes []string `json:"addressPrefixes"`
		} `json:"remoteAddressSpace"`
		RemoteGateways []struct {
			ID string `json:"id"`
		} `json:"remoteGateways,omitempty"`
		RemoteVirtualNetwork struct {
			ID string `json:"id"`
		} `json:"remoteVirtualNetwork"`
		RemoteVirtualNetworkAddressSpace struct {
			AddressPrefixes []string `json:"addressPrefixes"`
		} `json:"remoteVirtualNetworkAddressSpace"`
		ResourceGuid     string `json:"resourceGuid"`
		RouteServiceVips struct {
			Af36ba888c9943f4A5e38fa90652cc96 string `json:"af36ba88-8c99-43f4-a5e3-8fa90652cc96,omitempty"`
		} `json:"routeServiceVips"`
		UseRemoteGateways bool `json:"useRemoteGateways"`
	} `json:"properties"`
	Type string `json:"type"`
}

type Vnet

type Vnet struct {
	ID                     string                 `json:"id"`
	Location               string                 `json:"location"`
	Name                   string                 `json:"name"`
	ResourceGroup          string                 `json:"resourceGroup"`
	SubscriptionID         string                 `json:"subscriptionId"`
	AddressSpace           []string               `json:"addressSpace"`
	Subnets                []SubnetResponse       `json:"subnets"`
	ProvisioningState      string                 `json:"provisioningState"`
	VirtualNetworkPeerings []ProcessedVnetPeering `json:"virtualNetworkPeerings"`
	Tags                   map[string]string      `json:"tags"`
	Type                   string                 `json:"type"`
}

func ListAllSubscriptionVnets

func ListAllSubscriptionVnets(subscriptionId string, mat lib.AzureMultiAuthToken) []Vnet

type VnetListResponse

type VnetListResponse struct {
	Value []VnetResponse
}

type VnetResponse

type VnetResponse struct {
	Etag       string `json:"etag"`
	ID         string `json:"id"`
	Location   string `json:"location"`
	Name       string `json:"name"`
	Properties struct {
		AddressSpace struct {
			AddressPrefixes []string `json:"addressPrefixes"`
		} `json:"addressSpace"`
		DhcpOptions struct {
			DnsServers []any `json:"dnsServers"`
		} `json:"dhcpOptions"`
		EnableDdosProtection bool   `json:"enableDdosProtection"`
		ProvisioningState    string `json:"provisioningState"`
		ResourceGuid         string `json:"resourceGuid"`
		Subnets              []struct {
			Etag       string `json:"etag"`
			ID         string `json:"id"`
			Name       string `json:"name"`
			Properties struct {
				AddressPrefix    string `json:"addressPrefix"`
				Delegations      []any  `json:"delegations"`
				IpConfigurations []struct {
					ID string `json:"id"`
				} `json:"ipConfigurations"`
				NetworkSecurityGroup *struct {
					ID string `json:"id"`
				} `json:"networkSecurityGroup,omitempty"`
				PrivateEndpointNetworkPolicies string `json:"privateEndpointNetworkPolicies"`
				PrivateEndpoints               []struct {
					ID string `json:"id"`
				} `json:"privateEndpoints,omitempty"`
				PrivateLinkServiceNetworkPolicies string `json:"privateLinkServiceNetworkPolicies"`
				ProvisioningState                 string `json:"provisioningState"`
				Purpose                           string `json:"purpose,omitempty"`
				RouteTable                        *struct {
					ID string `json:"id"`
				} `json:"routeTable,omitempty"`
				ServiceEndpoints []struct {
					Locations         []string `json:"locations"`
					ProvisioningState string   `json:"provisioningState"`
					Service           string   `json:"service"`
				} `json:"serviceEndpoints"`
			} `json:"properties"`
			Type string `json:"type"`
		} `json:"subnets"`
		VirtualNetworkPeerings []struct {
			Etag       string `json:"etag"`
			ID         string `json:"id"`
			Name       string `json:"name"`
			Properties struct {
				AllowForwardedTraffic     bool   `json:"allowForwardedTraffic"`
				AllowGatewayTransit       bool   `json:"allowGatewayTransit"`
				AllowVirtualNetworkAccess bool   `json:"allowVirtualNetworkAccess"`
				DoNotVerifyRemoteGateways bool   `json:"doNotVerifyRemoteGateways"`
				PeerCompleteVnets         bool   `json:"peerCompleteVnets"`
				PeeringState              string `json:"peeringState"`
				PeeringSyncLevel          string `json:"peeringSyncLevel"`
				ProvisioningState         string `json:"provisioningState"`
				RemoteAddressSpace        struct {
					AddressPrefixes []string `json:"addressPrefixes"`
				} `json:"remoteAddressSpace"`
				RemoteGateways []struct {
					ID string `json:"id"`
				} `json:"remoteGateways,omitempty"`
				RemoteVirtualNetwork struct {
					ID string `json:"id"`
				} `json:"remoteVirtualNetwork"`
				RemoteVirtualNetworkAddressSpace struct {
					AddressPrefixes []string `json:"addressPrefixes"`
				} `json:"remoteVirtualNetworkAddressSpace"`
				ResourceGuid     string `json:"resourceGuid"`
				RouteServiceVips struct {
					Af36ba888c9943f4A5e38fa90652cc96 string `json:"af36ba88-8c99-43f4-a5e3-8fa90652cc96,omitempty"`
				} `json:"routeServiceVips"`
				UseRemoteGateways bool `json:"useRemoteGateways"`
			} `json:"properties"`
			Type string `json:"type"`
		} `json:"virtualNetworkPeerings"`
	} `json:"properties"`
	Tags map[string]string `json:"tags"`
	Type string            `json:"type"`
}

Jump to

Keyboard shortcuts

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