manifests/collectors/Databases/MySQLflexible.psd1
|
# # GENERATED by scripts/ConvertTo-ScoutCollectorDefinition.ps1 from Modules/Public/InventoryModules/Databases/MySQLflexible.ps1 (AB#5660). # Field expressions are copied verbatim from the original collector and evaluate in an # equivalent scope -- see docs/design/decisions/declarative-collectors.md. # Review before trusting; regenerate rather than hand-patch if the source collector changes. # @{ ResourceTypes = @( 'Microsoft.DBforMySQL/flexibleServers' ) AdditionalFilter = $null RowLoopVariable = '1' Preamble = @' $ResUCount = 1 $sub1 = $SUB | Where-Object { $_.id -eq $1.subscriptionId } $data = $1.PROPERTIES $Retired = $Retirements | Where-Object { $_.id -eq $1.id } if ($Retired) { $RetiredFeature = foreach ($Retire in $Retired) { $RetiredServiceID = $Unsupported | Where-Object {$_.Id -eq $Retired.ServiceID} $tmp0 = [pscustomobject]@{ 'RetiredFeature' = $RetiredServiceID.RetiringFeature 'RetiredDate' = $RetiredServiceID.RetirementDate } $tmp0 } $RetiringFeature = if (@($RetiredFeature.RetiredFeature).count -gt 1) { $RetiredFeature.RetiredFeature | ForEach-Object { $_ + ' ,' } }else { $RetiredFeature.RetiredFeature} $RetiringFeature = [string]$RetiringFeature $RetiringFeature = if ($RetiringFeature -like '* ,*') { $RetiringFeature -replace ".$" }else { $RetiringFeature } $RetiringDate = if (@($RetiredFeature.RetiredDate).count -gt 1) { $RetiredFeature.RetiredDate | ForEach-Object { $_ + ' ,' } }else { $RetiredFeature.RetiredDate} $RetiringDate = [string]$RetiringDate $RetiringDate = if ($RetiringDate -like '* ,*') { $RetiringDate -replace ".$" }else { $RetiringDate } } else { $RetiringFeature = $null $RetiringDate = $null } $Tags = if(![string]::IsNullOrEmpty($1.tags.psobject.properties)){$1.tags.psobject.properties}else{'0'} '@ AdditionalRowLoops = @() Fields = @( @{ Name = 'ID' Expression = '$1.id' } @{ Name = 'Subscription' Expression = '$sub1.Name' } @{ Name = 'Resource Group' Expression = '$1.RESOURCEGROUP' } @{ Name = 'Name' Expression = '$1.NAME' } @{ Name = 'Location' Expression = '$1.LOCATION' } @{ Name = 'SKU' Expression = '$data.sku.name' } @{ Name = 'Retiring Feature' Expression = '$RetiringFeature' } @{ Name = 'Retiring Date' Expression = '$RetiringDate' } @{ Name = 'Version' Expression = '$data.version' } @{ Name = 'State' Expression = '$data.state' } @{ Name = 'Zone' Expression = '$data.availabilityZone' } @{ Name = 'Administrator Login' Expression = '$data.administratorLogin' } @{ Name = 'Storage Size (GB)' Expression = '$data.storage.storageSizeGB' } @{ Name = 'Limit IOPs' Expression = '$data.storage.iops' } @{ Name = 'Auto Grow' Expression = '$data.storage.autoGrow' } @{ Name = 'Storage Sku' Expression = '$data.storage.storageSku' } @{ Name = 'Custom Maintenance Window' Expression = '$data.maintenanceWindow.customWindow' } @{ Name = 'Replication Role' Expression = '$data.replicationRole' } @{ Name = 'Replica Capacity' Expression = '$data.replicaCapacity' } @{ Name = 'Public Network Access' Expression = '$data.network.publicNetworkAccess' } @{ Name = 'Backup Retention Days' Expression = '$data.backup.backupRetentionDays' } @{ Name = 'Geo Redundant Backup' Expression = '$data.backup.geoRedundantBackup' } @{ Name = 'High Availability' Expression = '$data.highAvailability.mode' } @{ Name = 'High Availability State' Expression = '$data.highAvailability.state' } @{ Name = 'FQDN' Expression = '$data.fullyQualifiedDomainName' } @{ Name = 'Resource U' Expression = '$ResUCount' } @{ Name = 'Tag Name' Expression = '[string]$Tag.Name' } @{ Name = 'Tag Value' Expression = '[string]$Tag.Value' } ) Export = @{ WorksheetName = 'MySQL Flexible' TableNamePrefix = 'MySQLFlexTable_' Columns = @( 'Subscription' 'Resource Group' 'Name' 'Location' 'SKU' 'Retiring Feature' 'Retiring Date' 'Version' 'State' 'Zone' 'Administrator Login' 'Storage Size (GB)' 'Limit IOPs' 'Auto Grow' 'Storage Sku' 'Custom Maintenance Window' 'Replication Role' 'Replica Capacity' 'Public Network Access' 'Backup Retention Days' 'Geo Redundant Backup' 'High Availability' 'High Availability State' 'FQDN' 'Resource U' ) TagColumns = @( 'Tag Name' 'Tag Value' ) TagColumnsBefore = 'Resource U' NumberFormat = '0' ConditionalText = @( 'New-ConditionalText -Range F2:F100 -ConditionalType ContainsText' ) } SourceCollector = 'Modules/Public/InventoryModules/Databases/MySQLflexible.ps1' } |