diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt index f3e91f1c79..2a1ec7575a 100644 --- a/.github/actions/spelling/expect.txt +++ b/.github/actions/spelling/expect.txt @@ -3,7 +3,9 @@ activitylog Auths backupconfiguration bigquery +Brotli cavium +cdn certificatechains cmek CMKs @@ -20,6 +22,7 @@ GOBIN gpu gvnic hostkeys +iap iex ingresstls loggingservice @@ -32,6 +35,7 @@ netfirewallprofile netfirewallrule nodepool Pids +postgre preemptibility preemptible pushconfig @@ -44,6 +48,8 @@ spo sqlserver sshkeys sysctls +TTLs +UDF unarchived vdcs vmknics @@ -51,8 +57,3 @@ Vtpm vulnerabilityassessmentsettings wfascimprov wil -Brotli -cdn -iap -TTLs -UDF diff --git a/resources/packs/azure/azure.go b/resources/packs/azure/azure.go index 44229bb938..eba37e14ea 100644 --- a/resources/packs/azure/azure.go +++ b/resources/packs/azure/azure.go @@ -35,3 +35,11 @@ func msGraphTransport(t providers.Instance) (*microsoft_transport.Provider, erro } return at, nil } + +func azureTagsToInterface(data map[string]*string) map[string]interface{} { + labels := make(map[string]interface{}) + for key := range data { + labels[key] = core.ToString(data[key]) + } + return labels +} diff --git a/resources/packs/azure/azure.lr b/resources/packs/azure/azure.lr index 093ab6187b..da462fe4aa 100644 --- a/resources/packs/azure/azure.lr +++ b/resources/packs/azure/azure.lr @@ -1,46 +1,107 @@ option go_package = "go.mondoo.com/cnquery/resources/packs/azure" -alias azurerm = azure -alias azurerm.resource = azure.resource -alias azurerm.compute = azure.compute -alias azurerm.compute.vm = azure.compute.vm -alias azurerm.compute.disk = azure.compute.disk -alias azurerm.network = azure.network -alias azurerm.network.interface = azure.network.interface -alias azurerm.network.securitygroup = azure.network.securitygroup -alias azurerm.network.securityrule = azure.network.securityrule -alias azurerm.network.watcher = azure.network.watcher -alias azurerm.storage = azure.storage -alias azurerm.storage.account = azure.storage.account -alias azurerm.storage.container = azure.storage.container -alias azurerm.web = azure.web -alias azurerm.web.appsite = azure.web.appsite -alias azurerm.web.appsiteauthsettings = azure.web.appsiteauthsettings -alias azurerm.web.appsiteconfig = azure.web.appsiteconfig -alias azurerm.sql = azure.sql -alias azurerm.sql.server = azure.sql.server -alias azurerm.sql.server.administrator = azure.sql.server.administrator -alias azurerm.sql.database = azure.sql.database -alias azurerm.sql.databaseusage = azure.sql.databaseusage -alias azurerm.postgresql = azure.postgresql -alias azurerm.postgresql.server = azure.postgresql.server -alias azurerm.postgresql.database = azure.postgresql.database -alias azurerm.mysql = azure.mysql -alias azurerm.mysql.server = azure.mysql.server -alias azurerm.mysql.database = azure.mysql.database -alias azurerm.mariadb = azure.mariadb -alias azurerm.mariadb.server = azure.mariadb.server -alias azurerm.mariadb.database = azure.mariadb.database -alias azurerm.sql.configuration = azure.sql.configuration -alias azurerm.sql.firewallrule = azure.sql.firewallrule -alias azurerm.keyvault = azure.keyvault -alias azurerm.keyvault.vault = azure.keyvault.vault -alias azurerm.keyvault.key = azure.keyvault.key -alias azurerm.keyvault.certificate = azure.keyvault.certificate -alias azurerm.keyvault.secret = azure.keyvault.secret -alias azurerm.monitor = azure.monitor -alias azurerm.monitor.logprofile = azure.monitor.logprofile -alias azurerm.monitor.diagnosticsetting = azure.monitor.diagnosticsetting +alias azurerm = azure.subscription +alias azurerm.resource = azure.subscription.resource +alias azurerm.compute = azure.subscription.computeService +alias azurerm.compute.vm = azure.subscription.computeService.vm +alias azurerm.compute.disk = azure.subscription.computeService.disk +alias azurerm.network = azure.subscription.networkService +alias azurerm.network.interface = azure.subscription.networkService.interface +alias azurerm.network.securitygroup = azure.subscription.networkService.securityGroup +alias azurerm.network.securityrule = azure.subscription.networkService.securityrule +alias azurerm.network.watcher = azure.subscription.networkService.watcher +alias azurerm.storage = azure.subscription.storageService +alias azurerm.storage.account = azure.subscription.storageService.account +alias azurerm.storage.container = azure.subscription.storageService.account.container +alias azurerm.web = azure.subscription.webService +alias azurerm.web.appsite = azure.subscription.webService.appsite +alias azurerm.web.appsiteauthsettings = azure.subscription.webService.appsiteauthsettings +alias azurerm.web.appsiteconfig = azure.subscription.webService.appsiteconfig +alias azurerm.sql = azure.subscription.sqlService +alias azurerm.sql.server = azure.subscription.sqlService.server +alias azurerm.sql.server.administrator = azure.subscription.sqlService.server.administrator +alias azurerm.sql.database = azure.subscription.sqlService.database +alias azurerm.sql.databaseusage = azure.subscription.sqlService.databaseusage +alias azurerm.postgresql = azure.subscription.postgresqlService +alias azurerm.postgresql.server = azure.subscription.postgresqlService.server +alias azurerm.postgresql.database = azure.subscription.postgresqlService.database +alias azurerm.mysql = azure.subscription.mysqlService +alias azurerm.mysql.server = azure.subscription.mysqlService.server +alias azurerm.mysql.database = azure.subscription.mysqlService.database +alias azurerm.mariadb = azure.subscription.mariadbService +alias azurerm.mariadb.server = azure.subscription.mariadbService.server +alias azurerm.mariadb.database = azure.subscription.mariadbService.database +alias azurerm.sql.configuration = azure.subscription.sqlService.configuration +alias azurerm.sql.firewallrule = azure.subscription.sqlService.firewallrule +alias azurerm.keyvault = azure.subscription.keyvaultService +alias azurerm.keyvault.vault = azure.subscription.keyvaultService.vault +alias azurerm.keyvault.key = azure.subscription.keyvaultService.key +alias azurerm.keyvault.certificate = azure.subscription.keyvaultService.certificate +alias azurerm.keyvault.secret = azure.subscription.keyvaultService.secret +alias azurerm.monitor = azure.subscription.monitorService +alias azurerm.monitor.logprofile = azure.subscription.monitorService.logprofile +alias azurerm.monitor.diagnosticsetting = azure.subscription.monitorService.diagnosticsetting + +alias azure = azure.subscription +alias azure.authorization = azure.subscription.authorizationService +alias azure.authorization.roleDefinition = azure.subscription.authorizationService.roleDefinition +alias azure.authorization.roleDefinition.permission = azure.subscription.authorizationService.roleDefinition.permission +alias azure.cloudDefender = azure.subscription.cloudDefenderService +alias azure.cloudDefender.securityContact = azure.subscription.cloudDefenderService.securityContact +alias azure.compute = azure.subscription.computeService +alias azure.compute.disk = azure.subscription.computeService.disk +alias azure.compute.vm = azure.subscription.computeService.vm +alias azure.keyvault = azure.subscription.keyvaultService +alias azure.keyvault.certificate = azure.subscription.keyvaultService.certificate +alias azure.keyvault.key = azure.subscription.keyvaultService.key +alias azure.keyvault.secret = azure.subscription.keyvaultService.secret +alias azure.keyvault.vault = azure.subscription.keyvaultService.vault +alias azure.mariadb = azure.subscription.mariadbService +alias azure.mariadb.database = azure.subscription.mariadbService.database +alias azure.mariadb.server = azure.subscription.mariadbService.server +alias azure.monitor = azure.subscription.monitorService +alias azure.monitor.activitylog = azure.subscription.monitorService.activitylog +alias azure.monitor.activitylog.alert = azure.subscription.monitorService.activitylog.alert +alias azure.monitor.diagnosticsetting = azure.subscription.monitorService.diagnosticsetting +alias azure.monitor.logprofile = azure.subscription.monitorService.logprofile +alias azure.mysql = azure.subscription.mysqlService +alias azure.mysql.database = azure.subscription.mysqlService.database +alias azure.mysql.flexibleServer = azure.subscription.mysqlService.flexibleServer +alias azure.mysql.server = azure.subscription.mysqlService.server +alias azure.network = azure.subscription.networkService +alias azure.network.interface = azure.subscription.networkService.interface +alias azure.network.securitygroup = azure.subscription.networkService.securityGroup +alias azure.network.securityrule = azure.subscription.networkService.securityrule +alias azure.network.watcher = azure.subscription.networkService.watcher +alias azure.network.watcher.flowlog = azure.subscription.networkService.watcher.flowlog +alias azure.postgresql = azure.subscription.postgresqlService +alias azure.postgresql.database = azure.subscription.postgresqlService.database +alias azure.postgresql.server = azure.subscription.postgresqlService.server +alias azure.resource = azure.subscription.resource +alias azure.resourcegroup = azure.subscription.resourcegroup +alias azure.sql = azure.subscription.sqlService +alias azure.sql.configuration = azure.subscription.sqlService.configuration +alias azure.sql.database = azure.subscription.sqlService.database +alias azure.sql.databaseusage = azure.subscription.sqlService.databaseusage +alias azure.sql.firewallrule = azure.subscription.sqlService.firewallrule +alias azure.sql.server = azure.subscription.sqlService.server +alias azure.sql.server.administrator = azure.subscription.sqlService.server.administrator +alias azure.sql.server.vulnerabilityassessmentsettings = azure.subscription.sqlService.server.vulnerabilityassessmentsettings +alias azure.storage = azure.subscription.storageService +alias azure.storage.account = azure.subscription.storageService.account +alias azure.storage.account.blobService.properties = azure.subscription.storageService.account.blobService.properties +alias azure.storage.account.dataProtection = azure.subscription.storageService.account.dataProtection +alias azure.storage.account.queueService.properties = azure.subscription.storageService.account.queueService.properties +alias azure.storage.account.service.properties.logging = azure.subscription.storageService.account.service.properties.logging +alias azure.storage.account.service.properties.metrics = azure.subscription.storageService.account.service.properties.metrics +alias azure.storage.account.service.properties.retentionPolicy = azure.subscription.storageService.account.service.properties.retentionPolicy +alias azure.storage.account.tableService.properties = azure.subscription.storageService.account.tableService.properties +alias azure.storage.account.tableService.properties = azure.subscription.storageService.account.tableService.properties +alias azure.storage.container = azure.subscription.storageService.account.container +alias azure.web = azure.subscription.webService +alias azure.web.appsite = azure.subscription.webService.appsite +alias azure.web.appsiteauthsettings = azure.subscription.webService.appsiteauthsettings +alias azure.web.appsiteconfig = azure.subscription.webService.appsiteconfig // Azure Active Directory (deprecated, use microsoft resource pack instead) azuread { @@ -130,16 +191,59 @@ private azuread.serviceprincipal @defaults("id") { id string } -// Azure Resources -azure { + +// Azure Subscription +azure.subscription @defaults ("name") { + // Full resource identifier of the subscription + id() string + // Name of the subscription + name() string + // Subscription identifier + subscriptionId() string + // Subscription tenant identifier + tenantId() string + // List of tenants that manage the subscription + managedByTenants() []string + // Subscription tags + tags() map[string]string + // Subscription state + state() string + // Subscription authorization source + authorizationSource() string + // Subscription policies + subscriptionsPolicies() dict + // Get resource groups inside the subscription + resourceGroups() []azure.subscription.resourcegroup + // Get compute resources inside the subscription + compute() azure.subscription.computeService + // Get network resources inside the subscription + network() azure.subscription.networkService + // Get storage resources inside the subscription + storage() azure.subscription.storageService + // Get web resources inside the subscription + web() azure.subscription.webService + // Get SQL resources inside the subscription + sql() azure.subscription.sqlService + // Get MySQL resources inside the subscription + mySql() azure.subscription.mysqlService + // Get PostgreSQL resources inside the subscription + postgreSql() azure.subscription.postgresqlService + // Get MariaDB resources inside the subscription + mariaDb() azure.subscription.mariadbService + // Get key vault resources inside the subscription + keyVault() azure.subscription.keyvaultService + // Get authorization resources inside the subscription + authorization() azure.subscription.authorizationService + // Get monitor resources inside the subscription + monitor() azure.subscription.monitorService + // Get cloud defender resources inside the subscription + cloudDefender() azure.subscription.cloudDefenderService // Get all the resources in a subscription - resources() []azure.resource - // Get all the resource groups in a subscription - resourceGroups() []azure.resourcegroup + resources() []azure.subscription.resource } // Azure Resource -private azure.resource @defaults("id name location") { +private azure.subscription.resource @defaults("id name location") { // Resource ID id string // Resource name @@ -169,7 +273,7 @@ private azure.resource @defaults("id name location") { } // Azure Resource Group -private azure.resourcegroup @defaults("name location") { +private azure.subscription.resourcegroup @defaults("name location") { // Resource Group ID id string // Resource Group name @@ -187,15 +291,17 @@ private azure.resourcegroup @defaults("name location") { } // Azure Compute -azure.compute { +private azure.subscription.computeService { + // The subscription identifier + subscriptionId string // Lists all compute instances - vms() []azure.compute.vm + vms() []azure.subscription.computeService.vm // Lists all the disks under a subscription - disks() []azure.compute.disk + disks() []azure.subscription.computeService.disk } // Azure Compute Virtual Machine -private azure.compute.vm @defaults("id name location ") { +private azure.subscription.computeService.vm @defaults("id name location ") { // VM ID id string // VM name @@ -211,13 +317,13 @@ private azure.compute.vm @defaults("id name location ") { // VM extension extensions() []dict // VM compute disk - osDisk() azure.compute.disk + osDisk() azure.subscription.computeService.disk // VM compute data disk - dataDisks() []azure.compute.disk + dataDisks() []azure.subscription.computeService.disk } // Azure Disk Resource -private azure.compute.disk @defaults("id name location") { +private azure.subscription.computeService.disk @defaults("id name location") { // Disk resource id id string // Disk resource name @@ -241,17 +347,19 @@ private azure.compute.disk @defaults("id name location") { } // Azure Network -azure.network { +private azure.subscription.networkService { + // The subscription identifier + subscriptionId string // List of network interfaces - interfaces() []azure.network.interface + interfaces() []azure.subscription.networkService.interface // List of network security groups - securityGroups() []azure.network.securitygroup + securityGroups() []azure.subscription.networkService.securityGroup // List of network watchers - watchers() []azure.network.watcher + watchers() []azure.subscription.networkService.watcher } // Azure Network Interface -private azure.network.interface @defaults("id name location") { +private azure.subscription.networkService.interface @defaults("id name location") { // Network interface ID id string // Network interface name @@ -267,11 +375,11 @@ private azure.network.interface @defaults("id name location") { // Network interface properties properties dict // Network interface compute vm - vm() azure.compute.vm + vm() azure.subscription.computeService.vm } // Azure Network Security Group -private azure.network.securitygroup @defaults("id name location") { +private azure.subscription.networkService.securityGroup @defaults("id name location") { // Security group ID id string // Security group name @@ -287,15 +395,15 @@ private azure.network.securitygroup @defaults("id name location") { // Security group properties properties dict // Security group interfaces - interfaces []azure.network.interface + interfaces []azure.subscription.networkService.interface // Security group rules - securityRules []azure.network.securityrule + securityRules []azure.subscription.networkService.securityrule // Security group default security rules - defaultSecurityRules []azure.network.securityrule + defaultSecurityRules []azure.subscription.networkService.securityrule } // Azure Network Security Rule -private azure.network.securityrule @defaults("id name") { +private azure.subscription.networkService.securityrule @defaults("id name") { // Security rule ID id string // Security rule name @@ -309,7 +417,7 @@ private azure.network.securityrule @defaults("id name") { } // Azure Network Watcher -private azure.network.watcher @defaults("name location") { +private azure.subscription.networkService.watcher @defaults("name location") { // Network watcher ID id string // Network watcher name @@ -325,13 +433,13 @@ private azure.network.watcher @defaults("name location") { // Network watcher properties properties dict // Network watcher flow logs - flowLogs() []azure.network.watcher.flowlog + flowLogs() []azure.subscription.networkService.watcher.flowlog // Network watcher provisioning state provisioningState string } // Azure Network Watcher Flow Log -private azure.network.watcher.flowlog @defaults("name location") { +private azure.subscription.networkService.watcher.flowlog @defaults("name location") { // Network watcher flow log ID id string // Network watcher flow log name @@ -365,13 +473,15 @@ private azure.network.watcher.flowlog @defaults("name location") { } // Azure Storage -azure.storage { +private azure.subscription.storageService { + // The subscription identifier + subscriptionId string // List of storage accounts - accounts() []azure.storage.account + accounts() []azure.subscription.storageService.account } // Azure Storage Account -private azure.storage.account @defaults("id name location") { +private azure.subscription.storageService.account @defaults("id name location") { // Storage account ID id string // Storage account name @@ -391,19 +501,19 @@ private azure.storage.account @defaults("id name location") { // Storage account kind kind string // Storage account containers - containers() []azure.storage.container + containers() []azure.subscription.storageService.account.container // Storage account queue properties - queueProperties() azure.storage.account.queueService.properties + queueProperties() azure.subscription.storageService.account.queueService.properties // Storage account table properties - tableProperties() azure.storage.account.tableService.properties + tableProperties() azure.subscription.storageService.account.tableService.properties // Storage account blob properties - blobProperties() azure.storage.account.blobService.properties + blobProperties() azure.subscription.storageService.account.blobService.properties // Storage account data protection - dataProtection() azure.storage.account.dataProtection + dataProtection() azure.subscription.storageService.account.dataProtection } // Azure Storage Account Data Protection -private azure.storage.account.dataProtection { +private azure.subscription.storageService.account.dataProtection { // ID of the storage account storageAccountId string // Whether soft deletion of blobs is enabled @@ -417,49 +527,49 @@ private azure.storage.account.dataProtection { } // Azure Storage Account Blob Service Properties -private azure.storage.account.blobService.properties { +private azure.subscription.storageService.account.blobService.properties { // ID of the service id string // Hourly metrics properties - hourMetrics azure.storage.account.service.properties.metrics + hourMetrics azure.subscription.storageService.account.service.properties.metrics // Minute metrics properties - minuteMetrics azure.storage.account.service.properties.metrics + minuteMetrics azure.subscription.storageService.account.service.properties.metrics // Logging properties - logging azure.storage.account.service.properties.logging + logging azure.subscription.storageService.account.service.properties.logging } // Azure Storage Account Queue Service Properties -private azure.storage.account.queueService.properties { +private azure.subscription.storageService.account.queueService.properties { // ID of the service id string // Hourly metrics properties - hourMetrics azure.storage.account.service.properties.metrics + hourMetrics azure.subscription.storageService.account.service.properties.metrics // Minute metrics properties - minuteMetrics azure.storage.account.service.properties.metrics + minuteMetrics azure.subscription.storageService.account.service.properties.metrics // Logging properties - logging azure.storage.account.service.properties.logging + logging azure.subscription.storageService.account.service.properties.logging } // Azure Storage Account Table Service Properties -private azure.storage.account.tableService.properties { +private azure.subscription.storageService.account.tableService.properties { // ID of the service id string // Hourly metrics properties - hourMetrics azure.storage.account.service.properties.metrics + hourMetrics azure.subscription.storageService.account.service.properties.metrics // Minute metrics properties - minuteMetrics azure.storage.account.service.properties.metrics + minuteMetrics azure.subscription.storageService.account.service.properties.metrics // Logging properties - logging azure.storage.account.service.properties.logging + logging azure.subscription.storageService.account.service.properties.logging } // Azure Storage Account Service Properties Metrics -private azure.storage.account.service.properties.metrics { +private azure.subscription.storageService.account.service.properties.metrics { // ID of the metrics id string // Whether metrics generate summary statistics for called API operations includeAPIs bool // Retention policy for the metrics - retentionPolicy azure.storage.account.service.properties.retentionPolicy + retentionPolicy azure.subscription.storageService.account.service.properties.retentionPolicy // Whether the metrics are enabled enabled bool // Version of the metrics @@ -467,7 +577,7 @@ private azure.storage.account.service.properties.metrics { } // Azure Storage Account Service Properties Retention Policy -private azure.storage.account.service.properties.retentionPolicy { +private azure.subscription.storageService.account.service.properties.retentionPolicy { // ID of the retention policy id string // Number of days that metrics or logging data is retained @@ -477,7 +587,7 @@ private azure.storage.account.service.properties.retentionPolicy { } // Azure Storage Account Service Properties Logging -private azure.storage.account.service.properties.logging { +private azure.subscription.storageService.account.service.properties.logging { // ID of the logging configuration id string // Whether delete requests are being logged @@ -489,11 +599,11 @@ private azure.storage.account.service.properties.logging { // Logging version version string // Retention policy for the logging metrics - retentionPolicy azure.storage.account.service.properties.retentionPolicy + retentionPolicy azure.subscription.storageService.account.service.properties.retentionPolicy } // Azure Storage Container -private azure.storage.container @defaults("id name") { +private azure.subscription.storageService.account.container @defaults("id name") { // Storage container ID id string // Storage container name @@ -507,15 +617,17 @@ private azure.storage.container @defaults("id name") { } // Azure Web -azure.web { +private azure.subscription.webService { + // The subscription identifier + subscriptionId string // List of web apps - apps() []azure.web.appsite + apps() []azure.subscription.webService.appsite // Available runtimes availableRuntimes() []dict } // Azure Web App Site -private azure.web.appsite @defaults("id name location") { +private azure.subscription.webService.appsite @defaults("id name location") { // Appsite ID id string // Appsite name @@ -533,9 +645,9 @@ private azure.web.appsite @defaults("id name location") { // Appsite identity identity dict // Appsite configuration - configuration() azure.web.appsiteconfig + configuration() azure.subscription.webService.appsiteconfig // Appsite authentication settings - authenticationSettings() azure.web.appsiteauthsettings + authenticationSettings() azure.subscription.webService.appsiteauthsettings // Appsite metadata metadata() dict // Appsite application settings @@ -547,7 +659,7 @@ private azure.web.appsite @defaults("id name location") { } // Azure AppSite Authentication Settings -private azure.web.appsiteauthsettings @defaults("id name") { +private azure.subscription.webService.appsiteauthsettings @defaults("id name") { // Auth settings ID id string // Auth settings name @@ -561,7 +673,7 @@ private azure.web.appsiteauthsettings @defaults("id name") { } // Azure AppSite Config -private azure.web.appsiteconfig @defaults("id name") { +private azure.subscription.webService.appsiteconfig @defaults("id name") { // Appsite config ID id string // Appsite config name @@ -575,13 +687,15 @@ private azure.web.appsiteconfig @defaults("id name") { } // Azure SQL -azure.sql { +private azure.subscription.sqlService { + // The subscription identifier + subscriptionId string // List of SQL servers - servers() []azure.sql.server + servers() []azure.subscription.sqlService.server } // Azure SQL Server -private azure.sql.server @defaults("name location") { +private azure.subscription.sqlService.server @defaults("name location") { // SQL server ID id string // SQL server name @@ -595,11 +709,11 @@ private azure.sql.server @defaults("name location") { // SQL server properties properties dict // SQL server databases - databases() []azure.sql.database + databases() []azure.subscription.sqlService.database // SQL server firewall rules - firewallRules() []azure.sql.firewallrule + firewallRules() []azure.subscription.sqlService.firewallrule // SQL server AD administrators - azureAdAdministrators() []azure.sql.server.administrator + azureAdAdministrators() []azure.subscription.sqlService.server.administrator // SQL server connection policy connectionPolicy() dict // SQL server auditing policy @@ -611,11 +725,11 @@ private azure.sql.server @defaults("name location") { // SQL server threat detection policy threatDetectionPolicy() dict // SQL server vulnerability assessment settings - vulnerabilityAssessmentSettings() azure.sql.server.vulnerabilityassessmentsettings + vulnerabilityAssessmentSettings() azure.subscription.sqlService.server.vulnerabilityassessmentsettings } // Azure SQL Server Vulnerability Assessment Settings -private azure.sql.server.vulnerabilityassessmentsettings { +private azure.subscription.sqlService.server.vulnerabilityassessmentsettings { // ID of the vulnerability assessment id string // Name of the vulnerability assessment @@ -635,8 +749,9 @@ private azure.sql.server.vulnerabilityassessmentsettings { // Whether the schedule scan notification is also sent to the subscription administrators mailSubscriptionAdmins bool } + // Azure SQL Server Administrator -private azure.sql.server.administrator @defaults("id name") { +private azure.subscription.sqlService.server.administrator @defaults("id name") { // SQL administrator ID id string // SQL administrator name @@ -654,7 +769,7 @@ private azure.sql.server.administrator @defaults("id name") { } // Azure SQL Server Database -private azure.sql.database @defaults("id name") { +private azure.subscription.sqlService.database @defaults("id name") { // SQL database ID id string // SQL database name @@ -722,11 +837,11 @@ private azure.sql.database @defaults("id name") { // SQL database auditing policy auditingPolicy() dict // SQL database usage - usage() []azure.sql.databaseusage + usage() []azure.subscription.sqlService.databaseusage } // Azure SQL Database Usage -private azure.sql.databaseusage @defaults("id name") { +private azure.subscription.sqlService.databaseusage @defaults("id name") { // Database usage ID id string // Database usage name @@ -746,13 +861,15 @@ private azure.sql.databaseusage @defaults("id name") { } // Azure Database for PostgreSQL -azure.postgresql { - // List of PostgreSQL servers - servers() []azure.postgresql.server +private azure.subscription.postgresqlService { + // The subscription identifier + subscriptionId string + // List of PostgreSQL servers + servers() []azure.subscription.postgresqlService.server } // Azure Database for PostgreSQL Server -private azure.postgresql.server @defaults("id name location") { +private azure.subscription.postgresqlService.server @defaults("id name location") { // PostgreSQL server ID id string // PostgreSQL server name @@ -766,15 +883,15 @@ private azure.postgresql.server @defaults("id name location") { // PostgreSQL server properties properties dict // PostgreSQL server configuration - configuration() []azure.sql.configuration + configuration() []azure.subscription.sqlService.configuration // PostgreSQL server databases - databases() []azure.postgresql.database + databases() []azure.subscription.postgresqlService.database // PostgreSQL server firewall rules - firewallRules() []azure.sql.firewallrule + firewallRules() []azure.subscription.sqlService.firewallrule } // Azure Database for PostgreSQL Database -private azure.postgresql.database @defaults("id name") { +private azure.subscription.postgresqlService.database @defaults("id name") { // PostgreSQL database ID id string // PostgreSQL database name @@ -788,15 +905,17 @@ private azure.postgresql.database @defaults("id name") { } // Azure Database for MySQL -azure.mysql { +private azure.subscription.mysqlService { + // The subscription identifier + subscriptionId string // List of MySQL servers - servers() []azure.mysql.server + servers() []azure.subscription.mysqlService.server // List of Flexible MySQL servers - flexibleServers() []azure.mysql.flexibleServer + flexibleServers() []azure.subscription.mysqlService.flexibleServer } // Azure Database for MySQL Server -private azure.mysql.server @defaults("id name location") { +private azure.subscription.mysqlService.server @defaults("id name location") { // MySQL server ID id string // MySQL server name @@ -810,15 +929,15 @@ private azure.mysql.server @defaults("id name location") { // MySQL server properties properties dict // MySQL server configuration - configuration() []azure.sql.configuration + configuration() []azure.subscription.sqlService.configuration // MySQL server databases - databases() []azure.mysql.database + databases() []azure.subscription.mysqlService.database // MySQL server firewall rules - firewallRules() []azure.sql.firewallrule + firewallRules() []azure.subscription.sqlService.firewallrule } // Azure Database for MySQL Database -private azure.mysql.database @defaults("id name") { +private azure.subscription.mysqlService.database @defaults("id name") { // MySQL database ID id string // MySQL database name @@ -832,7 +951,7 @@ private azure.mysql.database @defaults("id name") { } // Azure Database for MySQL Flexible Server -private azure.mysql.flexibleServer @defaults("id name location") { +private azure.subscription.mysqlService.flexibleServer @defaults("id name location") { // MySQL flexible server ID id string // MySQL flexible server name @@ -846,21 +965,23 @@ private azure.mysql.flexibleServer @defaults("id name location") { // MySQL flexible server properties properties dict // MySQL flexible server configuration - configuration() []azure.sql.configuration + configuration() []azure.subscription.sqlService.configuration // MySQL flexible server databases - databases() []azure.mysql.database + databases() []azure.subscription.mysqlService.database // MySQL flexible server firewall rules - firewallRules() []azure.sql.firewallrule + firewallRules() []azure.subscription.sqlService.firewallrule } // Azure Database for MariaDB -azure.mariadb { +private azure.subscription.mariadbService { + // The subscription identifier + subscriptionId string // List of MariaDB servers - servers() []azure.mariadb.server + servers() []azure.subscription.mariadbService.server } // Azure Database for MariaDB Server -private azure.mariadb.server @defaults("id name location") { +private azure.subscription.mariadbService.server @defaults("id name location") { // MariaDB server ID id string // MariaDB server name @@ -874,15 +995,15 @@ private azure.mariadb.server @defaults("id name location") { // MariaDB server properties properties dict // MariaDB server configuration - configuration() []azure.sql.configuration + configuration() []azure.subscription.sqlService.configuration // MariaDB server databases - databases() []azure.mariadb.database + databases() []azure.subscription.mariadbService.database // MariaDB server firewall rules - firewallRules() []azure.sql.firewallrule + firewallRules() []azure.subscription.sqlService.firewallrule } // Azure Database for MariaDB Database -private azure.mariadb.database @defaults("id name") { +private azure.subscription.mariadbService.database @defaults("id name") { // MariaDB database ID id string // MariaDB database name @@ -896,7 +1017,7 @@ private azure.mariadb.database @defaults("id name") { } // Azure SQL Configuration -private azure.sql.configuration @defaults("id name") { +private azure.subscription.sqlService.configuration @defaults("id name") { // SQL configuration ID id string // SQL configuration name @@ -918,7 +1039,7 @@ private azure.sql.configuration @defaults("id name") { } // Azure SQL Firewall Rule -private azure.sql.firewallrule @defaults("id name") { +private azure.subscription.sqlService.firewallrule @defaults("id name") { // SQL firewall rule ID id string // SQL firewall rule name @@ -932,13 +1053,15 @@ private azure.sql.firewallrule @defaults("id name") { } // Azure Key Vault -azure.keyvault { +private azure.subscription.keyvaultService { + // The subscription identifier + subscriptionId string // List of Azure key vaults - vaults() []azure.keyvault.vault + vaults() []azure.subscription.keyvaultService.vault } // Azure Key Vault Vault -private azure.keyvault.vault @defaults("id vaultName location") { +private azure.subscription.keyvaultService.vault @defaults("id vaultName location") { // Key Vault ID id string // Key Vault name @@ -954,17 +1077,17 @@ private azure.keyvault.vault @defaults("id vaultName location") { // Key Vault properties properties() dict // Key Vault keys - keys() []azure.keyvault.key + keys() []azure.subscription.keyvaultService.key // Key Vault certificates - certificates() []azure.keyvault.certificate + certificates() []azure.subscription.keyvaultService.certificate // Key Vault secrets - secrets() []azure.keyvault.secret + secrets() []azure.subscription.keyvaultService.secret // Key Vault diagnostic settings - diagnosticSettings() []azure.monitor.diagnosticsetting + diagnosticSettings() []azure.subscription.monitorService.diagnosticsetting } // Azure Key Vault Key -private azure.keyvault.key @defaults("kid keyName") { +private azure.subscription.keyvaultService.key @defaults("kid keyName") { // Key ID kid string // Key tags @@ -988,11 +1111,11 @@ private azure.keyvault.key @defaults("kid keyName") { // Key version version() string // List of key versions - versions() []azure.keyvault.key + versions() []azure.subscription.keyvaultService.key } // Azure Key Vault Certificate -private azure.keyvault.certificate @defaults("id certName") { +private azure.subscription.keyvaultService.certificate @defaults("id certName") { // Certificate ID id string // Certificate tags @@ -1016,11 +1139,11 @@ private azure.keyvault.certificate @defaults("id certName") { // Certificate version version() string // List of certificate versions - versions() []azure.keyvault.certificate + versions() []azure.subscription.keyvaultService.certificate } // Azure Key Vault Secret -private azure.keyvault.secret @defaults("id secretName") { +private azure.subscription.keyvaultService.secret @defaults("id secretName") { // Secret ID id string // Secret tags @@ -1044,27 +1167,29 @@ private azure.keyvault.secret @defaults("id secretName") { // Secret version version() string // List of secret versions - versions() []azure.keyvault.secret + versions() []azure.subscription.keyvaultService.secret } // Azure Monitor -azure.monitor { +private azure.subscription.monitorService { + // The subscription identifier + subscriptionId string // List of log profiles - logProfiles() []azure.monitor.logprofile + logProfiles() []azure.subscription.monitorService.logprofile // List of diagnostic settings for the subscription - diagnosticSettings() []azure.monitor.diagnosticsetting + diagnosticSettings() []azure.subscription.monitorService.diagnosticsetting // Activity log for the monitor - activityLog() azure.monitor.activitylog + activityLog() azure.subscription.monitorService.activitylog } // Azure Monitor Activity Log -private azure.monitor.activitylog { +private azure.subscription.monitorService.activitylog { // List of activity log alerts - alerts() []azure.monitor.activitylog.alert + alerts() []azure.subscription.monitorService.activitylog.alert } // Azure Monitor Activity Log Alert -private azure.monitor.activitylog.alert { +private azure.subscription.monitorService.activitylog.alert { // ID of the activity log alert id string // Type of the activity log alert @@ -1086,7 +1211,7 @@ private azure.monitor.activitylog.alert { } // Azure Monitor Log Profile -private azure.monitor.logprofile @defaults("id name location") { +private azure.subscription.monitorService.logprofile @defaults("id name location") { // Log profile ID id string // Log profile name @@ -1100,11 +1225,11 @@ private azure.monitor.logprofile @defaults("id name location") { // Log profile properties properties dict // Log profile storage account - storageAccount azure.storage.account + storageAccount azure.subscription.storageService.account } // Azure Monitor Diagnostic Setting -private azure.monitor.diagnosticsetting @defaults("id name") { +private azure.subscription.monitorService.diagnosticsetting @defaults("id name") { // Diagnostic setting ID id string // Diagnostic setting name @@ -1114,11 +1239,13 @@ private azure.monitor.diagnosticsetting @defaults("id name") { // Diagnostic setting properties properties dict // Diagnostic setting storage account - storageAccount azure.storage.account + storageAccount azure.subscription.storageService.account } // Azure Microsoft Cloud Defender -azure.cloudDefender { +private azure.subscription.cloudDefenderService { + // The subscription identifier + subscriptionId string // Whether the monitoring agent is automatically provisioned on new VMs monitoringAgentAutoProvision() bool // List of Defender For Server components and whether they are enabled @@ -1126,11 +1253,11 @@ azure.cloudDefender { // List of Defender For Container components and whether they are enabled defenderForContainers() dict // List of configured security contacts - securityContacts() []azure.cloudDefender.securityContact + securityContacts() []azure.subscription.cloudDefenderService.securityContact } // Azure Microsoft Cloud Defender Security Contact -private azure.cloudDefender.securityContact { +private azure.subscription.cloudDefenderService.securityContact { // ID of the security contact id string // Name of the security contact @@ -1144,13 +1271,15 @@ private azure.cloudDefender.securityContact { } // Azure Authorization -azure.authorization { +private azure.subscription.authorizationService { + // The subscription identifier + subscriptionId string // Role definitions for the Azure subscription - roleDefinitions() []azure.authorization.roleDefinition + roleDefinitions() []azure.subscription.authorizationService.roleDefinition } // Azure Role Definition -azure.authorization.roleDefinition @defaults ("id name scopes") { +private azure.subscription.authorizationService.roleDefinition @defaults ("id name scopes") { // ID of the role definition id string // Description of the role definition @@ -1162,11 +1291,11 @@ azure.authorization.roleDefinition @defaults ("id name scopes") { // Scopes for which the role definition applies scopes []string // Permissions that are attached to the role definition - permissions []azure.authorization.roleDefinition.permission + permissions []azure.subscription.authorizationService.roleDefinition.permission } // Azure Role Definition Permission -private azure.authorization.roleDefinition.permission @defaults ("allowedActions deniedActions") { +private azure.subscription.authorizationService.roleDefinition.permission @defaults ("allowedActions deniedActions") { // ID of the permission id string // List of allowed actions that are attached to the permission diff --git a/resources/packs/azure/azure.lr.go b/resources/packs/azure/azure.lr.go index 20732468e5..30b83066b1 100644 --- a/resources/packs/azure/azure.lr.go +++ b/resources/packs/azure/azure.lr.go @@ -18,65 +18,65 @@ func Init(registry *resources.Registry) { registry.AddFactory("azuread.domain", newAzureadDomain) registry.AddFactory("azuread.application", newAzureadApplication) registry.AddFactory("azuread.serviceprincipal", newAzureadServiceprincipal) - registry.AddFactory("azure", newAzure) - registry.AddFactory("azure.resource", newAzureResource) - registry.AddFactory("azure.resourcegroup", newAzureResourcegroup) - registry.AddFactory("azure.compute", newAzureCompute) - registry.AddFactory("azure.compute.vm", newAzureComputeVm) - registry.AddFactory("azure.compute.disk", newAzureComputeDisk) - registry.AddFactory("azure.network", newAzureNetwork) - registry.AddFactory("azure.network.interface", newAzureNetworkInterface) - registry.AddFactory("azure.network.securitygroup", newAzureNetworkSecuritygroup) - registry.AddFactory("azure.network.securityrule", newAzureNetworkSecurityrule) - registry.AddFactory("azure.network.watcher", newAzureNetworkWatcher) - registry.AddFactory("azure.network.watcher.flowlog", newAzureNetworkWatcherFlowlog) - registry.AddFactory("azure.storage", newAzureStorage) - registry.AddFactory("azure.storage.account", newAzureStorageAccount) - registry.AddFactory("azure.storage.account.dataProtection", newAzureStorageAccountDataProtection) - registry.AddFactory("azure.storage.account.blobService.properties", newAzureStorageAccountBlobServiceProperties) - registry.AddFactory("azure.storage.account.queueService.properties", newAzureStorageAccountQueueServiceProperties) - registry.AddFactory("azure.storage.account.tableService.properties", newAzureStorageAccountTableServiceProperties) - registry.AddFactory("azure.storage.account.service.properties.metrics", newAzureStorageAccountServicePropertiesMetrics) - registry.AddFactory("azure.storage.account.service.properties.retentionPolicy", newAzureStorageAccountServicePropertiesRetentionPolicy) - registry.AddFactory("azure.storage.account.service.properties.logging", newAzureStorageAccountServicePropertiesLogging) - registry.AddFactory("azure.storage.container", newAzureStorageContainer) - registry.AddFactory("azure.web", newAzureWeb) - registry.AddFactory("azure.web.appsite", newAzureWebAppsite) - registry.AddFactory("azure.web.appsiteauthsettings", newAzureWebAppsiteauthsettings) - registry.AddFactory("azure.web.appsiteconfig", newAzureWebAppsiteconfig) - registry.AddFactory("azure.sql", newAzureSql) - registry.AddFactory("azure.sql.server", newAzureSqlServer) - registry.AddFactory("azure.sql.server.vulnerabilityassessmentsettings", newAzureSqlServerVulnerabilityassessmentsettings) - registry.AddFactory("azure.sql.server.administrator", newAzureSqlServerAdministrator) - registry.AddFactory("azure.sql.database", newAzureSqlDatabase) - registry.AddFactory("azure.sql.databaseusage", newAzureSqlDatabaseusage) - registry.AddFactory("azure.postgresql", newAzurePostgresql) - registry.AddFactory("azure.postgresql.server", newAzurePostgresqlServer) - registry.AddFactory("azure.postgresql.database", newAzurePostgresqlDatabase) - registry.AddFactory("azure.mysql", newAzureMysql) - registry.AddFactory("azure.mysql.server", newAzureMysqlServer) - registry.AddFactory("azure.mysql.database", newAzureMysqlDatabase) - registry.AddFactory("azure.mysql.flexibleServer", newAzureMysqlFlexibleServer) - registry.AddFactory("azure.mariadb", newAzureMariadb) - registry.AddFactory("azure.mariadb.server", newAzureMariadbServer) - registry.AddFactory("azure.mariadb.database", newAzureMariadbDatabase) - registry.AddFactory("azure.sql.configuration", newAzureSqlConfiguration) - registry.AddFactory("azure.sql.firewallrule", newAzureSqlFirewallrule) - registry.AddFactory("azure.keyvault", newAzureKeyvault) - registry.AddFactory("azure.keyvault.vault", newAzureKeyvaultVault) - registry.AddFactory("azure.keyvault.key", newAzureKeyvaultKey) - registry.AddFactory("azure.keyvault.certificate", newAzureKeyvaultCertificate) - registry.AddFactory("azure.keyvault.secret", newAzureKeyvaultSecret) - registry.AddFactory("azure.monitor", newAzureMonitor) - registry.AddFactory("azure.monitor.activitylog", newAzureMonitorActivitylog) - registry.AddFactory("azure.monitor.activitylog.alert", newAzureMonitorActivitylogAlert) - registry.AddFactory("azure.monitor.logprofile", newAzureMonitorLogprofile) - registry.AddFactory("azure.monitor.diagnosticsetting", newAzureMonitorDiagnosticsetting) - registry.AddFactory("azure.cloudDefender", newAzureCloudDefender) - registry.AddFactory("azure.cloudDefender.securityContact", newAzureCloudDefenderSecurityContact) - registry.AddFactory("azure.authorization", newAzureAuthorization) - registry.AddFactory("azure.authorization.roleDefinition", newAzureAuthorizationRoleDefinition) - registry.AddFactory("azure.authorization.roleDefinition.permission", newAzureAuthorizationRoleDefinitionPermission) + registry.AddFactory("azure.subscription", newAzureSubscription) + registry.AddFactory("azure.subscription.resource", newAzureSubscriptionResource) + registry.AddFactory("azure.subscription.resourcegroup", newAzureSubscriptionResourcegroup) + registry.AddFactory("azure.subscription.computeService", newAzureSubscriptionComputeService) + registry.AddFactory("azure.subscription.computeService.vm", newAzureSubscriptionComputeServiceVm) + registry.AddFactory("azure.subscription.computeService.disk", newAzureSubscriptionComputeServiceDisk) + registry.AddFactory("azure.subscription.networkService", newAzureSubscriptionNetworkService) + registry.AddFactory("azure.subscription.networkService.interface", newAzureSubscriptionNetworkServiceInterface) + registry.AddFactory("azure.subscription.networkService.securityGroup", newAzureSubscriptionNetworkServiceSecurityGroup) + registry.AddFactory("azure.subscription.networkService.securityrule", newAzureSubscriptionNetworkServiceSecurityrule) + registry.AddFactory("azure.subscription.networkService.watcher", newAzureSubscriptionNetworkServiceWatcher) + registry.AddFactory("azure.subscription.networkService.watcher.flowlog", newAzureSubscriptionNetworkServiceWatcherFlowlog) + registry.AddFactory("azure.subscription.storageService", newAzureSubscriptionStorageService) + registry.AddFactory("azure.subscription.storageService.account", newAzureSubscriptionStorageServiceAccount) + registry.AddFactory("azure.subscription.storageService.account.dataProtection", newAzureSubscriptionStorageServiceAccountDataProtection) + registry.AddFactory("azure.subscription.storageService.account.blobService.properties", newAzureSubscriptionStorageServiceAccountBlobServiceProperties) + registry.AddFactory("azure.subscription.storageService.account.queueService.properties", newAzureSubscriptionStorageServiceAccountQueueServiceProperties) + registry.AddFactory("azure.subscription.storageService.account.tableService.properties", newAzureSubscriptionStorageServiceAccountTableServiceProperties) + registry.AddFactory("azure.subscription.storageService.account.service.properties.metrics", newAzureSubscriptionStorageServiceAccountServicePropertiesMetrics) + registry.AddFactory("azure.subscription.storageService.account.service.properties.retentionPolicy", newAzureSubscriptionStorageServiceAccountServicePropertiesRetentionPolicy) + registry.AddFactory("azure.subscription.storageService.account.service.properties.logging", newAzureSubscriptionStorageServiceAccountServicePropertiesLogging) + registry.AddFactory("azure.subscription.storageService.account.container", newAzureSubscriptionStorageServiceAccountContainer) + registry.AddFactory("azure.subscription.webService", newAzureSubscriptionWebService) + registry.AddFactory("azure.subscription.webService.appsite", newAzureSubscriptionWebServiceAppsite) + registry.AddFactory("azure.subscription.webService.appsiteauthsettings", newAzureSubscriptionWebServiceAppsiteauthsettings) + registry.AddFactory("azure.subscription.webService.appsiteconfig", newAzureSubscriptionWebServiceAppsiteconfig) + registry.AddFactory("azure.subscription.sqlService", newAzureSubscriptionSqlService) + registry.AddFactory("azure.subscription.sqlService.server", newAzureSubscriptionSqlServiceServer) + registry.AddFactory("azure.subscription.sqlService.server.vulnerabilityassessmentsettings", newAzureSubscriptionSqlServiceServerVulnerabilityassessmentsettings) + registry.AddFactory("azure.subscription.sqlService.server.administrator", newAzureSubscriptionSqlServiceServerAdministrator) + registry.AddFactory("azure.subscription.sqlService.database", newAzureSubscriptionSqlServiceDatabase) + registry.AddFactory("azure.subscription.sqlService.databaseusage", newAzureSubscriptionSqlServiceDatabaseusage) + registry.AddFactory("azure.subscription.postgresqlService", newAzureSubscriptionPostgresqlService) + registry.AddFactory("azure.subscription.postgresqlService.server", newAzureSubscriptionPostgresqlServiceServer) + registry.AddFactory("azure.subscription.postgresqlService.database", newAzureSubscriptionPostgresqlServiceDatabase) + registry.AddFactory("azure.subscription.mysqlService", newAzureSubscriptionMysqlService) + registry.AddFactory("azure.subscription.mysqlService.server", newAzureSubscriptionMysqlServiceServer) + registry.AddFactory("azure.subscription.mysqlService.database", newAzureSubscriptionMysqlServiceDatabase) + registry.AddFactory("azure.subscription.mysqlService.flexibleServer", newAzureSubscriptionMysqlServiceFlexibleServer) + registry.AddFactory("azure.subscription.mariadbService", newAzureSubscriptionMariadbService) + registry.AddFactory("azure.subscription.mariadbService.server", newAzureSubscriptionMariadbServiceServer) + registry.AddFactory("azure.subscription.mariadbService.database", newAzureSubscriptionMariadbServiceDatabase) + registry.AddFactory("azure.subscription.sqlService.configuration", newAzureSubscriptionSqlServiceConfiguration) + registry.AddFactory("azure.subscription.sqlService.firewallrule", newAzureSubscriptionSqlServiceFirewallrule) + registry.AddFactory("azure.subscription.keyvaultService", newAzureSubscriptionKeyvaultService) + registry.AddFactory("azure.subscription.keyvaultService.vault", newAzureSubscriptionKeyvaultServiceVault) + registry.AddFactory("azure.subscription.keyvaultService.key", newAzureSubscriptionKeyvaultServiceKey) + registry.AddFactory("azure.subscription.keyvaultService.certificate", newAzureSubscriptionKeyvaultServiceCertificate) + registry.AddFactory("azure.subscription.keyvaultService.secret", newAzureSubscriptionKeyvaultServiceSecret) + registry.AddFactory("azure.subscription.monitorService", newAzureSubscriptionMonitorService) + registry.AddFactory("azure.subscription.monitorService.activitylog", newAzureSubscriptionMonitorServiceActivitylog) + registry.AddFactory("azure.subscription.monitorService.activitylog.alert", newAzureSubscriptionMonitorServiceActivitylogAlert) + registry.AddFactory("azure.subscription.monitorService.logprofile", newAzureSubscriptionMonitorServiceLogprofile) + registry.AddFactory("azure.subscription.monitorService.diagnosticsetting", newAzureSubscriptionMonitorServiceDiagnosticsetting) + registry.AddFactory("azure.subscription.cloudDefenderService", newAzureSubscriptionCloudDefenderService) + registry.AddFactory("azure.subscription.cloudDefenderService.securityContact", newAzureSubscriptionCloudDefenderServiceSecurityContact) + registry.AddFactory("azure.subscription.authorizationService", newAzureSubscriptionAuthorizationService) + registry.AddFactory("azure.subscription.authorizationService.roleDefinition", newAzureSubscriptionAuthorizationServiceRoleDefinition) + registry.AddFactory("azure.subscription.authorizationService.roleDefinition.permission", newAzureSubscriptionAuthorizationServiceRoleDefinitionPermission) } // Azuread resource interface @@ -1796,198 +1796,1215 @@ func (s *mqlAzureadServiceprincipal) MqlCompute(name string) error { } } -// Azure resource interface -type Azure interface { +// AzureSubscription resource interface +type AzureSubscription interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) Register(string) error Validate() error - Resources() ([]interface{}, error) + Id() (string, error) + Name() (string, error) + SubscriptionId() (string, error) + TenantId() (string, error) + ManagedByTenants() ([]interface{}, error) + Tags() (map[string]interface{}, error) + State() (string, error) + AuthorizationSource() (string, error) + SubscriptionsPolicies() (interface{}, error) ResourceGroups() ([]interface{}, error) + Compute() (AzureSubscriptionComputeService, error) + Network() (AzureSubscriptionNetworkService, error) + Storage() (AzureSubscriptionStorageService, error) + Web() (AzureSubscriptionWebService, error) + Sql() (AzureSubscriptionSqlService, error) + MySql() (AzureSubscriptionMysqlService, error) + PostgreSql() (AzureSubscriptionPostgresqlService, error) + MariaDb() (AzureSubscriptionMariadbService, error) + KeyVault() (AzureSubscriptionKeyvaultService, error) + Authorization() (AzureSubscriptionAuthorizationService, error) + Monitor() (AzureSubscriptionMonitorService, error) + CloudDefender() (AzureSubscriptionCloudDefenderService, error) + Resources() ([]interface{}, error) +} + +// mqlAzureSubscription for the azure.subscription resource +type mqlAzureSubscription struct { + *resources.Resource +} + +// MqlResource to retrieve the underlying resource info +func (s *mqlAzureSubscription) MqlResource() *resources.Resource { + return s.Resource +} + +// create a new instance of the azure.subscription resource +func newAzureSubscription(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { + // User hooks + var err error + res := mqlAzureSubscription{runtime.NewResource("azure.subscription")} + var existing AzureSubscription + args, existing, err = res.init(args) + if err != nil { + return nil, err + } + if existing != nil { + return existing, nil + } + + // assign all named fields + var id string + + now := time.Now().Unix() + for name, val := range *args { + if val == nil { + res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) + continue + } + + switch name { + case "id": + if _, ok := val.(string); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription\", its \"id\" argument has the wrong type (expected type \"string\")") + } + case "name": + if _, ok := val.(string); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription\", its \"name\" argument has the wrong type (expected type \"string\")") + } + case "subscriptionId": + if _, ok := val.(string); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription\", its \"subscriptionId\" argument has the wrong type (expected type \"string\")") + } + case "tenantId": + if _, ok := val.(string); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription\", its \"tenantId\" argument has the wrong type (expected type \"string\")") + } + case "managedByTenants": + if _, ok := val.([]interface{}); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription\", its \"managedByTenants\" argument has the wrong type (expected type \"[]interface{}\")") + } + case "tags": + if _, ok := val.(map[string]interface{}); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") + } + case "state": + if _, ok := val.(string); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription\", its \"state\" argument has the wrong type (expected type \"string\")") + } + case "authorizationSource": + if _, ok := val.(string); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription\", its \"authorizationSource\" argument has the wrong type (expected type \"string\")") + } + case "subscriptionsPolicies": + if _, ok := val.(interface{}); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription\", its \"subscriptionsPolicies\" argument has the wrong type (expected type \"interface{}\")") + } + case "resourceGroups": + if _, ok := val.([]interface{}); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription\", its \"resourceGroups\" argument has the wrong type (expected type \"[]interface{}\")") + } + case "compute": + if _, ok := val.(AzureSubscriptionComputeService); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription\", its \"compute\" argument has the wrong type (expected type \"AzureSubscriptionComputeService\")") + } + case "network": + if _, ok := val.(AzureSubscriptionNetworkService); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription\", its \"network\" argument has the wrong type (expected type \"AzureSubscriptionNetworkService\")") + } + case "storage": + if _, ok := val.(AzureSubscriptionStorageService); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription\", its \"storage\" argument has the wrong type (expected type \"AzureSubscriptionStorageService\")") + } + case "web": + if _, ok := val.(AzureSubscriptionWebService); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription\", its \"web\" argument has the wrong type (expected type \"AzureSubscriptionWebService\")") + } + case "sql": + if _, ok := val.(AzureSubscriptionSqlService); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription\", its \"sql\" argument has the wrong type (expected type \"AzureSubscriptionSqlService\")") + } + case "mySql": + if _, ok := val.(AzureSubscriptionMysqlService); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription\", its \"mySql\" argument has the wrong type (expected type \"AzureSubscriptionMysqlService\")") + } + case "postgreSql": + if _, ok := val.(AzureSubscriptionPostgresqlService); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription\", its \"postgreSql\" argument has the wrong type (expected type \"AzureSubscriptionPostgresqlService\")") + } + case "mariaDb": + if _, ok := val.(AzureSubscriptionMariadbService); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription\", its \"mariaDb\" argument has the wrong type (expected type \"AzureSubscriptionMariadbService\")") + } + case "keyVault": + if _, ok := val.(AzureSubscriptionKeyvaultService); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription\", its \"keyVault\" argument has the wrong type (expected type \"AzureSubscriptionKeyvaultService\")") + } + case "authorization": + if _, ok := val.(AzureSubscriptionAuthorizationService); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription\", its \"authorization\" argument has the wrong type (expected type \"AzureSubscriptionAuthorizationService\")") + } + case "monitor": + if _, ok := val.(AzureSubscriptionMonitorService); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription\", its \"monitor\" argument has the wrong type (expected type \"AzureSubscriptionMonitorService\")") + } + case "cloudDefender": + if _, ok := val.(AzureSubscriptionCloudDefenderService); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription\", its \"cloudDefender\" argument has the wrong type (expected type \"AzureSubscriptionCloudDefenderService\")") + } + case "resources": + if _, ok := val.([]interface{}); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription\", its \"resources\" argument has the wrong type (expected type \"[]interface{}\")") + } + case "__id": + idVal, ok := val.(string) + if !ok { + return nil, errors.New("Failed to initialize \"azure.subscription\", its \"__id\" argument has the wrong type (expected type \"string\")") + } + id = idVal + default: + return nil, errors.New("Initialized azure.subscription with unknown argument " + name) + } + res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) + } + + // Get the ID + if id == "" { + res.Resource.Id, err = res.id() + if err != nil { + return nil, err + } + } else { + res.Resource.Id = id + } + + return &res, nil +} + +func (s *mqlAzureSubscription) Validate() error { + // required arguments + // no required fields found + + return nil +} + +// Register accessor autogenerated +func (s *mqlAzureSubscription) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription].Register") + switch name { + case "id": + return nil + case "name": + return nil + case "subscriptionId": + return nil + case "tenantId": + return nil + case "managedByTenants": + return nil + case "tags": + return nil + case "state": + return nil + case "authorizationSource": + return nil + case "subscriptionsPolicies": + return nil + case "resourceGroups": + return nil + case "compute": + return nil + case "network": + return nil + case "storage": + return nil + case "web": + return nil + case "sql": + return nil + case "mySql": + return nil + case "postgreSql": + return nil + case "mariaDb": + return nil + case "keyVault": + return nil + case "authorization": + return nil + case "monitor": + return nil + case "cloudDefender": + return nil + case "resources": + return nil + default: + return errors.New("Cannot find field '" + name + "' in \"azure.subscription\" resource") + } +} + +// Field accessor autogenerated +func (s *mqlAzureSubscription) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription].Field") + switch name { + case "id": + return s.Id() + case "name": + return s.Name() + case "subscriptionId": + return s.SubscriptionId() + case "tenantId": + return s.TenantId() + case "managedByTenants": + return s.ManagedByTenants() + case "tags": + return s.Tags() + case "state": + return s.State() + case "authorizationSource": + return s.AuthorizationSource() + case "subscriptionsPolicies": + return s.SubscriptionsPolicies() + case "resourceGroups": + return s.ResourceGroups() + case "compute": + return s.Compute() + case "network": + return s.Network() + case "storage": + return s.Storage() + case "web": + return s.Web() + case "sql": + return s.Sql() + case "mySql": + return s.MySql() + case "postgreSql": + return s.PostgreSql() + case "mariaDb": + return s.MariaDb() + case "keyVault": + return s.KeyVault() + case "authorization": + return s.Authorization() + case "monitor": + return s.Monitor() + case "cloudDefender": + return s.CloudDefender() + case "resources": + return s.Resources() + default: + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription\" resource") + } +} + +// Id accessor autogenerated +func (s *mqlAzureSubscription) Id() (string, error) { + res, ok := s.Cache.Load("id") + if !ok || !res.Valid { + if err := s.ComputeId(); err != nil { + return "", err + } + res, ok = s.Cache.Load("id") + if !ok { + return "", errors.New("\"azure.subscription\" calculated \"id\" but didn't find its value in cache.") + } + s.MotorRuntime.Trigger(s, "id") + } + if res.Error != nil { + return "", res.Error + } + tres, ok := res.Data.(string) + if !ok { + return "", fmt.Errorf("\"azure.subscription\" failed to cast field \"id\" to the right type (string): %#v", res) + } + return tres, nil +} + +// Name accessor autogenerated +func (s *mqlAzureSubscription) Name() (string, error) { + res, ok := s.Cache.Load("name") + if !ok || !res.Valid { + if err := s.ComputeName(); err != nil { + return "", err + } + res, ok = s.Cache.Load("name") + if !ok { + return "", errors.New("\"azure.subscription\" calculated \"name\" but didn't find its value in cache.") + } + s.MotorRuntime.Trigger(s, "name") + } + if res.Error != nil { + return "", res.Error + } + tres, ok := res.Data.(string) + if !ok { + return "", fmt.Errorf("\"azure.subscription\" failed to cast field \"name\" to the right type (string): %#v", res) + } + return tres, nil +} + +// SubscriptionId accessor autogenerated +func (s *mqlAzureSubscription) SubscriptionId() (string, error) { + res, ok := s.Cache.Load("subscriptionId") + if !ok || !res.Valid { + if err := s.ComputeSubscriptionId(); err != nil { + return "", err + } + res, ok = s.Cache.Load("subscriptionId") + if !ok { + return "", errors.New("\"azure.subscription\" calculated \"subscriptionId\" but didn't find its value in cache.") + } + s.MotorRuntime.Trigger(s, "subscriptionId") + } + if res.Error != nil { + return "", res.Error + } + tres, ok := res.Data.(string) + if !ok { + return "", fmt.Errorf("\"azure.subscription\" failed to cast field \"subscriptionId\" to the right type (string): %#v", res) + } + return tres, nil +} + +// TenantId accessor autogenerated +func (s *mqlAzureSubscription) TenantId() (string, error) { + res, ok := s.Cache.Load("tenantId") + if !ok || !res.Valid { + if err := s.ComputeTenantId(); err != nil { + return "", err + } + res, ok = s.Cache.Load("tenantId") + if !ok { + return "", errors.New("\"azure.subscription\" calculated \"tenantId\" but didn't find its value in cache.") + } + s.MotorRuntime.Trigger(s, "tenantId") + } + if res.Error != nil { + return "", res.Error + } + tres, ok := res.Data.(string) + if !ok { + return "", fmt.Errorf("\"azure.subscription\" failed to cast field \"tenantId\" to the right type (string): %#v", res) + } + return tres, nil +} + +// ManagedByTenants accessor autogenerated +func (s *mqlAzureSubscription) ManagedByTenants() ([]interface{}, error) { + res, ok := s.Cache.Load("managedByTenants") + if !ok || !res.Valid { + if err := s.ComputeManagedByTenants(); err != nil { + return nil, err + } + res, ok = s.Cache.Load("managedByTenants") + if !ok { + return nil, errors.New("\"azure.subscription\" calculated \"managedByTenants\" but didn't find its value in cache.") + } + s.MotorRuntime.Trigger(s, "managedByTenants") + } + if res.Error != nil { + return nil, res.Error + } + tres, ok := res.Data.([]interface{}) + if !ok { + return nil, fmt.Errorf("\"azure.subscription\" failed to cast field \"managedByTenants\" to the right type ([]interface{}): %#v", res) + } + return tres, nil +} + +// Tags accessor autogenerated +func (s *mqlAzureSubscription) Tags() (map[string]interface{}, error) { + res, ok := s.Cache.Load("tags") + if !ok || !res.Valid { + if err := s.ComputeTags(); err != nil { + return nil, err + } + res, ok = s.Cache.Load("tags") + if !ok { + return nil, errors.New("\"azure.subscription\" calculated \"tags\" but didn't find its value in cache.") + } + s.MotorRuntime.Trigger(s, "tags") + } + if res.Error != nil { + return nil, res.Error + } + tres, ok := res.Data.(map[string]interface{}) + if !ok { + return nil, fmt.Errorf("\"azure.subscription\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) + } + return tres, nil +} + +// State accessor autogenerated +func (s *mqlAzureSubscription) State() (string, error) { + res, ok := s.Cache.Load("state") + if !ok || !res.Valid { + if err := s.ComputeState(); err != nil { + return "", err + } + res, ok = s.Cache.Load("state") + if !ok { + return "", errors.New("\"azure.subscription\" calculated \"state\" but didn't find its value in cache.") + } + s.MotorRuntime.Trigger(s, "state") + } + if res.Error != nil { + return "", res.Error + } + tres, ok := res.Data.(string) + if !ok { + return "", fmt.Errorf("\"azure.subscription\" failed to cast field \"state\" to the right type (string): %#v", res) + } + return tres, nil +} + +// AuthorizationSource accessor autogenerated +func (s *mqlAzureSubscription) AuthorizationSource() (string, error) { + res, ok := s.Cache.Load("authorizationSource") + if !ok || !res.Valid { + if err := s.ComputeAuthorizationSource(); err != nil { + return "", err + } + res, ok = s.Cache.Load("authorizationSource") + if !ok { + return "", errors.New("\"azure.subscription\" calculated \"authorizationSource\" but didn't find its value in cache.") + } + s.MotorRuntime.Trigger(s, "authorizationSource") + } + if res.Error != nil { + return "", res.Error + } + tres, ok := res.Data.(string) + if !ok { + return "", fmt.Errorf("\"azure.subscription\" failed to cast field \"authorizationSource\" to the right type (string): %#v", res) + } + return tres, nil +} + +// SubscriptionsPolicies accessor autogenerated +func (s *mqlAzureSubscription) SubscriptionsPolicies() (interface{}, error) { + res, ok := s.Cache.Load("subscriptionsPolicies") + if !ok || !res.Valid { + if err := s.ComputeSubscriptionsPolicies(); err != nil { + return nil, err + } + res, ok = s.Cache.Load("subscriptionsPolicies") + if !ok { + return nil, errors.New("\"azure.subscription\" calculated \"subscriptionsPolicies\" but didn't find its value in cache.") + } + s.MotorRuntime.Trigger(s, "subscriptionsPolicies") + } + if res.Error != nil { + return nil, res.Error + } + tres, ok := res.Data.(interface{}) + if !ok { + return nil, fmt.Errorf("\"azure.subscription\" failed to cast field \"subscriptionsPolicies\" to the right type (interface{}): %#v", res) + } + return tres, nil +} + +// ResourceGroups accessor autogenerated +func (s *mqlAzureSubscription) ResourceGroups() ([]interface{}, error) { + res, ok := s.Cache.Load("resourceGroups") + if !ok || !res.Valid { + if err := s.ComputeResourceGroups(); err != nil { + return nil, err + } + res, ok = s.Cache.Load("resourceGroups") + if !ok { + return nil, errors.New("\"azure.subscription\" calculated \"resourceGroups\" but didn't find its value in cache.") + } + s.MotorRuntime.Trigger(s, "resourceGroups") + } + if res.Error != nil { + return nil, res.Error + } + tres, ok := res.Data.([]interface{}) + if !ok { + return nil, fmt.Errorf("\"azure.subscription\" failed to cast field \"resourceGroups\" to the right type ([]interface{}): %#v", res) + } + return tres, nil +} + +// Compute accessor autogenerated +func (s *mqlAzureSubscription) Compute() (AzureSubscriptionComputeService, error) { + res, ok := s.Cache.Load("compute") + if !ok || !res.Valid { + if err := s.ComputeCompute(); err != nil { + return nil, err + } + res, ok = s.Cache.Load("compute") + if !ok { + return nil, errors.New("\"azure.subscription\" calculated \"compute\" but didn't find its value in cache.") + } + s.MotorRuntime.Trigger(s, "compute") + } + if res.Error != nil { + return nil, res.Error + } + tres, ok := res.Data.(AzureSubscriptionComputeService) + if !ok { + return nil, fmt.Errorf("\"azure.subscription\" failed to cast field \"compute\" to the right type (AzureSubscriptionComputeService): %#v", res) + } + return tres, nil +} + +// Network accessor autogenerated +func (s *mqlAzureSubscription) Network() (AzureSubscriptionNetworkService, error) { + res, ok := s.Cache.Load("network") + if !ok || !res.Valid { + if err := s.ComputeNetwork(); err != nil { + return nil, err + } + res, ok = s.Cache.Load("network") + if !ok { + return nil, errors.New("\"azure.subscription\" calculated \"network\" but didn't find its value in cache.") + } + s.MotorRuntime.Trigger(s, "network") + } + if res.Error != nil { + return nil, res.Error + } + tres, ok := res.Data.(AzureSubscriptionNetworkService) + if !ok { + return nil, fmt.Errorf("\"azure.subscription\" failed to cast field \"network\" to the right type (AzureSubscriptionNetworkService): %#v", res) + } + return tres, nil +} + +// Storage accessor autogenerated +func (s *mqlAzureSubscription) Storage() (AzureSubscriptionStorageService, error) { + res, ok := s.Cache.Load("storage") + if !ok || !res.Valid { + if err := s.ComputeStorage(); err != nil { + return nil, err + } + res, ok = s.Cache.Load("storage") + if !ok { + return nil, errors.New("\"azure.subscription\" calculated \"storage\" but didn't find its value in cache.") + } + s.MotorRuntime.Trigger(s, "storage") + } + if res.Error != nil { + return nil, res.Error + } + tres, ok := res.Data.(AzureSubscriptionStorageService) + if !ok { + return nil, fmt.Errorf("\"azure.subscription\" failed to cast field \"storage\" to the right type (AzureSubscriptionStorageService): %#v", res) + } + return tres, nil +} + +// Web accessor autogenerated +func (s *mqlAzureSubscription) Web() (AzureSubscriptionWebService, error) { + res, ok := s.Cache.Load("web") + if !ok || !res.Valid { + if err := s.ComputeWeb(); err != nil { + return nil, err + } + res, ok = s.Cache.Load("web") + if !ok { + return nil, errors.New("\"azure.subscription\" calculated \"web\" but didn't find its value in cache.") + } + s.MotorRuntime.Trigger(s, "web") + } + if res.Error != nil { + return nil, res.Error + } + tres, ok := res.Data.(AzureSubscriptionWebService) + if !ok { + return nil, fmt.Errorf("\"azure.subscription\" failed to cast field \"web\" to the right type (AzureSubscriptionWebService): %#v", res) + } + return tres, nil +} + +// Sql accessor autogenerated +func (s *mqlAzureSubscription) Sql() (AzureSubscriptionSqlService, error) { + res, ok := s.Cache.Load("sql") + if !ok || !res.Valid { + if err := s.ComputeSql(); err != nil { + return nil, err + } + res, ok = s.Cache.Load("sql") + if !ok { + return nil, errors.New("\"azure.subscription\" calculated \"sql\" but didn't find its value in cache.") + } + s.MotorRuntime.Trigger(s, "sql") + } + if res.Error != nil { + return nil, res.Error + } + tres, ok := res.Data.(AzureSubscriptionSqlService) + if !ok { + return nil, fmt.Errorf("\"azure.subscription\" failed to cast field \"sql\" to the right type (AzureSubscriptionSqlService): %#v", res) + } + return tres, nil +} + +// MySql accessor autogenerated +func (s *mqlAzureSubscription) MySql() (AzureSubscriptionMysqlService, error) { + res, ok := s.Cache.Load("mySql") + if !ok || !res.Valid { + if err := s.ComputeMySql(); err != nil { + return nil, err + } + res, ok = s.Cache.Load("mySql") + if !ok { + return nil, errors.New("\"azure.subscription\" calculated \"mySql\" but didn't find its value in cache.") + } + s.MotorRuntime.Trigger(s, "mySql") + } + if res.Error != nil { + return nil, res.Error + } + tres, ok := res.Data.(AzureSubscriptionMysqlService) + if !ok { + return nil, fmt.Errorf("\"azure.subscription\" failed to cast field \"mySql\" to the right type (AzureSubscriptionMysqlService): %#v", res) + } + return tres, nil +} + +// PostgreSql accessor autogenerated +func (s *mqlAzureSubscription) PostgreSql() (AzureSubscriptionPostgresqlService, error) { + res, ok := s.Cache.Load("postgreSql") + if !ok || !res.Valid { + if err := s.ComputePostgreSql(); err != nil { + return nil, err + } + res, ok = s.Cache.Load("postgreSql") + if !ok { + return nil, errors.New("\"azure.subscription\" calculated \"postgreSql\" but didn't find its value in cache.") + } + s.MotorRuntime.Trigger(s, "postgreSql") + } + if res.Error != nil { + return nil, res.Error + } + tres, ok := res.Data.(AzureSubscriptionPostgresqlService) + if !ok { + return nil, fmt.Errorf("\"azure.subscription\" failed to cast field \"postgreSql\" to the right type (AzureSubscriptionPostgresqlService): %#v", res) + } + return tres, nil +} + +// MariaDb accessor autogenerated +func (s *mqlAzureSubscription) MariaDb() (AzureSubscriptionMariadbService, error) { + res, ok := s.Cache.Load("mariaDb") + if !ok || !res.Valid { + if err := s.ComputeMariaDb(); err != nil { + return nil, err + } + res, ok = s.Cache.Load("mariaDb") + if !ok { + return nil, errors.New("\"azure.subscription\" calculated \"mariaDb\" but didn't find its value in cache.") + } + s.MotorRuntime.Trigger(s, "mariaDb") + } + if res.Error != nil { + return nil, res.Error + } + tres, ok := res.Data.(AzureSubscriptionMariadbService) + if !ok { + return nil, fmt.Errorf("\"azure.subscription\" failed to cast field \"mariaDb\" to the right type (AzureSubscriptionMariadbService): %#v", res) + } + return tres, nil +} + +// KeyVault accessor autogenerated +func (s *mqlAzureSubscription) KeyVault() (AzureSubscriptionKeyvaultService, error) { + res, ok := s.Cache.Load("keyVault") + if !ok || !res.Valid { + if err := s.ComputeKeyVault(); err != nil { + return nil, err + } + res, ok = s.Cache.Load("keyVault") + if !ok { + return nil, errors.New("\"azure.subscription\" calculated \"keyVault\" but didn't find its value in cache.") + } + s.MotorRuntime.Trigger(s, "keyVault") + } + if res.Error != nil { + return nil, res.Error + } + tres, ok := res.Data.(AzureSubscriptionKeyvaultService) + if !ok { + return nil, fmt.Errorf("\"azure.subscription\" failed to cast field \"keyVault\" to the right type (AzureSubscriptionKeyvaultService): %#v", res) + } + return tres, nil +} + +// Authorization accessor autogenerated +func (s *mqlAzureSubscription) Authorization() (AzureSubscriptionAuthorizationService, error) { + res, ok := s.Cache.Load("authorization") + if !ok || !res.Valid { + if err := s.ComputeAuthorization(); err != nil { + return nil, err + } + res, ok = s.Cache.Load("authorization") + if !ok { + return nil, errors.New("\"azure.subscription\" calculated \"authorization\" but didn't find its value in cache.") + } + s.MotorRuntime.Trigger(s, "authorization") + } + if res.Error != nil { + return nil, res.Error + } + tres, ok := res.Data.(AzureSubscriptionAuthorizationService) + if !ok { + return nil, fmt.Errorf("\"azure.subscription\" failed to cast field \"authorization\" to the right type (AzureSubscriptionAuthorizationService): %#v", res) + } + return tres, nil +} + +// Monitor accessor autogenerated +func (s *mqlAzureSubscription) Monitor() (AzureSubscriptionMonitorService, error) { + res, ok := s.Cache.Load("monitor") + if !ok || !res.Valid { + if err := s.ComputeMonitor(); err != nil { + return nil, err + } + res, ok = s.Cache.Load("monitor") + if !ok { + return nil, errors.New("\"azure.subscription\" calculated \"monitor\" but didn't find its value in cache.") + } + s.MotorRuntime.Trigger(s, "monitor") + } + if res.Error != nil { + return nil, res.Error + } + tres, ok := res.Data.(AzureSubscriptionMonitorService) + if !ok { + return nil, fmt.Errorf("\"azure.subscription\" failed to cast field \"monitor\" to the right type (AzureSubscriptionMonitorService): %#v", res) + } + return tres, nil +} + +// CloudDefender accessor autogenerated +func (s *mqlAzureSubscription) CloudDefender() (AzureSubscriptionCloudDefenderService, error) { + res, ok := s.Cache.Load("cloudDefender") + if !ok || !res.Valid { + if err := s.ComputeCloudDefender(); err != nil { + return nil, err + } + res, ok = s.Cache.Load("cloudDefender") + if !ok { + return nil, errors.New("\"azure.subscription\" calculated \"cloudDefender\" but didn't find its value in cache.") + } + s.MotorRuntime.Trigger(s, "cloudDefender") + } + if res.Error != nil { + return nil, res.Error + } + tres, ok := res.Data.(AzureSubscriptionCloudDefenderService) + if !ok { + return nil, fmt.Errorf("\"azure.subscription\" failed to cast field \"cloudDefender\" to the right type (AzureSubscriptionCloudDefenderService): %#v", res) + } + return tres, nil +} + +// Resources accessor autogenerated +func (s *mqlAzureSubscription) Resources() ([]interface{}, error) { + res, ok := s.Cache.Load("resources") + if !ok || !res.Valid { + if err := s.ComputeResources(); err != nil { + return nil, err + } + res, ok = s.Cache.Load("resources") + if !ok { + return nil, errors.New("\"azure.subscription\" calculated \"resources\" but didn't find its value in cache.") + } + s.MotorRuntime.Trigger(s, "resources") + } + if res.Error != nil { + return nil, res.Error + } + tres, ok := res.Data.([]interface{}) + if !ok { + return nil, fmt.Errorf("\"azure.subscription\" failed to cast field \"resources\" to the right type ([]interface{}): %#v", res) + } + return tres, nil +} + +// Compute accessor autogenerated +func (s *mqlAzureSubscription) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription].MqlCompute") + switch name { + case "id": + return s.ComputeId() + case "name": + return s.ComputeName() + case "subscriptionId": + return s.ComputeSubscriptionId() + case "tenantId": + return s.ComputeTenantId() + case "managedByTenants": + return s.ComputeManagedByTenants() + case "tags": + return s.ComputeTags() + case "state": + return s.ComputeState() + case "authorizationSource": + return s.ComputeAuthorizationSource() + case "subscriptionsPolicies": + return s.ComputeSubscriptionsPolicies() + case "resourceGroups": + return s.ComputeResourceGroups() + case "compute": + return s.ComputeCompute() + case "network": + return s.ComputeNetwork() + case "storage": + return s.ComputeStorage() + case "web": + return s.ComputeWeb() + case "sql": + return s.ComputeSql() + case "mySql": + return s.ComputeMySql() + case "postgreSql": + return s.ComputePostgreSql() + case "mariaDb": + return s.ComputeMariaDb() + case "keyVault": + return s.ComputeKeyVault() + case "authorization": + return s.ComputeAuthorization() + case "monitor": + return s.ComputeMonitor() + case "cloudDefender": + return s.ComputeCloudDefender() + case "resources": + return s.ComputeResources() + default: + return errors.New("Cannot find field '" + name + "' in \"azure.subscription\" resource") + } +} + +// ComputeId computer autogenerated +func (s *mqlAzureSubscription) ComputeId() error { + var err error + if _, ok := s.Cache.Load("id"); ok { + return nil + } + vres, err := s.GetId() + if _, ok := err.(resources.NotReadyError); ok { + return err + } + s.Cache.Store("id", &resources.CacheEntry{Data: vres, Valid: true, Error: err, Timestamp: time.Now().Unix()}) + return nil +} + +// ComputeName computer autogenerated +func (s *mqlAzureSubscription) ComputeName() error { + var err error + if _, ok := s.Cache.Load("name"); ok { + return nil + } + vres, err := s.GetName() + if _, ok := err.(resources.NotReadyError); ok { + return err + } + s.Cache.Store("name", &resources.CacheEntry{Data: vres, Valid: true, Error: err, Timestamp: time.Now().Unix()}) + return nil +} + +// ComputeSubscriptionId computer autogenerated +func (s *mqlAzureSubscription) ComputeSubscriptionId() error { + var err error + if _, ok := s.Cache.Load("subscriptionId"); ok { + return nil + } + vres, err := s.GetSubscriptionId() + if _, ok := err.(resources.NotReadyError); ok { + return err + } + s.Cache.Store("subscriptionId", &resources.CacheEntry{Data: vres, Valid: true, Error: err, Timestamp: time.Now().Unix()}) + return nil +} + +// ComputeTenantId computer autogenerated +func (s *mqlAzureSubscription) ComputeTenantId() error { + var err error + if _, ok := s.Cache.Load("tenantId"); ok { + return nil + } + vres, err := s.GetTenantId() + if _, ok := err.(resources.NotReadyError); ok { + return err + } + s.Cache.Store("tenantId", &resources.CacheEntry{Data: vres, Valid: true, Error: err, Timestamp: time.Now().Unix()}) + return nil +} + +// ComputeManagedByTenants computer autogenerated +func (s *mqlAzureSubscription) ComputeManagedByTenants() error { + var err error + if _, ok := s.Cache.Load("managedByTenants"); ok { + return nil + } + vres, err := s.GetManagedByTenants() + if _, ok := err.(resources.NotReadyError); ok { + return err + } + s.Cache.Store("managedByTenants", &resources.CacheEntry{Data: vres, Valid: true, Error: err, Timestamp: time.Now().Unix()}) + return nil } -// mqlAzure for the azure resource -type mqlAzure struct { - *resources.Resource +// ComputeTags computer autogenerated +func (s *mqlAzureSubscription) ComputeTags() error { + var err error + if _, ok := s.Cache.Load("tags"); ok { + return nil + } + vres, err := s.GetTags() + if _, ok := err.(resources.NotReadyError); ok { + return err + } + s.Cache.Store("tags", &resources.CacheEntry{Data: vres, Valid: true, Error: err, Timestamp: time.Now().Unix()}) + return nil } -// MqlResource to retrieve the underlying resource info -func (s *mqlAzure) MqlResource() *resources.Resource { - return s.Resource +// ComputeState computer autogenerated +func (s *mqlAzureSubscription) ComputeState() error { + var err error + if _, ok := s.Cache.Load("state"); ok { + return nil + } + vres, err := s.GetState() + if _, ok := err.(resources.NotReadyError); ok { + return err + } + s.Cache.Store("state", &resources.CacheEntry{Data: vres, Valid: true, Error: err, Timestamp: time.Now().Unix()}) + return nil } -// create a new instance of the azure resource -func newAzure(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { - // User hooks +// ComputeAuthorizationSource computer autogenerated +func (s *mqlAzureSubscription) ComputeAuthorizationSource() error { var err error - res := mqlAzure{runtime.NewResource("azure")} - // assign all named fields - var id string - - now := time.Now().Unix() - for name, val := range *args { - if val == nil { - res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) - continue - } + if _, ok := s.Cache.Load("authorizationSource"); ok { + return nil + } + vres, err := s.GetAuthorizationSource() + if _, ok := err.(resources.NotReadyError); ok { + return err + } + s.Cache.Store("authorizationSource", &resources.CacheEntry{Data: vres, Valid: true, Error: err, Timestamp: time.Now().Unix()}) + return nil +} - switch name { - case "resources": - if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure\", its \"resources\" argument has the wrong type (expected type \"[]interface{}\")") - } - case "resourceGroups": - if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure\", its \"resourceGroups\" argument has the wrong type (expected type \"[]interface{}\")") - } - case "__id": - idVal, ok := val.(string) - if !ok { - return nil, errors.New("Failed to initialize \"azure\", its \"__id\" argument has the wrong type (expected type \"string\")") - } - id = idVal - default: - return nil, errors.New("Initialized azure with unknown argument " + name) - } - res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) +// ComputeSubscriptionsPolicies computer autogenerated +func (s *mqlAzureSubscription) ComputeSubscriptionsPolicies() error { + var err error + if _, ok := s.Cache.Load("subscriptionsPolicies"); ok { + return nil } + vres, err := s.GetSubscriptionsPolicies() + if _, ok := err.(resources.NotReadyError); ok { + return err + } + s.Cache.Store("subscriptionsPolicies", &resources.CacheEntry{Data: vres, Valid: true, Error: err, Timestamp: time.Now().Unix()}) + return nil +} - // Get the ID - if id == "" { - res.Resource.Id, err = res.id() - if err != nil { - return nil, err - } - } else { - res.Resource.Id = id +// ComputeResourceGroups computer autogenerated +func (s *mqlAzureSubscription) ComputeResourceGroups() error { + var err error + if _, ok := s.Cache.Load("resourceGroups"); ok { + return nil + } + vres, err := s.GetResourceGroups() + if _, ok := err.(resources.NotReadyError); ok { + return err } + s.Cache.Store("resourceGroups", &resources.CacheEntry{Data: vres, Valid: true, Error: err, Timestamp: time.Now().Unix()}) + return nil +} - return &res, nil +// ComputeCompute computer autogenerated +func (s *mqlAzureSubscription) ComputeCompute() error { + var err error + if _, ok := s.Cache.Load("compute"); ok { + return nil + } + vres, err := s.GetCompute() + if _, ok := err.(resources.NotReadyError); ok { + return err + } + s.Cache.Store("compute", &resources.CacheEntry{Data: vres, Valid: true, Error: err, Timestamp: time.Now().Unix()}) + return nil } -func (s *mqlAzure) Validate() error { - // required arguments - // no required fields found +// ComputeNetwork computer autogenerated +func (s *mqlAzureSubscription) ComputeNetwork() error { + var err error + if _, ok := s.Cache.Load("network"); ok { + return nil + } + vres, err := s.GetNetwork() + if _, ok := err.(resources.NotReadyError); ok { + return err + } + s.Cache.Store("network", &resources.CacheEntry{Data: vres, Valid: true, Error: err, Timestamp: time.Now().Unix()}) + return nil +} +// ComputeStorage computer autogenerated +func (s *mqlAzureSubscription) ComputeStorage() error { + var err error + if _, ok := s.Cache.Load("storage"); ok { + return nil + } + vres, err := s.GetStorage() + if _, ok := err.(resources.NotReadyError); ok { + return err + } + s.Cache.Store("storage", &resources.CacheEntry{Data: vres, Valid: true, Error: err, Timestamp: time.Now().Unix()}) return nil } -// Register accessor autogenerated -func (s *mqlAzure) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure].Register") - switch name { - case "resources": +// ComputeWeb computer autogenerated +func (s *mqlAzureSubscription) ComputeWeb() error { + var err error + if _, ok := s.Cache.Load("web"); ok { return nil - case "resourceGroups": + } + vres, err := s.GetWeb() + if _, ok := err.(resources.NotReadyError); ok { + return err + } + s.Cache.Store("web", &resources.CacheEntry{Data: vres, Valid: true, Error: err, Timestamp: time.Now().Unix()}) + return nil +} + +// ComputeSql computer autogenerated +func (s *mqlAzureSubscription) ComputeSql() error { + var err error + if _, ok := s.Cache.Load("sql"); ok { return nil - default: - return errors.New("Cannot find field '" + name + "' in \"azure\" resource") } + vres, err := s.GetSql() + if _, ok := err.(resources.NotReadyError); ok { + return err + } + s.Cache.Store("sql", &resources.CacheEntry{Data: vres, Valid: true, Error: err, Timestamp: time.Now().Unix()}) + return nil } -// Field accessor autogenerated -func (s *mqlAzure) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure].Field") - switch name { - case "resources": - return s.Resources() - case "resourceGroups": - return s.ResourceGroups() - default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure\" resource") +// ComputeMySql computer autogenerated +func (s *mqlAzureSubscription) ComputeMySql() error { + var err error + if _, ok := s.Cache.Load("mySql"); ok { + return nil + } + vres, err := s.GetMySql() + if _, ok := err.(resources.NotReadyError); ok { + return err } + s.Cache.Store("mySql", &resources.CacheEntry{Data: vres, Valid: true, Error: err, Timestamp: time.Now().Unix()}) + return nil } -// Resources accessor autogenerated -func (s *mqlAzure) Resources() ([]interface{}, error) { - res, ok := s.Cache.Load("resources") - if !ok || !res.Valid { - if err := s.ComputeResources(); err != nil { - return nil, err - } - res, ok = s.Cache.Load("resources") - if !ok { - return nil, errors.New("\"azure\" calculated \"resources\" but didn't find its value in cache.") - } - s.MotorRuntime.Trigger(s, "resources") +// ComputePostgreSql computer autogenerated +func (s *mqlAzureSubscription) ComputePostgreSql() error { + var err error + if _, ok := s.Cache.Load("postgreSql"); ok { + return nil } - if res.Error != nil { - return nil, res.Error + vres, err := s.GetPostgreSql() + if _, ok := err.(resources.NotReadyError); ok { + return err } - tres, ok := res.Data.([]interface{}) - if !ok { - return nil, fmt.Errorf("\"azure\" failed to cast field \"resources\" to the right type ([]interface{}): %#v", res) + s.Cache.Store("postgreSql", &resources.CacheEntry{Data: vres, Valid: true, Error: err, Timestamp: time.Now().Unix()}) + return nil +} + +// ComputeMariaDb computer autogenerated +func (s *mqlAzureSubscription) ComputeMariaDb() error { + var err error + if _, ok := s.Cache.Load("mariaDb"); ok { + return nil } - return tres, nil + vres, err := s.GetMariaDb() + if _, ok := err.(resources.NotReadyError); ok { + return err + } + s.Cache.Store("mariaDb", &resources.CacheEntry{Data: vres, Valid: true, Error: err, Timestamp: time.Now().Unix()}) + return nil } -// ResourceGroups accessor autogenerated -func (s *mqlAzure) ResourceGroups() ([]interface{}, error) { - res, ok := s.Cache.Load("resourceGroups") - if !ok || !res.Valid { - if err := s.ComputeResourceGroups(); err != nil { - return nil, err - } - res, ok = s.Cache.Load("resourceGroups") - if !ok { - return nil, errors.New("\"azure\" calculated \"resourceGroups\" but didn't find its value in cache.") - } - s.MotorRuntime.Trigger(s, "resourceGroups") +// ComputeKeyVault computer autogenerated +func (s *mqlAzureSubscription) ComputeKeyVault() error { + var err error + if _, ok := s.Cache.Load("keyVault"); ok { + return nil } - if res.Error != nil { - return nil, res.Error + vres, err := s.GetKeyVault() + if _, ok := err.(resources.NotReadyError); ok { + return err } - tres, ok := res.Data.([]interface{}) - if !ok { - return nil, fmt.Errorf("\"azure\" failed to cast field \"resourceGroups\" to the right type ([]interface{}): %#v", res) + s.Cache.Store("keyVault", &resources.CacheEntry{Data: vres, Valid: true, Error: err, Timestamp: time.Now().Unix()}) + return nil +} + +// ComputeAuthorization computer autogenerated +func (s *mqlAzureSubscription) ComputeAuthorization() error { + var err error + if _, ok := s.Cache.Load("authorization"); ok { + return nil } - return tres, nil + vres, err := s.GetAuthorization() + if _, ok := err.(resources.NotReadyError); ok { + return err + } + s.Cache.Store("authorization", &resources.CacheEntry{Data: vres, Valid: true, Error: err, Timestamp: time.Now().Unix()}) + return nil } -// Compute accessor autogenerated -func (s *mqlAzure) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure].MqlCompute") - switch name { - case "resources": - return s.ComputeResources() - case "resourceGroups": - return s.ComputeResourceGroups() - default: - return errors.New("Cannot find field '" + name + "' in \"azure\" resource") +// ComputeMonitor computer autogenerated +func (s *mqlAzureSubscription) ComputeMonitor() error { + var err error + if _, ok := s.Cache.Load("monitor"); ok { + return nil } + vres, err := s.GetMonitor() + if _, ok := err.(resources.NotReadyError); ok { + return err + } + s.Cache.Store("monitor", &resources.CacheEntry{Data: vres, Valid: true, Error: err, Timestamp: time.Now().Unix()}) + return nil } -// ComputeResources computer autogenerated -func (s *mqlAzure) ComputeResources() error { +// ComputeCloudDefender computer autogenerated +func (s *mqlAzureSubscription) ComputeCloudDefender() error { var err error - if _, ok := s.Cache.Load("resources"); ok { + if _, ok := s.Cache.Load("cloudDefender"); ok { return nil } - vres, err := s.GetResources() + vres, err := s.GetCloudDefender() if _, ok := err.(resources.NotReadyError); ok { return err } - s.Cache.Store("resources", &resources.CacheEntry{Data: vres, Valid: true, Error: err, Timestamp: time.Now().Unix()}) + s.Cache.Store("cloudDefender", &resources.CacheEntry{Data: vres, Valid: true, Error: err, Timestamp: time.Now().Unix()}) return nil } -// ComputeResourceGroups computer autogenerated -func (s *mqlAzure) ComputeResourceGroups() error { +// ComputeResources computer autogenerated +func (s *mqlAzureSubscription) ComputeResources() error { var err error - if _, ok := s.Cache.Load("resourceGroups"); ok { + if _, ok := s.Cache.Load("resources"); ok { return nil } - vres, err := s.GetResourceGroups() + vres, err := s.GetResources() if _, ok := err.(resources.NotReadyError); ok { return err } - s.Cache.Store("resourceGroups", &resources.CacheEntry{Data: vres, Valid: true, Error: err, Timestamp: time.Now().Unix()}) + s.Cache.Store("resources", &resources.CacheEntry{Data: vres, Valid: true, Error: err, Timestamp: time.Now().Unix()}) return nil } -// AzureResource resource interface -type AzureResource interface { +// AzureSubscriptionResource resource interface +type AzureSubscriptionResource interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -2008,21 +3025,21 @@ type AzureResource interface { ChangedTime() (*time.Time, error) } -// mqlAzureResource for the azure.resource resource -type mqlAzureResource struct { +// mqlAzureSubscriptionResource for the azure.subscription.resource resource +type mqlAzureSubscriptionResource struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureResource) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionResource) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.resource resource -func newAzureResource(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.resource resource +func newAzureSubscriptionResource(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureResource{runtime.NewResource("azure.resource")} + res := mqlAzureSubscriptionResource{runtime.NewResource("azure.subscription.resource")} // assign all named fields var id string @@ -2036,64 +3053,64 @@ func newAzureResource(runtime *resources.Runtime, args *resources.Args) (interfa switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.resource\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.resource\", its \"id\" argument has the wrong type (expected type \"string\")") } case "name": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.resource\", its \"name\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.resource\", its \"name\" argument has the wrong type (expected type \"string\")") } case "kind": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.resource\", its \"kind\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.resource\", its \"kind\" argument has the wrong type (expected type \"string\")") } case "location": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.resource\", its \"location\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.resource\", its \"location\" argument has the wrong type (expected type \"string\")") } case "tags": if _, ok := val.(map[string]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.resource\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.resource\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") } case "type": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.resource\", its \"type\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.resource\", its \"type\" argument has the wrong type (expected type \"string\")") } case "managedBy": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.resource\", its \"managedBy\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.resource\", its \"managedBy\" argument has the wrong type (expected type \"string\")") } case "sku": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.resource\", its \"sku\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.resource\", its \"sku\" argument has the wrong type (expected type \"interface{}\")") } case "plan": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.resource\", its \"plan\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.resource\", its \"plan\" argument has the wrong type (expected type \"interface{}\")") } case "identity": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.resource\", its \"identity\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.resource\", its \"identity\" argument has the wrong type (expected type \"interface{}\")") } case "provisioningState": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.resource\", its \"provisioningState\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.resource\", its \"provisioningState\" argument has the wrong type (expected type \"string\")") } case "createdTime": if _, ok := val.(*time.Time); !ok { - return nil, errors.New("Failed to initialize \"azure.resource\", its \"createdTime\" argument has the wrong type (expected type \"*time.Time\")") + return nil, errors.New("Failed to initialize \"azure.subscription.resource\", its \"createdTime\" argument has the wrong type (expected type \"*time.Time\")") } case "changedTime": if _, ok := val.(*time.Time); !ok { - return nil, errors.New("Failed to initialize \"azure.resource\", its \"changedTime\" argument has the wrong type (expected type \"*time.Time\")") + return nil, errors.New("Failed to initialize \"azure.subscription.resource\", its \"changedTime\" argument has the wrong type (expected type \"*time.Time\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.resource\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.resource\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.resource with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.resource with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -2111,54 +3128,54 @@ func newAzureResource(runtime *resources.Runtime, args *resources.Args) (interfa return &res, nil } -func (s *mqlAzureResource) Validate() error { +func (s *mqlAzureSubscriptionResource) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.resource\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.resource\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("name"); !ok { - return errors.New("Initialized \"azure.resource\" resource without a \"name\". This field is required.") + return errors.New("Initialized \"azure.subscription.resource\" resource without a \"name\". This field is required.") } if _, ok := s.Cache.Load("kind"); !ok { - return errors.New("Initialized \"azure.resource\" resource without a \"kind\". This field is required.") + return errors.New("Initialized \"azure.subscription.resource\" resource without a \"kind\". This field is required.") } if _, ok := s.Cache.Load("location"); !ok { - return errors.New("Initialized \"azure.resource\" resource without a \"location\". This field is required.") + return errors.New("Initialized \"azure.subscription.resource\" resource without a \"location\". This field is required.") } if _, ok := s.Cache.Load("tags"); !ok { - return errors.New("Initialized \"azure.resource\" resource without a \"tags\". This field is required.") + return errors.New("Initialized \"azure.subscription.resource\" resource without a \"tags\". This field is required.") } if _, ok := s.Cache.Load("type"); !ok { - return errors.New("Initialized \"azure.resource\" resource without a \"type\". This field is required.") + return errors.New("Initialized \"azure.subscription.resource\" resource without a \"type\". This field is required.") } if _, ok := s.Cache.Load("managedBy"); !ok { - return errors.New("Initialized \"azure.resource\" resource without a \"managedBy\". This field is required.") + return errors.New("Initialized \"azure.subscription.resource\" resource without a \"managedBy\". This field is required.") } if _, ok := s.Cache.Load("sku"); !ok { - return errors.New("Initialized \"azure.resource\" resource without a \"sku\". This field is required.") + return errors.New("Initialized \"azure.subscription.resource\" resource without a \"sku\". This field is required.") } if _, ok := s.Cache.Load("plan"); !ok { - return errors.New("Initialized \"azure.resource\" resource without a \"plan\". This field is required.") + return errors.New("Initialized \"azure.subscription.resource\" resource without a \"plan\". This field is required.") } if _, ok := s.Cache.Load("identity"); !ok { - return errors.New("Initialized \"azure.resource\" resource without a \"identity\". This field is required.") + return errors.New("Initialized \"azure.subscription.resource\" resource without a \"identity\". This field is required.") } if _, ok := s.Cache.Load("provisioningState"); !ok { - return errors.New("Initialized \"azure.resource\" resource without a \"provisioningState\". This field is required.") + return errors.New("Initialized \"azure.subscription.resource\" resource without a \"provisioningState\". This field is required.") } if _, ok := s.Cache.Load("createdTime"); !ok { - return errors.New("Initialized \"azure.resource\" resource without a \"createdTime\". This field is required.") + return errors.New("Initialized \"azure.subscription.resource\" resource without a \"createdTime\". This field is required.") } if _, ok := s.Cache.Load("changedTime"); !ok { - return errors.New("Initialized \"azure.resource\" resource without a \"changedTime\". This field is required.") + return errors.New("Initialized \"azure.subscription.resource\" resource without a \"changedTime\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureResource) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.resource].Register") +func (s *mqlAzureSubscriptionResource) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.resource].Register") switch name { case "id": return nil @@ -2187,13 +3204,13 @@ func (s *mqlAzureResource) Register(name string) error { case "changedTime": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.resource\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.resource\" resource") } } // Field accessor autogenerated -func (s *mqlAzureResource) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.resource].Field") +func (s *mqlAzureSubscriptionResource) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.resource].Field") switch name { case "id": return s.Id() @@ -2222,221 +3239,221 @@ func (s *mqlAzureResource) Field(name string) (interface{}, error) { case "changedTime": return s.ChangedTime() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.resource\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.resource\" resource") } } // Id accessor autogenerated -func (s *mqlAzureResource) Id() (string, error) { +func (s *mqlAzureSubscriptionResource) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.resource\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.resource\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.resource\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.resource\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Name accessor autogenerated -func (s *mqlAzureResource) Name() (string, error) { +func (s *mqlAzureSubscriptionResource) Name() (string, error) { res, ok := s.Cache.Load("name") if !ok || !res.Valid { - return "", errors.New("\"azure.resource\" failed: no value provided for static field \"name\"") + return "", errors.New("\"azure.subscription.resource\" failed: no value provided for static field \"name\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.resource\" failed to cast field \"name\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.resource\" failed to cast field \"name\" to the right type (string): %#v", res) } return tres, nil } // Kind accessor autogenerated -func (s *mqlAzureResource) Kind() (string, error) { +func (s *mqlAzureSubscriptionResource) Kind() (string, error) { res, ok := s.Cache.Load("kind") if !ok || !res.Valid { - return "", errors.New("\"azure.resource\" failed: no value provided for static field \"kind\"") + return "", errors.New("\"azure.subscription.resource\" failed: no value provided for static field \"kind\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.resource\" failed to cast field \"kind\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.resource\" failed to cast field \"kind\" to the right type (string): %#v", res) } return tres, nil } // Location accessor autogenerated -func (s *mqlAzureResource) Location() (string, error) { +func (s *mqlAzureSubscriptionResource) Location() (string, error) { res, ok := s.Cache.Load("location") if !ok || !res.Valid { - return "", errors.New("\"azure.resource\" failed: no value provided for static field \"location\"") + return "", errors.New("\"azure.subscription.resource\" failed: no value provided for static field \"location\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.resource\" failed to cast field \"location\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.resource\" failed to cast field \"location\" to the right type (string): %#v", res) } return tres, nil } // Tags accessor autogenerated -func (s *mqlAzureResource) Tags() (map[string]interface{}, error) { +func (s *mqlAzureSubscriptionResource) Tags() (map[string]interface{}, error) { res, ok := s.Cache.Load("tags") if !ok || !res.Valid { - return nil, errors.New("\"azure.resource\" failed: no value provided for static field \"tags\"") + return nil, errors.New("\"azure.subscription.resource\" failed: no value provided for static field \"tags\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(map[string]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.resource\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.resource\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) } return tres, nil } // Type accessor autogenerated -func (s *mqlAzureResource) Type() (string, error) { +func (s *mqlAzureSubscriptionResource) Type() (string, error) { res, ok := s.Cache.Load("type") if !ok || !res.Valid { - return "", errors.New("\"azure.resource\" failed: no value provided for static field \"type\"") + return "", errors.New("\"azure.subscription.resource\" failed: no value provided for static field \"type\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.resource\" failed to cast field \"type\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.resource\" failed to cast field \"type\" to the right type (string): %#v", res) } return tres, nil } // ManagedBy accessor autogenerated -func (s *mqlAzureResource) ManagedBy() (string, error) { +func (s *mqlAzureSubscriptionResource) ManagedBy() (string, error) { res, ok := s.Cache.Load("managedBy") if !ok || !res.Valid { - return "", errors.New("\"azure.resource\" failed: no value provided for static field \"managedBy\"") + return "", errors.New("\"azure.subscription.resource\" failed: no value provided for static field \"managedBy\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.resource\" failed to cast field \"managedBy\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.resource\" failed to cast field \"managedBy\" to the right type (string): %#v", res) } return tres, nil } // Sku accessor autogenerated -func (s *mqlAzureResource) Sku() (interface{}, error) { +func (s *mqlAzureSubscriptionResource) Sku() (interface{}, error) { res, ok := s.Cache.Load("sku") if !ok || !res.Valid { - return nil, errors.New("\"azure.resource\" failed: no value provided for static field \"sku\"") + return nil, errors.New("\"azure.subscription.resource\" failed: no value provided for static field \"sku\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.resource\" failed to cast field \"sku\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.resource\" failed to cast field \"sku\" to the right type (interface{}): %#v", res) } return tres, nil } // Plan accessor autogenerated -func (s *mqlAzureResource) Plan() (interface{}, error) { +func (s *mqlAzureSubscriptionResource) Plan() (interface{}, error) { res, ok := s.Cache.Load("plan") if !ok || !res.Valid { - return nil, errors.New("\"azure.resource\" failed: no value provided for static field \"plan\"") + return nil, errors.New("\"azure.subscription.resource\" failed: no value provided for static field \"plan\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.resource\" failed to cast field \"plan\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.resource\" failed to cast field \"plan\" to the right type (interface{}): %#v", res) } return tres, nil } // Identity accessor autogenerated -func (s *mqlAzureResource) Identity() (interface{}, error) { +func (s *mqlAzureSubscriptionResource) Identity() (interface{}, error) { res, ok := s.Cache.Load("identity") if !ok || !res.Valid { - return nil, errors.New("\"azure.resource\" failed: no value provided for static field \"identity\"") + return nil, errors.New("\"azure.subscription.resource\" failed: no value provided for static field \"identity\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.resource\" failed to cast field \"identity\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.resource\" failed to cast field \"identity\" to the right type (interface{}): %#v", res) } return tres, nil } // ProvisioningState accessor autogenerated -func (s *mqlAzureResource) ProvisioningState() (string, error) { +func (s *mqlAzureSubscriptionResource) ProvisioningState() (string, error) { res, ok := s.Cache.Load("provisioningState") if !ok || !res.Valid { - return "", errors.New("\"azure.resource\" failed: no value provided for static field \"provisioningState\"") + return "", errors.New("\"azure.subscription.resource\" failed: no value provided for static field \"provisioningState\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.resource\" failed to cast field \"provisioningState\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.resource\" failed to cast field \"provisioningState\" to the right type (string): %#v", res) } return tres, nil } // CreatedTime accessor autogenerated -func (s *mqlAzureResource) CreatedTime() (*time.Time, error) { +func (s *mqlAzureSubscriptionResource) CreatedTime() (*time.Time, error) { res, ok := s.Cache.Load("createdTime") if !ok || !res.Valid { - return nil, errors.New("\"azure.resource\" failed: no value provided for static field \"createdTime\"") + return nil, errors.New("\"azure.subscription.resource\" failed: no value provided for static field \"createdTime\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(*time.Time) if !ok { - return nil, fmt.Errorf("\"azure.resource\" failed to cast field \"createdTime\" to the right type (*time.Time): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.resource\" failed to cast field \"createdTime\" to the right type (*time.Time): %#v", res) } return tres, nil } // ChangedTime accessor autogenerated -func (s *mqlAzureResource) ChangedTime() (*time.Time, error) { +func (s *mqlAzureSubscriptionResource) ChangedTime() (*time.Time, error) { res, ok := s.Cache.Load("changedTime") if !ok || !res.Valid { - return nil, errors.New("\"azure.resource\" failed: no value provided for static field \"changedTime\"") + return nil, errors.New("\"azure.subscription.resource\" failed: no value provided for static field \"changedTime\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(*time.Time) if !ok { - return nil, fmt.Errorf("\"azure.resource\" failed to cast field \"changedTime\" to the right type (*time.Time): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.resource\" failed to cast field \"changedTime\" to the right type (*time.Time): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureResource) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.resource].MqlCompute") +func (s *mqlAzureSubscriptionResource) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.resource].MqlCompute") switch name { case "id": return nil @@ -2465,12 +3482,12 @@ func (s *mqlAzureResource) MqlCompute(name string) error { case "changedTime": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.resource\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.resource\" resource") } } -// AzureResourcegroup resource interface -type AzureResourcegroup interface { +// AzureSubscriptionResourcegroup resource interface +type AzureSubscriptionResourcegroup interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -2485,21 +3502,21 @@ type AzureResourcegroup interface { ProvisioningState() (string, error) } -// mqlAzureResourcegroup for the azure.resourcegroup resource -type mqlAzureResourcegroup struct { +// mqlAzureSubscriptionResourcegroup for the azure.subscription.resourcegroup resource +type mqlAzureSubscriptionResourcegroup struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureResourcegroup) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionResourcegroup) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.resourcegroup resource -func newAzureResourcegroup(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.resourcegroup resource +func newAzureSubscriptionResourcegroup(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureResourcegroup{runtime.NewResource("azure.resourcegroup")} + res := mqlAzureSubscriptionResourcegroup{runtime.NewResource("azure.subscription.resourcegroup")} // assign all named fields var id string @@ -2513,40 +3530,40 @@ func newAzureResourcegroup(runtime *resources.Runtime, args *resources.Args) (in switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.resourcegroup\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.resourcegroup\", its \"id\" argument has the wrong type (expected type \"string\")") } case "name": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.resourcegroup\", its \"name\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.resourcegroup\", its \"name\" argument has the wrong type (expected type \"string\")") } case "location": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.resourcegroup\", its \"location\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.resourcegroup\", its \"location\" argument has the wrong type (expected type \"string\")") } case "tags": if _, ok := val.(map[string]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.resourcegroup\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.resourcegroup\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") } case "type": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.resourcegroup\", its \"type\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.resourcegroup\", its \"type\" argument has the wrong type (expected type \"string\")") } case "managedBy": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.resourcegroup\", its \"managedBy\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.resourcegroup\", its \"managedBy\" argument has the wrong type (expected type \"string\")") } case "provisioningState": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.resourcegroup\", its \"provisioningState\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.resourcegroup\", its \"provisioningState\" argument has the wrong type (expected type \"string\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.resourcegroup\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.resourcegroup\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.resourcegroup with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.resourcegroup with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -2564,36 +3581,36 @@ func newAzureResourcegroup(runtime *resources.Runtime, args *resources.Args) (in return &res, nil } -func (s *mqlAzureResourcegroup) Validate() error { +func (s *mqlAzureSubscriptionResourcegroup) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.resourcegroup\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.resourcegroup\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("name"); !ok { - return errors.New("Initialized \"azure.resourcegroup\" resource without a \"name\". This field is required.") + return errors.New("Initialized \"azure.subscription.resourcegroup\" resource without a \"name\". This field is required.") } if _, ok := s.Cache.Load("location"); !ok { - return errors.New("Initialized \"azure.resourcegroup\" resource without a \"location\". This field is required.") + return errors.New("Initialized \"azure.subscription.resourcegroup\" resource without a \"location\". This field is required.") } if _, ok := s.Cache.Load("tags"); !ok { - return errors.New("Initialized \"azure.resourcegroup\" resource without a \"tags\". This field is required.") + return errors.New("Initialized \"azure.subscription.resourcegroup\" resource without a \"tags\". This field is required.") } if _, ok := s.Cache.Load("type"); !ok { - return errors.New("Initialized \"azure.resourcegroup\" resource without a \"type\". This field is required.") + return errors.New("Initialized \"azure.subscription.resourcegroup\" resource without a \"type\". This field is required.") } if _, ok := s.Cache.Load("managedBy"); !ok { - return errors.New("Initialized \"azure.resourcegroup\" resource without a \"managedBy\". This field is required.") + return errors.New("Initialized \"azure.subscription.resourcegroup\" resource without a \"managedBy\". This field is required.") } if _, ok := s.Cache.Load("provisioningState"); !ok { - return errors.New("Initialized \"azure.resourcegroup\" resource without a \"provisioningState\". This field is required.") + return errors.New("Initialized \"azure.subscription.resourcegroup\" resource without a \"provisioningState\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureResourcegroup) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.resourcegroup].Register") +func (s *mqlAzureSubscriptionResourcegroup) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.resourcegroup].Register") switch name { case "id": return nil @@ -2610,13 +3627,13 @@ func (s *mqlAzureResourcegroup) Register(name string) error { case "provisioningState": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.resourcegroup\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.resourcegroup\" resource") } } // Field accessor autogenerated -func (s *mqlAzureResourcegroup) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.resourcegroup].Field") +func (s *mqlAzureSubscriptionResourcegroup) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.resourcegroup].Field") switch name { case "id": return s.Id() @@ -2633,125 +3650,125 @@ func (s *mqlAzureResourcegroup) Field(name string) (interface{}, error) { case "provisioningState": return s.ProvisioningState() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.resourcegroup\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.resourcegroup\" resource") } } // Id accessor autogenerated -func (s *mqlAzureResourcegroup) Id() (string, error) { +func (s *mqlAzureSubscriptionResourcegroup) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.resourcegroup\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.resourcegroup\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.resourcegroup\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.resourcegroup\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Name accessor autogenerated -func (s *mqlAzureResourcegroup) Name() (string, error) { +func (s *mqlAzureSubscriptionResourcegroup) Name() (string, error) { res, ok := s.Cache.Load("name") if !ok || !res.Valid { - return "", errors.New("\"azure.resourcegroup\" failed: no value provided for static field \"name\"") + return "", errors.New("\"azure.subscription.resourcegroup\" failed: no value provided for static field \"name\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.resourcegroup\" failed to cast field \"name\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.resourcegroup\" failed to cast field \"name\" to the right type (string): %#v", res) } return tres, nil } // Location accessor autogenerated -func (s *mqlAzureResourcegroup) Location() (string, error) { +func (s *mqlAzureSubscriptionResourcegroup) Location() (string, error) { res, ok := s.Cache.Load("location") if !ok || !res.Valid { - return "", errors.New("\"azure.resourcegroup\" failed: no value provided for static field \"location\"") + return "", errors.New("\"azure.subscription.resourcegroup\" failed: no value provided for static field \"location\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.resourcegroup\" failed to cast field \"location\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.resourcegroup\" failed to cast field \"location\" to the right type (string): %#v", res) } return tres, nil } // Tags accessor autogenerated -func (s *mqlAzureResourcegroup) Tags() (map[string]interface{}, error) { +func (s *mqlAzureSubscriptionResourcegroup) Tags() (map[string]interface{}, error) { res, ok := s.Cache.Load("tags") if !ok || !res.Valid { - return nil, errors.New("\"azure.resourcegroup\" failed: no value provided for static field \"tags\"") + return nil, errors.New("\"azure.subscription.resourcegroup\" failed: no value provided for static field \"tags\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(map[string]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.resourcegroup\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.resourcegroup\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) } return tres, nil } // Type accessor autogenerated -func (s *mqlAzureResourcegroup) Type() (string, error) { +func (s *mqlAzureSubscriptionResourcegroup) Type() (string, error) { res, ok := s.Cache.Load("type") if !ok || !res.Valid { - return "", errors.New("\"azure.resourcegroup\" failed: no value provided for static field \"type\"") + return "", errors.New("\"azure.subscription.resourcegroup\" failed: no value provided for static field \"type\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.resourcegroup\" failed to cast field \"type\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.resourcegroup\" failed to cast field \"type\" to the right type (string): %#v", res) } return tres, nil } // ManagedBy accessor autogenerated -func (s *mqlAzureResourcegroup) ManagedBy() (string, error) { +func (s *mqlAzureSubscriptionResourcegroup) ManagedBy() (string, error) { res, ok := s.Cache.Load("managedBy") if !ok || !res.Valid { - return "", errors.New("\"azure.resourcegroup\" failed: no value provided for static field \"managedBy\"") + return "", errors.New("\"azure.subscription.resourcegroup\" failed: no value provided for static field \"managedBy\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.resourcegroup\" failed to cast field \"managedBy\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.resourcegroup\" failed to cast field \"managedBy\" to the right type (string): %#v", res) } return tres, nil } // ProvisioningState accessor autogenerated -func (s *mqlAzureResourcegroup) ProvisioningState() (string, error) { +func (s *mqlAzureSubscriptionResourcegroup) ProvisioningState() (string, error) { res, ok := s.Cache.Load("provisioningState") if !ok || !res.Valid { - return "", errors.New("\"azure.resourcegroup\" failed: no value provided for static field \"provisioningState\"") + return "", errors.New("\"azure.subscription.resourcegroup\" failed: no value provided for static field \"provisioningState\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.resourcegroup\" failed to cast field \"provisioningState\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.resourcegroup\" failed to cast field \"provisioningState\" to the right type (string): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureResourcegroup) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.resourcegroup].MqlCompute") +func (s *mqlAzureSubscriptionResourcegroup) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.resourcegroup].MqlCompute") switch name { case "id": return nil @@ -2768,36 +3785,46 @@ func (s *mqlAzureResourcegroup) MqlCompute(name string) error { case "provisioningState": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.resourcegroup\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.resourcegroup\" resource") } } -// AzureCompute resource interface -type AzureCompute interface { +// AzureSubscriptionComputeService resource interface +type AzureSubscriptionComputeService interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) Register(string) error Validate() error + SubscriptionId() (string, error) Vms() ([]interface{}, error) Disks() ([]interface{}, error) } -// mqlAzureCompute for the azure.compute resource -type mqlAzureCompute struct { +// mqlAzureSubscriptionComputeService for the azure.subscription.computeService resource +type mqlAzureSubscriptionComputeService struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureCompute) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionComputeService) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.compute resource -func newAzureCompute(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.computeService resource +func newAzureSubscriptionComputeService(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureCompute{runtime.NewResource("azure.compute")} + res := mqlAzureSubscriptionComputeService{runtime.NewResource("azure.subscription.computeService")} + var existing AzureSubscriptionComputeService + args, existing, err = res.init(args) + if err != nil { + return nil, err + } + if existing != nil { + return existing, nil + } + // assign all named fields var id string @@ -2809,22 +3836,26 @@ func newAzureCompute(runtime *resources.Runtime, args *resources.Args) (interfac } switch name { + case "subscriptionId": + if _, ok := val.(string); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription.computeService\", its \"subscriptionId\" argument has the wrong type (expected type \"string\")") + } case "vms": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.compute\", its \"vms\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.computeService\", its \"vms\" argument has the wrong type (expected type \"[]interface{}\")") } case "disks": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.compute\", its \"disks\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.computeService\", its \"disks\" argument has the wrong type (expected type \"[]interface{}\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.compute\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.computeService\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.compute with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.computeService with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -2842,41 +3873,63 @@ func newAzureCompute(runtime *resources.Runtime, args *resources.Args) (interfac return &res, nil } -func (s *mqlAzureCompute) Validate() error { +func (s *mqlAzureSubscriptionComputeService) Validate() error { // required arguments - // no required fields found + if _, ok := s.Cache.Load("subscriptionId"); !ok { + return errors.New("Initialized \"azure.subscription.computeService\" resource without a \"subscriptionId\". This field is required.") + } return nil } // Register accessor autogenerated -func (s *mqlAzureCompute) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.compute].Register") +func (s *mqlAzureSubscriptionComputeService) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.computeService].Register") switch name { + case "subscriptionId": + return nil case "vms": return nil case "disks": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.compute\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.computeService\" resource") } } // Field accessor autogenerated -func (s *mqlAzureCompute) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.compute].Field") +func (s *mqlAzureSubscriptionComputeService) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.computeService].Field") switch name { + case "subscriptionId": + return s.SubscriptionId() case "vms": return s.Vms() case "disks": return s.Disks() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.compute\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.computeService\" resource") + } +} + +// SubscriptionId accessor autogenerated +func (s *mqlAzureSubscriptionComputeService) SubscriptionId() (string, error) { + res, ok := s.Cache.Load("subscriptionId") + if !ok || !res.Valid { + return "", errors.New("\"azure.subscription.computeService\" failed: no value provided for static field \"subscriptionId\"") + } + if res.Error != nil { + return "", res.Error } + tres, ok := res.Data.(string) + if !ok { + return "", fmt.Errorf("\"azure.subscription.computeService\" failed to cast field \"subscriptionId\" to the right type (string): %#v", res) + } + return tres, nil } // Vms accessor autogenerated -func (s *mqlAzureCompute) Vms() ([]interface{}, error) { +func (s *mqlAzureSubscriptionComputeService) Vms() ([]interface{}, error) { res, ok := s.Cache.Load("vms") if !ok || !res.Valid { if err := s.ComputeVms(); err != nil { @@ -2884,7 +3937,7 @@ func (s *mqlAzureCompute) Vms() ([]interface{}, error) { } res, ok = s.Cache.Load("vms") if !ok { - return nil, errors.New("\"azure.compute\" calculated \"vms\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.computeService\" calculated \"vms\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "vms") } @@ -2893,13 +3946,13 @@ func (s *mqlAzureCompute) Vms() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.compute\" failed to cast field \"vms\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.computeService\" failed to cast field \"vms\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Disks accessor autogenerated -func (s *mqlAzureCompute) Disks() ([]interface{}, error) { +func (s *mqlAzureSubscriptionComputeService) Disks() ([]interface{}, error) { res, ok := s.Cache.Load("disks") if !ok || !res.Valid { if err := s.ComputeDisks(); err != nil { @@ -2907,7 +3960,7 @@ func (s *mqlAzureCompute) Disks() ([]interface{}, error) { } res, ok = s.Cache.Load("disks") if !ok { - return nil, errors.New("\"azure.compute\" calculated \"disks\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.computeService\" calculated \"disks\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "disks") } @@ -2916,26 +3969,28 @@ func (s *mqlAzureCompute) Disks() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.compute\" failed to cast field \"disks\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.computeService\" failed to cast field \"disks\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureCompute) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.compute].MqlCompute") +func (s *mqlAzureSubscriptionComputeService) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.computeService].MqlCompute") switch name { + case "subscriptionId": + return nil case "vms": return s.ComputeVms() case "disks": return s.ComputeDisks() default: - return errors.New("Cannot find field '" + name + "' in \"azure.compute\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.computeService\" resource") } } // ComputeVms computer autogenerated -func (s *mqlAzureCompute) ComputeVms() error { +func (s *mqlAzureSubscriptionComputeService) ComputeVms() error { var err error if _, ok := s.Cache.Load("vms"); ok { return nil @@ -2949,7 +4004,7 @@ func (s *mqlAzureCompute) ComputeVms() error { } // ComputeDisks computer autogenerated -func (s *mqlAzureCompute) ComputeDisks() error { +func (s *mqlAzureSubscriptionComputeService) ComputeDisks() error { var err error if _, ok := s.Cache.Load("disks"); ok { return nil @@ -2962,8 +4017,8 @@ func (s *mqlAzureCompute) ComputeDisks() error { return nil } -// AzureComputeVm resource interface -type AzureComputeVm interface { +// AzureSubscriptionComputeServiceVm resource interface +type AzureSubscriptionComputeServiceVm interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -2976,25 +4031,25 @@ type AzureComputeVm interface { Type() (string, error) Properties() (interface{}, error) Extensions() ([]interface{}, error) - OsDisk() (AzureComputeDisk, error) + OsDisk() (AzureSubscriptionComputeServiceDisk, error) DataDisks() ([]interface{}, error) } -// mqlAzureComputeVm for the azure.compute.vm resource -type mqlAzureComputeVm struct { +// mqlAzureSubscriptionComputeServiceVm for the azure.subscription.computeService.vm resource +type mqlAzureSubscriptionComputeServiceVm struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureComputeVm) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionComputeServiceVm) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.compute.vm resource -func newAzureComputeVm(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.computeService.vm resource +func newAzureSubscriptionComputeServiceVm(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureComputeVm{runtime.NewResource("azure.compute.vm")} + res := mqlAzureSubscriptionComputeServiceVm{runtime.NewResource("azure.subscription.computeService.vm")} // assign all named fields var id string @@ -3008,48 +4063,48 @@ func newAzureComputeVm(runtime *resources.Runtime, args *resources.Args) (interf switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.compute.vm\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.computeService.vm\", its \"id\" argument has the wrong type (expected type \"string\")") } case "name": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.compute.vm\", its \"name\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.computeService.vm\", its \"name\" argument has the wrong type (expected type \"string\")") } case "location": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.compute.vm\", its \"location\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.computeService.vm\", its \"location\" argument has the wrong type (expected type \"string\")") } case "tags": if _, ok := val.(map[string]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.compute.vm\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.computeService.vm\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") } case "type": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.compute.vm\", its \"type\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.computeService.vm\", its \"type\" argument has the wrong type (expected type \"string\")") } case "properties": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.compute.vm\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.computeService.vm\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") } case "extensions": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.compute.vm\", its \"extensions\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.computeService.vm\", its \"extensions\" argument has the wrong type (expected type \"[]interface{}\")") } case "osDisk": - if _, ok := val.(AzureComputeDisk); !ok { - return nil, errors.New("Failed to initialize \"azure.compute.vm\", its \"osDisk\" argument has the wrong type (expected type \"AzureComputeDisk\")") + if _, ok := val.(AzureSubscriptionComputeServiceDisk); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription.computeService.vm\", its \"osDisk\" argument has the wrong type (expected type \"AzureSubscriptionComputeServiceDisk\")") } case "dataDisks": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.compute.vm\", its \"dataDisks\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.computeService.vm\", its \"dataDisks\" argument has the wrong type (expected type \"[]interface{}\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.compute.vm\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.computeService.vm\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.compute.vm with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.computeService.vm with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -3067,33 +4122,33 @@ func newAzureComputeVm(runtime *resources.Runtime, args *resources.Args) (interf return &res, nil } -func (s *mqlAzureComputeVm) Validate() error { +func (s *mqlAzureSubscriptionComputeServiceVm) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.compute.vm\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.computeService.vm\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("name"); !ok { - return errors.New("Initialized \"azure.compute.vm\" resource without a \"name\". This field is required.") + return errors.New("Initialized \"azure.subscription.computeService.vm\" resource without a \"name\". This field is required.") } if _, ok := s.Cache.Load("location"); !ok { - return errors.New("Initialized \"azure.compute.vm\" resource without a \"location\". This field is required.") + return errors.New("Initialized \"azure.subscription.computeService.vm\" resource without a \"location\". This field is required.") } if _, ok := s.Cache.Load("tags"); !ok { - return errors.New("Initialized \"azure.compute.vm\" resource without a \"tags\". This field is required.") + return errors.New("Initialized \"azure.subscription.computeService.vm\" resource without a \"tags\". This field is required.") } if _, ok := s.Cache.Load("type"); !ok { - return errors.New("Initialized \"azure.compute.vm\" resource without a \"type\". This field is required.") + return errors.New("Initialized \"azure.subscription.computeService.vm\" resource without a \"type\". This field is required.") } if _, ok := s.Cache.Load("properties"); !ok { - return errors.New("Initialized \"azure.compute.vm\" resource without a \"properties\". This field is required.") + return errors.New("Initialized \"azure.subscription.computeService.vm\" resource without a \"properties\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureComputeVm) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.compute.vm].Register") +func (s *mqlAzureSubscriptionComputeServiceVm) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.computeService.vm].Register") switch name { case "id": return nil @@ -3114,13 +4169,13 @@ func (s *mqlAzureComputeVm) Register(name string) error { case "dataDisks": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.compute.vm\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.computeService.vm\" resource") } } // Field accessor autogenerated -func (s *mqlAzureComputeVm) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.compute.vm].Field") +func (s *mqlAzureSubscriptionComputeServiceVm) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.computeService.vm].Field") switch name { case "id": return s.Id() @@ -3141,108 +4196,108 @@ func (s *mqlAzureComputeVm) Field(name string) (interface{}, error) { case "dataDisks": return s.DataDisks() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.compute.vm\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.computeService.vm\" resource") } } // Id accessor autogenerated -func (s *mqlAzureComputeVm) Id() (string, error) { +func (s *mqlAzureSubscriptionComputeServiceVm) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.compute.vm\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.computeService.vm\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.compute.vm\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.computeService.vm\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Name accessor autogenerated -func (s *mqlAzureComputeVm) Name() (string, error) { +func (s *mqlAzureSubscriptionComputeServiceVm) Name() (string, error) { res, ok := s.Cache.Load("name") if !ok || !res.Valid { - return "", errors.New("\"azure.compute.vm\" failed: no value provided for static field \"name\"") + return "", errors.New("\"azure.subscription.computeService.vm\" failed: no value provided for static field \"name\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.compute.vm\" failed to cast field \"name\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.computeService.vm\" failed to cast field \"name\" to the right type (string): %#v", res) } return tres, nil } // Location accessor autogenerated -func (s *mqlAzureComputeVm) Location() (string, error) { +func (s *mqlAzureSubscriptionComputeServiceVm) Location() (string, error) { res, ok := s.Cache.Load("location") if !ok || !res.Valid { - return "", errors.New("\"azure.compute.vm\" failed: no value provided for static field \"location\"") + return "", errors.New("\"azure.subscription.computeService.vm\" failed: no value provided for static field \"location\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.compute.vm\" failed to cast field \"location\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.computeService.vm\" failed to cast field \"location\" to the right type (string): %#v", res) } return tres, nil } // Tags accessor autogenerated -func (s *mqlAzureComputeVm) Tags() (map[string]interface{}, error) { +func (s *mqlAzureSubscriptionComputeServiceVm) Tags() (map[string]interface{}, error) { res, ok := s.Cache.Load("tags") if !ok || !res.Valid { - return nil, errors.New("\"azure.compute.vm\" failed: no value provided for static field \"tags\"") + return nil, errors.New("\"azure.subscription.computeService.vm\" failed: no value provided for static field \"tags\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(map[string]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.compute.vm\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.computeService.vm\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) } return tres, nil } // Type accessor autogenerated -func (s *mqlAzureComputeVm) Type() (string, error) { +func (s *mqlAzureSubscriptionComputeServiceVm) Type() (string, error) { res, ok := s.Cache.Load("type") if !ok || !res.Valid { - return "", errors.New("\"azure.compute.vm\" failed: no value provided for static field \"type\"") + return "", errors.New("\"azure.subscription.computeService.vm\" failed: no value provided for static field \"type\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.compute.vm\" failed to cast field \"type\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.computeService.vm\" failed to cast field \"type\" to the right type (string): %#v", res) } return tres, nil } // Properties accessor autogenerated -func (s *mqlAzureComputeVm) Properties() (interface{}, error) { +func (s *mqlAzureSubscriptionComputeServiceVm) Properties() (interface{}, error) { res, ok := s.Cache.Load("properties") if !ok || !res.Valid { - return nil, errors.New("\"azure.compute.vm\" failed: no value provided for static field \"properties\"") + return nil, errors.New("\"azure.subscription.computeService.vm\" failed: no value provided for static field \"properties\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.compute.vm\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.computeService.vm\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) } return tres, nil } // Extensions accessor autogenerated -func (s *mqlAzureComputeVm) Extensions() ([]interface{}, error) { +func (s *mqlAzureSubscriptionComputeServiceVm) Extensions() ([]interface{}, error) { res, ok := s.Cache.Load("extensions") if !ok || !res.Valid { if err := s.ComputeExtensions(); err != nil { @@ -3250,7 +4305,7 @@ func (s *mqlAzureComputeVm) Extensions() ([]interface{}, error) { } res, ok = s.Cache.Load("extensions") if !ok { - return nil, errors.New("\"azure.compute.vm\" calculated \"extensions\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.computeService.vm\" calculated \"extensions\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "extensions") } @@ -3259,13 +4314,13 @@ func (s *mqlAzureComputeVm) Extensions() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.compute.vm\" failed to cast field \"extensions\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.computeService.vm\" failed to cast field \"extensions\" to the right type ([]interface{}): %#v", res) } return tres, nil } // OsDisk accessor autogenerated -func (s *mqlAzureComputeVm) OsDisk() (AzureComputeDisk, error) { +func (s *mqlAzureSubscriptionComputeServiceVm) OsDisk() (AzureSubscriptionComputeServiceDisk, error) { res, ok := s.Cache.Load("osDisk") if !ok || !res.Valid { if err := s.ComputeOsDisk(); err != nil { @@ -3273,22 +4328,22 @@ func (s *mqlAzureComputeVm) OsDisk() (AzureComputeDisk, error) { } res, ok = s.Cache.Load("osDisk") if !ok { - return nil, errors.New("\"azure.compute.vm\" calculated \"osDisk\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.computeService.vm\" calculated \"osDisk\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "osDisk") } if res.Error != nil { return nil, res.Error } - tres, ok := res.Data.(AzureComputeDisk) + tres, ok := res.Data.(AzureSubscriptionComputeServiceDisk) if !ok { - return nil, fmt.Errorf("\"azure.compute.vm\" failed to cast field \"osDisk\" to the right type (AzureComputeDisk): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.computeService.vm\" failed to cast field \"osDisk\" to the right type (AzureSubscriptionComputeServiceDisk): %#v", res) } return tres, nil } // DataDisks accessor autogenerated -func (s *mqlAzureComputeVm) DataDisks() ([]interface{}, error) { +func (s *mqlAzureSubscriptionComputeServiceVm) DataDisks() ([]interface{}, error) { res, ok := s.Cache.Load("dataDisks") if !ok || !res.Valid { if err := s.ComputeDataDisks(); err != nil { @@ -3296,7 +4351,7 @@ func (s *mqlAzureComputeVm) DataDisks() ([]interface{}, error) { } res, ok = s.Cache.Load("dataDisks") if !ok { - return nil, errors.New("\"azure.compute.vm\" calculated \"dataDisks\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.computeService.vm\" calculated \"dataDisks\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "dataDisks") } @@ -3305,14 +4360,14 @@ func (s *mqlAzureComputeVm) DataDisks() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.compute.vm\" failed to cast field \"dataDisks\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.computeService.vm\" failed to cast field \"dataDisks\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureComputeVm) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.compute.vm].MqlCompute") +func (s *mqlAzureSubscriptionComputeServiceVm) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.computeService.vm].MqlCompute") switch name { case "id": return nil @@ -3333,12 +4388,12 @@ func (s *mqlAzureComputeVm) MqlCompute(name string) error { case "dataDisks": return s.ComputeDataDisks() default: - return errors.New("Cannot find field '" + name + "' in \"azure.compute.vm\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.computeService.vm\" resource") } } // ComputeExtensions computer autogenerated -func (s *mqlAzureComputeVm) ComputeExtensions() error { +func (s *mqlAzureSubscriptionComputeServiceVm) ComputeExtensions() error { var err error if _, ok := s.Cache.Load("extensions"); ok { return nil @@ -3352,7 +4407,7 @@ func (s *mqlAzureComputeVm) ComputeExtensions() error { } // ComputeOsDisk computer autogenerated -func (s *mqlAzureComputeVm) ComputeOsDisk() error { +func (s *mqlAzureSubscriptionComputeServiceVm) ComputeOsDisk() error { var err error if _, ok := s.Cache.Load("osDisk"); ok { return nil @@ -3366,7 +4421,7 @@ func (s *mqlAzureComputeVm) ComputeOsDisk() error { } // ComputeDataDisks computer autogenerated -func (s *mqlAzureComputeVm) ComputeDataDisks() error { +func (s *mqlAzureSubscriptionComputeServiceVm) ComputeDataDisks() error { var err error if _, ok := s.Cache.Load("dataDisks"); ok { return nil @@ -3379,8 +4434,8 @@ func (s *mqlAzureComputeVm) ComputeDataDisks() error { return nil } -// AzureComputeDisk resource interface -type AzureComputeDisk interface { +// AzureSubscriptionComputeServiceDisk resource interface +type AzureSubscriptionComputeServiceDisk interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -3398,21 +4453,21 @@ type AzureComputeDisk interface { Properties() (interface{}, error) } -// mqlAzureComputeDisk for the azure.compute.disk resource -type mqlAzureComputeDisk struct { +// mqlAzureSubscriptionComputeServiceDisk for the azure.subscription.computeService.disk resource +type mqlAzureSubscriptionComputeServiceDisk struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureComputeDisk) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionComputeServiceDisk) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.compute.disk resource -func newAzureComputeDisk(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.computeService.disk resource +func newAzureSubscriptionComputeServiceDisk(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureComputeDisk{runtime.NewResource("azure.compute.disk")} + res := mqlAzureSubscriptionComputeServiceDisk{runtime.NewResource("azure.subscription.computeService.disk")} // assign all named fields var id string @@ -3426,52 +4481,52 @@ func newAzureComputeDisk(runtime *resources.Runtime, args *resources.Args) (inte switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.compute.disk\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.computeService.disk\", its \"id\" argument has the wrong type (expected type \"string\")") } case "name": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.compute.disk\", its \"name\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.computeService.disk\", its \"name\" argument has the wrong type (expected type \"string\")") } case "location": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.compute.disk\", its \"location\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.computeService.disk\", its \"location\" argument has the wrong type (expected type \"string\")") } case "tags": if _, ok := val.(map[string]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.compute.disk\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.computeService.disk\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") } case "type": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.compute.disk\", its \"type\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.computeService.disk\", its \"type\" argument has the wrong type (expected type \"string\")") } case "managedBy": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.compute.disk\", its \"managedBy\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.computeService.disk\", its \"managedBy\" argument has the wrong type (expected type \"string\")") } case "managedByExtended": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.compute.disk\", its \"managedByExtended\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.computeService.disk\", its \"managedByExtended\" argument has the wrong type (expected type \"[]interface{}\")") } case "zones": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.compute.disk\", its \"zones\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.computeService.disk\", its \"zones\" argument has the wrong type (expected type \"[]interface{}\")") } case "sku": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.compute.disk\", its \"sku\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.computeService.disk\", its \"sku\" argument has the wrong type (expected type \"interface{}\")") } case "properties": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.compute.disk\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.computeService.disk\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.compute.disk\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.computeService.disk\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.compute.disk with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.computeService.disk with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -3489,45 +4544,45 @@ func newAzureComputeDisk(runtime *resources.Runtime, args *resources.Args) (inte return &res, nil } -func (s *mqlAzureComputeDisk) Validate() error { +func (s *mqlAzureSubscriptionComputeServiceDisk) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.compute.disk\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.computeService.disk\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("name"); !ok { - return errors.New("Initialized \"azure.compute.disk\" resource without a \"name\". This field is required.") + return errors.New("Initialized \"azure.subscription.computeService.disk\" resource without a \"name\". This field is required.") } if _, ok := s.Cache.Load("location"); !ok { - return errors.New("Initialized \"azure.compute.disk\" resource without a \"location\". This field is required.") + return errors.New("Initialized \"azure.subscription.computeService.disk\" resource without a \"location\". This field is required.") } if _, ok := s.Cache.Load("tags"); !ok { - return errors.New("Initialized \"azure.compute.disk\" resource without a \"tags\". This field is required.") + return errors.New("Initialized \"azure.subscription.computeService.disk\" resource without a \"tags\". This field is required.") } if _, ok := s.Cache.Load("type"); !ok { - return errors.New("Initialized \"azure.compute.disk\" resource without a \"type\". This field is required.") + return errors.New("Initialized \"azure.subscription.computeService.disk\" resource without a \"type\". This field is required.") } if _, ok := s.Cache.Load("managedBy"); !ok { - return errors.New("Initialized \"azure.compute.disk\" resource without a \"managedBy\". This field is required.") + return errors.New("Initialized \"azure.subscription.computeService.disk\" resource without a \"managedBy\". This field is required.") } if _, ok := s.Cache.Load("managedByExtended"); !ok { - return errors.New("Initialized \"azure.compute.disk\" resource without a \"managedByExtended\". This field is required.") + return errors.New("Initialized \"azure.subscription.computeService.disk\" resource without a \"managedByExtended\". This field is required.") } if _, ok := s.Cache.Load("zones"); !ok { - return errors.New("Initialized \"azure.compute.disk\" resource without a \"zones\". This field is required.") + return errors.New("Initialized \"azure.subscription.computeService.disk\" resource without a \"zones\". This field is required.") } if _, ok := s.Cache.Load("sku"); !ok { - return errors.New("Initialized \"azure.compute.disk\" resource without a \"sku\". This field is required.") + return errors.New("Initialized \"azure.subscription.computeService.disk\" resource without a \"sku\". This field is required.") } if _, ok := s.Cache.Load("properties"); !ok { - return errors.New("Initialized \"azure.compute.disk\" resource without a \"properties\". This field is required.") + return errors.New("Initialized \"azure.subscription.computeService.disk\" resource without a \"properties\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureComputeDisk) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.compute.disk].Register") +func (s *mqlAzureSubscriptionComputeServiceDisk) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.computeService.disk].Register") switch name { case "id": return nil @@ -3550,13 +4605,13 @@ func (s *mqlAzureComputeDisk) Register(name string) error { case "properties": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.compute.disk\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.computeService.disk\" resource") } } // Field accessor autogenerated -func (s *mqlAzureComputeDisk) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.compute.disk].Field") +func (s *mqlAzureSubscriptionComputeServiceDisk) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.computeService.disk].Field") switch name { case "id": return s.Id() @@ -3579,173 +4634,173 @@ func (s *mqlAzureComputeDisk) Field(name string) (interface{}, error) { case "properties": return s.Properties() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.compute.disk\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.computeService.disk\" resource") } } // Id accessor autogenerated -func (s *mqlAzureComputeDisk) Id() (string, error) { +func (s *mqlAzureSubscriptionComputeServiceDisk) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.compute.disk\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.computeService.disk\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.compute.disk\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.computeService.disk\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Name accessor autogenerated -func (s *mqlAzureComputeDisk) Name() (string, error) { +func (s *mqlAzureSubscriptionComputeServiceDisk) Name() (string, error) { res, ok := s.Cache.Load("name") if !ok || !res.Valid { - return "", errors.New("\"azure.compute.disk\" failed: no value provided for static field \"name\"") + return "", errors.New("\"azure.subscription.computeService.disk\" failed: no value provided for static field \"name\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.compute.disk\" failed to cast field \"name\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.computeService.disk\" failed to cast field \"name\" to the right type (string): %#v", res) } return tres, nil } // Location accessor autogenerated -func (s *mqlAzureComputeDisk) Location() (string, error) { +func (s *mqlAzureSubscriptionComputeServiceDisk) Location() (string, error) { res, ok := s.Cache.Load("location") if !ok || !res.Valid { - return "", errors.New("\"azure.compute.disk\" failed: no value provided for static field \"location\"") + return "", errors.New("\"azure.subscription.computeService.disk\" failed: no value provided for static field \"location\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.compute.disk\" failed to cast field \"location\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.computeService.disk\" failed to cast field \"location\" to the right type (string): %#v", res) } return tres, nil } // Tags accessor autogenerated -func (s *mqlAzureComputeDisk) Tags() (map[string]interface{}, error) { +func (s *mqlAzureSubscriptionComputeServiceDisk) Tags() (map[string]interface{}, error) { res, ok := s.Cache.Load("tags") if !ok || !res.Valid { - return nil, errors.New("\"azure.compute.disk\" failed: no value provided for static field \"tags\"") + return nil, errors.New("\"azure.subscription.computeService.disk\" failed: no value provided for static field \"tags\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(map[string]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.compute.disk\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.computeService.disk\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) } return tres, nil } // Type accessor autogenerated -func (s *mqlAzureComputeDisk) Type() (string, error) { +func (s *mqlAzureSubscriptionComputeServiceDisk) Type() (string, error) { res, ok := s.Cache.Load("type") if !ok || !res.Valid { - return "", errors.New("\"azure.compute.disk\" failed: no value provided for static field \"type\"") + return "", errors.New("\"azure.subscription.computeService.disk\" failed: no value provided for static field \"type\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.compute.disk\" failed to cast field \"type\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.computeService.disk\" failed to cast field \"type\" to the right type (string): %#v", res) } return tres, nil } // ManagedBy accessor autogenerated -func (s *mqlAzureComputeDisk) ManagedBy() (string, error) { +func (s *mqlAzureSubscriptionComputeServiceDisk) ManagedBy() (string, error) { res, ok := s.Cache.Load("managedBy") if !ok || !res.Valid { - return "", errors.New("\"azure.compute.disk\" failed: no value provided for static field \"managedBy\"") + return "", errors.New("\"azure.subscription.computeService.disk\" failed: no value provided for static field \"managedBy\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.compute.disk\" failed to cast field \"managedBy\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.computeService.disk\" failed to cast field \"managedBy\" to the right type (string): %#v", res) } return tres, nil } // ManagedByExtended accessor autogenerated -func (s *mqlAzureComputeDisk) ManagedByExtended() ([]interface{}, error) { +func (s *mqlAzureSubscriptionComputeServiceDisk) ManagedByExtended() ([]interface{}, error) { res, ok := s.Cache.Load("managedByExtended") if !ok || !res.Valid { - return nil, errors.New("\"azure.compute.disk\" failed: no value provided for static field \"managedByExtended\"") + return nil, errors.New("\"azure.subscription.computeService.disk\" failed: no value provided for static field \"managedByExtended\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.compute.disk\" failed to cast field \"managedByExtended\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.computeService.disk\" failed to cast field \"managedByExtended\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Zones accessor autogenerated -func (s *mqlAzureComputeDisk) Zones() ([]interface{}, error) { +func (s *mqlAzureSubscriptionComputeServiceDisk) Zones() ([]interface{}, error) { res, ok := s.Cache.Load("zones") if !ok || !res.Valid { - return nil, errors.New("\"azure.compute.disk\" failed: no value provided for static field \"zones\"") + return nil, errors.New("\"azure.subscription.computeService.disk\" failed: no value provided for static field \"zones\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.compute.disk\" failed to cast field \"zones\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.computeService.disk\" failed to cast field \"zones\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Sku accessor autogenerated -func (s *mqlAzureComputeDisk) Sku() (interface{}, error) { +func (s *mqlAzureSubscriptionComputeServiceDisk) Sku() (interface{}, error) { res, ok := s.Cache.Load("sku") if !ok || !res.Valid { - return nil, errors.New("\"azure.compute.disk\" failed: no value provided for static field \"sku\"") + return nil, errors.New("\"azure.subscription.computeService.disk\" failed: no value provided for static field \"sku\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.compute.disk\" failed to cast field \"sku\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.computeService.disk\" failed to cast field \"sku\" to the right type (interface{}): %#v", res) } return tres, nil } // Properties accessor autogenerated -func (s *mqlAzureComputeDisk) Properties() (interface{}, error) { +func (s *mqlAzureSubscriptionComputeServiceDisk) Properties() (interface{}, error) { res, ok := s.Cache.Load("properties") if !ok || !res.Valid { - return nil, errors.New("\"azure.compute.disk\" failed: no value provided for static field \"properties\"") + return nil, errors.New("\"azure.subscription.computeService.disk\" failed: no value provided for static field \"properties\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.compute.disk\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.computeService.disk\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureComputeDisk) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.compute.disk].MqlCompute") +func (s *mqlAzureSubscriptionComputeServiceDisk) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.computeService.disk].MqlCompute") switch name { case "id": return nil @@ -3768,37 +4823,47 @@ func (s *mqlAzureComputeDisk) MqlCompute(name string) error { case "properties": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.compute.disk\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.computeService.disk\" resource") } } -// AzureNetwork resource interface -type AzureNetwork interface { +// AzureSubscriptionNetworkService resource interface +type AzureSubscriptionNetworkService interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) Register(string) error Validate() error + SubscriptionId() (string, error) Interfaces() ([]interface{}, error) SecurityGroups() ([]interface{}, error) Watchers() ([]interface{}, error) } -// mqlAzureNetwork for the azure.network resource -type mqlAzureNetwork struct { +// mqlAzureSubscriptionNetworkService for the azure.subscription.networkService resource +type mqlAzureSubscriptionNetworkService struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureNetwork) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionNetworkService) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.network resource -func newAzureNetwork(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.networkService resource +func newAzureSubscriptionNetworkService(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureNetwork{runtime.NewResource("azure.network")} + res := mqlAzureSubscriptionNetworkService{runtime.NewResource("azure.subscription.networkService")} + var existing AzureSubscriptionNetworkService + args, existing, err = res.init(args) + if err != nil { + return nil, err + } + if existing != nil { + return existing, nil + } + // assign all named fields var id string @@ -3810,26 +4875,30 @@ func newAzureNetwork(runtime *resources.Runtime, args *resources.Args) (interfac } switch name { + case "subscriptionId": + if _, ok := val.(string); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription.networkService\", its \"subscriptionId\" argument has the wrong type (expected type \"string\")") + } case "interfaces": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.network\", its \"interfaces\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService\", its \"interfaces\" argument has the wrong type (expected type \"[]interface{}\")") } case "securityGroups": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.network\", its \"securityGroups\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService\", its \"securityGroups\" argument has the wrong type (expected type \"[]interface{}\")") } case "watchers": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.network\", its \"watchers\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService\", its \"watchers\" argument has the wrong type (expected type \"[]interface{}\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.network\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.network with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.networkService with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -3847,17 +4916,21 @@ func newAzureNetwork(runtime *resources.Runtime, args *resources.Args) (interfac return &res, nil } -func (s *mqlAzureNetwork) Validate() error { +func (s *mqlAzureSubscriptionNetworkService) Validate() error { // required arguments - // no required fields found + if _, ok := s.Cache.Load("subscriptionId"); !ok { + return errors.New("Initialized \"azure.subscription.networkService\" resource without a \"subscriptionId\". This field is required.") + } return nil } // Register accessor autogenerated -func (s *mqlAzureNetwork) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.network].Register") +func (s *mqlAzureSubscriptionNetworkService) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.networkService].Register") switch name { + case "subscriptionId": + return nil case "interfaces": return nil case "securityGroups": @@ -3865,14 +4938,16 @@ func (s *mqlAzureNetwork) Register(name string) error { case "watchers": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.network\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.networkService\" resource") } } // Field accessor autogenerated -func (s *mqlAzureNetwork) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.network].Field") +func (s *mqlAzureSubscriptionNetworkService) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.networkService].Field") switch name { + case "subscriptionId": + return s.SubscriptionId() case "interfaces": return s.Interfaces() case "securityGroups": @@ -3880,12 +4955,28 @@ func (s *mqlAzureNetwork) Field(name string) (interface{}, error) { case "watchers": return s.Watchers() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.network\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.networkService\" resource") + } +} + +// SubscriptionId accessor autogenerated +func (s *mqlAzureSubscriptionNetworkService) SubscriptionId() (string, error) { + res, ok := s.Cache.Load("subscriptionId") + if !ok || !res.Valid { + return "", errors.New("\"azure.subscription.networkService\" failed: no value provided for static field \"subscriptionId\"") + } + if res.Error != nil { + return "", res.Error + } + tres, ok := res.Data.(string) + if !ok { + return "", fmt.Errorf("\"azure.subscription.networkService\" failed to cast field \"subscriptionId\" to the right type (string): %#v", res) } + return tres, nil } // Interfaces accessor autogenerated -func (s *mqlAzureNetwork) Interfaces() ([]interface{}, error) { +func (s *mqlAzureSubscriptionNetworkService) Interfaces() ([]interface{}, error) { res, ok := s.Cache.Load("interfaces") if !ok || !res.Valid { if err := s.ComputeInterfaces(); err != nil { @@ -3893,7 +4984,7 @@ func (s *mqlAzureNetwork) Interfaces() ([]interface{}, error) { } res, ok = s.Cache.Load("interfaces") if !ok { - return nil, errors.New("\"azure.network\" calculated \"interfaces\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.networkService\" calculated \"interfaces\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "interfaces") } @@ -3902,13 +4993,13 @@ func (s *mqlAzureNetwork) Interfaces() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.network\" failed to cast field \"interfaces\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.networkService\" failed to cast field \"interfaces\" to the right type ([]interface{}): %#v", res) } return tres, nil } // SecurityGroups accessor autogenerated -func (s *mqlAzureNetwork) SecurityGroups() ([]interface{}, error) { +func (s *mqlAzureSubscriptionNetworkService) SecurityGroups() ([]interface{}, error) { res, ok := s.Cache.Load("securityGroups") if !ok || !res.Valid { if err := s.ComputeSecurityGroups(); err != nil { @@ -3916,7 +5007,7 @@ func (s *mqlAzureNetwork) SecurityGroups() ([]interface{}, error) { } res, ok = s.Cache.Load("securityGroups") if !ok { - return nil, errors.New("\"azure.network\" calculated \"securityGroups\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.networkService\" calculated \"securityGroups\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "securityGroups") } @@ -3925,13 +5016,13 @@ func (s *mqlAzureNetwork) SecurityGroups() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.network\" failed to cast field \"securityGroups\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.networkService\" failed to cast field \"securityGroups\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Watchers accessor autogenerated -func (s *mqlAzureNetwork) Watchers() ([]interface{}, error) { +func (s *mqlAzureSubscriptionNetworkService) Watchers() ([]interface{}, error) { res, ok := s.Cache.Load("watchers") if !ok || !res.Valid { if err := s.ComputeWatchers(); err != nil { @@ -3939,7 +5030,7 @@ func (s *mqlAzureNetwork) Watchers() ([]interface{}, error) { } res, ok = s.Cache.Load("watchers") if !ok { - return nil, errors.New("\"azure.network\" calculated \"watchers\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.networkService\" calculated \"watchers\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "watchers") } @@ -3948,15 +5039,17 @@ func (s *mqlAzureNetwork) Watchers() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.network\" failed to cast field \"watchers\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.networkService\" failed to cast field \"watchers\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureNetwork) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.network].MqlCompute") +func (s *mqlAzureSubscriptionNetworkService) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.networkService].MqlCompute") switch name { + case "subscriptionId": + return nil case "interfaces": return s.ComputeInterfaces() case "securityGroups": @@ -3964,12 +5057,12 @@ func (s *mqlAzureNetwork) MqlCompute(name string) error { case "watchers": return s.ComputeWatchers() default: - return errors.New("Cannot find field '" + name + "' in \"azure.network\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.networkService\" resource") } } // ComputeInterfaces computer autogenerated -func (s *mqlAzureNetwork) ComputeInterfaces() error { +func (s *mqlAzureSubscriptionNetworkService) ComputeInterfaces() error { var err error if _, ok := s.Cache.Load("interfaces"); ok { return nil @@ -3983,7 +5076,7 @@ func (s *mqlAzureNetwork) ComputeInterfaces() error { } // ComputeSecurityGroups computer autogenerated -func (s *mqlAzureNetwork) ComputeSecurityGroups() error { +func (s *mqlAzureSubscriptionNetworkService) ComputeSecurityGroups() error { var err error if _, ok := s.Cache.Load("securityGroups"); ok { return nil @@ -3997,7 +5090,7 @@ func (s *mqlAzureNetwork) ComputeSecurityGroups() error { } // ComputeWatchers computer autogenerated -func (s *mqlAzureNetwork) ComputeWatchers() error { +func (s *mqlAzureSubscriptionNetworkService) ComputeWatchers() error { var err error if _, ok := s.Cache.Load("watchers"); ok { return nil @@ -4010,8 +5103,8 @@ func (s *mqlAzureNetwork) ComputeWatchers() error { return nil } -// AzureNetworkInterface resource interface -type AzureNetworkInterface interface { +// AzureSubscriptionNetworkServiceInterface resource interface +type AzureSubscriptionNetworkServiceInterface interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -4024,24 +5117,24 @@ type AzureNetworkInterface interface { Type() (string, error) Etag() (string, error) Properties() (interface{}, error) - Vm() (AzureComputeVm, error) + Vm() (AzureSubscriptionComputeServiceVm, error) } -// mqlAzureNetworkInterface for the azure.network.interface resource -type mqlAzureNetworkInterface struct { +// mqlAzureSubscriptionNetworkServiceInterface for the azure.subscription.networkService.interface resource +type mqlAzureSubscriptionNetworkServiceInterface struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureNetworkInterface) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionNetworkServiceInterface) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.network.interface resource -func newAzureNetworkInterface(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.networkService.interface resource +func newAzureSubscriptionNetworkServiceInterface(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureNetworkInterface{runtime.NewResource("azure.network.interface")} + res := mqlAzureSubscriptionNetworkServiceInterface{runtime.NewResource("azure.subscription.networkService.interface")} // assign all named fields var id string @@ -4055,44 +5148,44 @@ func newAzureNetworkInterface(runtime *resources.Runtime, args *resources.Args) switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.network.interface\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.interface\", its \"id\" argument has the wrong type (expected type \"string\")") } case "name": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.network.interface\", its \"name\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.interface\", its \"name\" argument has the wrong type (expected type \"string\")") } case "location": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.network.interface\", its \"location\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.interface\", its \"location\" argument has the wrong type (expected type \"string\")") } case "tags": if _, ok := val.(map[string]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.network.interface\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.interface\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") } case "type": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.network.interface\", its \"type\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.interface\", its \"type\" argument has the wrong type (expected type \"string\")") } case "etag": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.network.interface\", its \"etag\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.interface\", its \"etag\" argument has the wrong type (expected type \"string\")") } case "properties": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.network.interface\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.interface\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") } case "vm": - if _, ok := val.(AzureComputeVm); !ok { - return nil, errors.New("Failed to initialize \"azure.network.interface\", its \"vm\" argument has the wrong type (expected type \"AzureComputeVm\")") + if _, ok := val.(AzureSubscriptionComputeServiceVm); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.interface\", its \"vm\" argument has the wrong type (expected type \"AzureSubscriptionComputeServiceVm\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.network.interface\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.interface\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.network.interface with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.networkService.interface with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -4110,36 +5203,36 @@ func newAzureNetworkInterface(runtime *resources.Runtime, args *resources.Args) return &res, nil } -func (s *mqlAzureNetworkInterface) Validate() error { +func (s *mqlAzureSubscriptionNetworkServiceInterface) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.network.interface\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.interface\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("name"); !ok { - return errors.New("Initialized \"azure.network.interface\" resource without a \"name\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.interface\" resource without a \"name\". This field is required.") } if _, ok := s.Cache.Load("location"); !ok { - return errors.New("Initialized \"azure.network.interface\" resource without a \"location\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.interface\" resource without a \"location\". This field is required.") } if _, ok := s.Cache.Load("tags"); !ok { - return errors.New("Initialized \"azure.network.interface\" resource without a \"tags\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.interface\" resource without a \"tags\". This field is required.") } if _, ok := s.Cache.Load("type"); !ok { - return errors.New("Initialized \"azure.network.interface\" resource without a \"type\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.interface\" resource without a \"type\". This field is required.") } if _, ok := s.Cache.Load("etag"); !ok { - return errors.New("Initialized \"azure.network.interface\" resource without a \"etag\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.interface\" resource without a \"etag\". This field is required.") } if _, ok := s.Cache.Load("properties"); !ok { - return errors.New("Initialized \"azure.network.interface\" resource without a \"properties\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.interface\" resource without a \"properties\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureNetworkInterface) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.network.interface].Register") +func (s *mqlAzureSubscriptionNetworkServiceInterface) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.networkService.interface].Register") switch name { case "id": return nil @@ -4158,13 +5251,13 @@ func (s *mqlAzureNetworkInterface) Register(name string) error { case "vm": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.network.interface\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.networkService.interface\" resource") } } // Field accessor autogenerated -func (s *mqlAzureNetworkInterface) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.network.interface].Field") +func (s *mqlAzureSubscriptionNetworkServiceInterface) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.networkService.interface].Field") switch name { case "id": return s.Id() @@ -4183,124 +5276,124 @@ func (s *mqlAzureNetworkInterface) Field(name string) (interface{}, error) { case "vm": return s.Vm() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.network.interface\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.networkService.interface\" resource") } } // Id accessor autogenerated -func (s *mqlAzureNetworkInterface) Id() (string, error) { +func (s *mqlAzureSubscriptionNetworkServiceInterface) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.network.interface\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.networkService.interface\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.network.interface\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.networkService.interface\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Name accessor autogenerated -func (s *mqlAzureNetworkInterface) Name() (string, error) { +func (s *mqlAzureSubscriptionNetworkServiceInterface) Name() (string, error) { res, ok := s.Cache.Load("name") if !ok || !res.Valid { - return "", errors.New("\"azure.network.interface\" failed: no value provided for static field \"name\"") + return "", errors.New("\"azure.subscription.networkService.interface\" failed: no value provided for static field \"name\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.network.interface\" failed to cast field \"name\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.networkService.interface\" failed to cast field \"name\" to the right type (string): %#v", res) } return tres, nil } // Location accessor autogenerated -func (s *mqlAzureNetworkInterface) Location() (string, error) { +func (s *mqlAzureSubscriptionNetworkServiceInterface) Location() (string, error) { res, ok := s.Cache.Load("location") if !ok || !res.Valid { - return "", errors.New("\"azure.network.interface\" failed: no value provided for static field \"location\"") + return "", errors.New("\"azure.subscription.networkService.interface\" failed: no value provided for static field \"location\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.network.interface\" failed to cast field \"location\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.networkService.interface\" failed to cast field \"location\" to the right type (string): %#v", res) } return tres, nil } // Tags accessor autogenerated -func (s *mqlAzureNetworkInterface) Tags() (map[string]interface{}, error) { +func (s *mqlAzureSubscriptionNetworkServiceInterface) Tags() (map[string]interface{}, error) { res, ok := s.Cache.Load("tags") if !ok || !res.Valid { - return nil, errors.New("\"azure.network.interface\" failed: no value provided for static field \"tags\"") + return nil, errors.New("\"azure.subscription.networkService.interface\" failed: no value provided for static field \"tags\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(map[string]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.network.interface\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.networkService.interface\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) } return tres, nil } // Type accessor autogenerated -func (s *mqlAzureNetworkInterface) Type() (string, error) { +func (s *mqlAzureSubscriptionNetworkServiceInterface) Type() (string, error) { res, ok := s.Cache.Load("type") if !ok || !res.Valid { - return "", errors.New("\"azure.network.interface\" failed: no value provided for static field \"type\"") + return "", errors.New("\"azure.subscription.networkService.interface\" failed: no value provided for static field \"type\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.network.interface\" failed to cast field \"type\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.networkService.interface\" failed to cast field \"type\" to the right type (string): %#v", res) } return tres, nil } // Etag accessor autogenerated -func (s *mqlAzureNetworkInterface) Etag() (string, error) { +func (s *mqlAzureSubscriptionNetworkServiceInterface) Etag() (string, error) { res, ok := s.Cache.Load("etag") if !ok || !res.Valid { - return "", errors.New("\"azure.network.interface\" failed: no value provided for static field \"etag\"") + return "", errors.New("\"azure.subscription.networkService.interface\" failed: no value provided for static field \"etag\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.network.interface\" failed to cast field \"etag\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.networkService.interface\" failed to cast field \"etag\" to the right type (string): %#v", res) } return tres, nil } // Properties accessor autogenerated -func (s *mqlAzureNetworkInterface) Properties() (interface{}, error) { +func (s *mqlAzureSubscriptionNetworkServiceInterface) Properties() (interface{}, error) { res, ok := s.Cache.Load("properties") if !ok || !res.Valid { - return nil, errors.New("\"azure.network.interface\" failed: no value provided for static field \"properties\"") + return nil, errors.New("\"azure.subscription.networkService.interface\" failed: no value provided for static field \"properties\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.network.interface\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.networkService.interface\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) } return tres, nil } // Vm accessor autogenerated -func (s *mqlAzureNetworkInterface) Vm() (AzureComputeVm, error) { +func (s *mqlAzureSubscriptionNetworkServiceInterface) Vm() (AzureSubscriptionComputeServiceVm, error) { res, ok := s.Cache.Load("vm") if !ok || !res.Valid { if err := s.ComputeVm(); err != nil { @@ -4308,23 +5401,23 @@ func (s *mqlAzureNetworkInterface) Vm() (AzureComputeVm, error) { } res, ok = s.Cache.Load("vm") if !ok { - return nil, errors.New("\"azure.network.interface\" calculated \"vm\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.networkService.interface\" calculated \"vm\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "vm") } if res.Error != nil { return nil, res.Error } - tres, ok := res.Data.(AzureComputeVm) + tres, ok := res.Data.(AzureSubscriptionComputeServiceVm) if !ok { - return nil, fmt.Errorf("\"azure.network.interface\" failed to cast field \"vm\" to the right type (AzureComputeVm): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.networkService.interface\" failed to cast field \"vm\" to the right type (AzureSubscriptionComputeServiceVm): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureNetworkInterface) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.network.interface].MqlCompute") +func (s *mqlAzureSubscriptionNetworkServiceInterface) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.networkService.interface].MqlCompute") switch name { case "id": return nil @@ -4343,12 +5436,12 @@ func (s *mqlAzureNetworkInterface) MqlCompute(name string) error { case "vm": return s.ComputeVm() default: - return errors.New("Cannot find field '" + name + "' in \"azure.network.interface\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.networkService.interface\" resource") } } // ComputeVm computer autogenerated -func (s *mqlAzureNetworkInterface) ComputeVm() error { +func (s *mqlAzureSubscriptionNetworkServiceInterface) ComputeVm() error { var err error if _, ok := s.Cache.Load("vm"); ok { return nil @@ -4361,8 +5454,8 @@ func (s *mqlAzureNetworkInterface) ComputeVm() error { return nil } -// AzureNetworkSecuritygroup resource interface -type AzureNetworkSecuritygroup interface { +// AzureSubscriptionNetworkServiceSecurityGroup resource interface +type AzureSubscriptionNetworkServiceSecurityGroup interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -4380,21 +5473,21 @@ type AzureNetworkSecuritygroup interface { DefaultSecurityRules() ([]interface{}, error) } -// mqlAzureNetworkSecuritygroup for the azure.network.securitygroup resource -type mqlAzureNetworkSecuritygroup struct { +// mqlAzureSubscriptionNetworkServiceSecurityGroup for the azure.subscription.networkService.securityGroup resource +type mqlAzureSubscriptionNetworkServiceSecurityGroup struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureNetworkSecuritygroup) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionNetworkServiceSecurityGroup) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.network.securitygroup resource -func newAzureNetworkSecuritygroup(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.networkService.securityGroup resource +func newAzureSubscriptionNetworkServiceSecurityGroup(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureNetworkSecuritygroup{runtime.NewResource("azure.network.securitygroup")} + res := mqlAzureSubscriptionNetworkServiceSecurityGroup{runtime.NewResource("azure.subscription.networkService.securityGroup")} // assign all named fields var id string @@ -4408,52 +5501,52 @@ func newAzureNetworkSecuritygroup(runtime *resources.Runtime, args *resources.Ar switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.network.securitygroup\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.securityGroup\", its \"id\" argument has the wrong type (expected type \"string\")") } case "name": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.network.securitygroup\", its \"name\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.securityGroup\", its \"name\" argument has the wrong type (expected type \"string\")") } case "location": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.network.securitygroup\", its \"location\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.securityGroup\", its \"location\" argument has the wrong type (expected type \"string\")") } case "tags": if _, ok := val.(map[string]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.network.securitygroup\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.securityGroup\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") } case "type": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.network.securitygroup\", its \"type\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.securityGroup\", its \"type\" argument has the wrong type (expected type \"string\")") } case "etag": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.network.securitygroup\", its \"etag\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.securityGroup\", its \"etag\" argument has the wrong type (expected type \"string\")") } case "properties": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.network.securitygroup\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.securityGroup\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") } case "interfaces": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.network.securitygroup\", its \"interfaces\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.securityGroup\", its \"interfaces\" argument has the wrong type (expected type \"[]interface{}\")") } case "securityRules": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.network.securitygroup\", its \"securityRules\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.securityGroup\", its \"securityRules\" argument has the wrong type (expected type \"[]interface{}\")") } case "defaultSecurityRules": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.network.securitygroup\", its \"defaultSecurityRules\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.securityGroup\", its \"defaultSecurityRules\" argument has the wrong type (expected type \"[]interface{}\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.network.securitygroup\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.securityGroup\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.network.securitygroup with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.networkService.securityGroup with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -4471,45 +5564,45 @@ func newAzureNetworkSecuritygroup(runtime *resources.Runtime, args *resources.Ar return &res, nil } -func (s *mqlAzureNetworkSecuritygroup) Validate() error { +func (s *mqlAzureSubscriptionNetworkServiceSecurityGroup) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.network.securitygroup\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.securityGroup\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("name"); !ok { - return errors.New("Initialized \"azure.network.securitygroup\" resource without a \"name\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.securityGroup\" resource without a \"name\". This field is required.") } if _, ok := s.Cache.Load("location"); !ok { - return errors.New("Initialized \"azure.network.securitygroup\" resource without a \"location\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.securityGroup\" resource without a \"location\". This field is required.") } if _, ok := s.Cache.Load("tags"); !ok { - return errors.New("Initialized \"azure.network.securitygroup\" resource without a \"tags\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.securityGroup\" resource without a \"tags\". This field is required.") } if _, ok := s.Cache.Load("type"); !ok { - return errors.New("Initialized \"azure.network.securitygroup\" resource without a \"type\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.securityGroup\" resource without a \"type\". This field is required.") } if _, ok := s.Cache.Load("etag"); !ok { - return errors.New("Initialized \"azure.network.securitygroup\" resource without a \"etag\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.securityGroup\" resource without a \"etag\". This field is required.") } if _, ok := s.Cache.Load("properties"); !ok { - return errors.New("Initialized \"azure.network.securitygroup\" resource without a \"properties\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.securityGroup\" resource without a \"properties\". This field is required.") } if _, ok := s.Cache.Load("interfaces"); !ok { - return errors.New("Initialized \"azure.network.securitygroup\" resource without a \"interfaces\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.securityGroup\" resource without a \"interfaces\". This field is required.") } if _, ok := s.Cache.Load("securityRules"); !ok { - return errors.New("Initialized \"azure.network.securitygroup\" resource without a \"securityRules\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.securityGroup\" resource without a \"securityRules\". This field is required.") } if _, ok := s.Cache.Load("defaultSecurityRules"); !ok { - return errors.New("Initialized \"azure.network.securitygroup\" resource without a \"defaultSecurityRules\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.securityGroup\" resource without a \"defaultSecurityRules\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureNetworkSecuritygroup) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.network.securitygroup].Register") +func (s *mqlAzureSubscriptionNetworkServiceSecurityGroup) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.networkService.securityGroup].Register") switch name { case "id": return nil @@ -4532,13 +5625,13 @@ func (s *mqlAzureNetworkSecuritygroup) Register(name string) error { case "defaultSecurityRules": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.network.securitygroup\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.networkService.securityGroup\" resource") } } // Field accessor autogenerated -func (s *mqlAzureNetworkSecuritygroup) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.network.securitygroup].Field") +func (s *mqlAzureSubscriptionNetworkServiceSecurityGroup) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.networkService.securityGroup].Field") switch name { case "id": return s.Id() @@ -4561,173 +5654,173 @@ func (s *mqlAzureNetworkSecuritygroup) Field(name string) (interface{}, error) { case "defaultSecurityRules": return s.DefaultSecurityRules() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.network.securitygroup\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.networkService.securityGroup\" resource") } } // Id accessor autogenerated -func (s *mqlAzureNetworkSecuritygroup) Id() (string, error) { +func (s *mqlAzureSubscriptionNetworkServiceSecurityGroup) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.network.securitygroup\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.networkService.securityGroup\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.network.securitygroup\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.networkService.securityGroup\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Name accessor autogenerated -func (s *mqlAzureNetworkSecuritygroup) Name() (string, error) { +func (s *mqlAzureSubscriptionNetworkServiceSecurityGroup) Name() (string, error) { res, ok := s.Cache.Load("name") if !ok || !res.Valid { - return "", errors.New("\"azure.network.securitygroup\" failed: no value provided for static field \"name\"") + return "", errors.New("\"azure.subscription.networkService.securityGroup\" failed: no value provided for static field \"name\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.network.securitygroup\" failed to cast field \"name\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.networkService.securityGroup\" failed to cast field \"name\" to the right type (string): %#v", res) } return tres, nil } // Location accessor autogenerated -func (s *mqlAzureNetworkSecuritygroup) Location() (string, error) { +func (s *mqlAzureSubscriptionNetworkServiceSecurityGroup) Location() (string, error) { res, ok := s.Cache.Load("location") if !ok || !res.Valid { - return "", errors.New("\"azure.network.securitygroup\" failed: no value provided for static field \"location\"") + return "", errors.New("\"azure.subscription.networkService.securityGroup\" failed: no value provided for static field \"location\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.network.securitygroup\" failed to cast field \"location\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.networkService.securityGroup\" failed to cast field \"location\" to the right type (string): %#v", res) } return tres, nil } // Tags accessor autogenerated -func (s *mqlAzureNetworkSecuritygroup) Tags() (map[string]interface{}, error) { +func (s *mqlAzureSubscriptionNetworkServiceSecurityGroup) Tags() (map[string]interface{}, error) { res, ok := s.Cache.Load("tags") if !ok || !res.Valid { - return nil, errors.New("\"azure.network.securitygroup\" failed: no value provided for static field \"tags\"") + return nil, errors.New("\"azure.subscription.networkService.securityGroup\" failed: no value provided for static field \"tags\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(map[string]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.network.securitygroup\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.networkService.securityGroup\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) } return tres, nil } // Type accessor autogenerated -func (s *mqlAzureNetworkSecuritygroup) Type() (string, error) { +func (s *mqlAzureSubscriptionNetworkServiceSecurityGroup) Type() (string, error) { res, ok := s.Cache.Load("type") if !ok || !res.Valid { - return "", errors.New("\"azure.network.securitygroup\" failed: no value provided for static field \"type\"") + return "", errors.New("\"azure.subscription.networkService.securityGroup\" failed: no value provided for static field \"type\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.network.securitygroup\" failed to cast field \"type\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.networkService.securityGroup\" failed to cast field \"type\" to the right type (string): %#v", res) } return tres, nil } // Etag accessor autogenerated -func (s *mqlAzureNetworkSecuritygroup) Etag() (string, error) { +func (s *mqlAzureSubscriptionNetworkServiceSecurityGroup) Etag() (string, error) { res, ok := s.Cache.Load("etag") if !ok || !res.Valid { - return "", errors.New("\"azure.network.securitygroup\" failed: no value provided for static field \"etag\"") + return "", errors.New("\"azure.subscription.networkService.securityGroup\" failed: no value provided for static field \"etag\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.network.securitygroup\" failed to cast field \"etag\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.networkService.securityGroup\" failed to cast field \"etag\" to the right type (string): %#v", res) } return tres, nil } // Properties accessor autogenerated -func (s *mqlAzureNetworkSecuritygroup) Properties() (interface{}, error) { +func (s *mqlAzureSubscriptionNetworkServiceSecurityGroup) Properties() (interface{}, error) { res, ok := s.Cache.Load("properties") if !ok || !res.Valid { - return nil, errors.New("\"azure.network.securitygroup\" failed: no value provided for static field \"properties\"") + return nil, errors.New("\"azure.subscription.networkService.securityGroup\" failed: no value provided for static field \"properties\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.network.securitygroup\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.networkService.securityGroup\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) } return tres, nil } // Interfaces accessor autogenerated -func (s *mqlAzureNetworkSecuritygroup) Interfaces() ([]interface{}, error) { +func (s *mqlAzureSubscriptionNetworkServiceSecurityGroup) Interfaces() ([]interface{}, error) { res, ok := s.Cache.Load("interfaces") if !ok || !res.Valid { - return nil, errors.New("\"azure.network.securitygroup\" failed: no value provided for static field \"interfaces\"") + return nil, errors.New("\"azure.subscription.networkService.securityGroup\" failed: no value provided for static field \"interfaces\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.network.securitygroup\" failed to cast field \"interfaces\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.networkService.securityGroup\" failed to cast field \"interfaces\" to the right type ([]interface{}): %#v", res) } return tres, nil } // SecurityRules accessor autogenerated -func (s *mqlAzureNetworkSecuritygroup) SecurityRules() ([]interface{}, error) { +func (s *mqlAzureSubscriptionNetworkServiceSecurityGroup) SecurityRules() ([]interface{}, error) { res, ok := s.Cache.Load("securityRules") if !ok || !res.Valid { - return nil, errors.New("\"azure.network.securitygroup\" failed: no value provided for static field \"securityRules\"") + return nil, errors.New("\"azure.subscription.networkService.securityGroup\" failed: no value provided for static field \"securityRules\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.network.securitygroup\" failed to cast field \"securityRules\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.networkService.securityGroup\" failed to cast field \"securityRules\" to the right type ([]interface{}): %#v", res) } return tres, nil } // DefaultSecurityRules accessor autogenerated -func (s *mqlAzureNetworkSecuritygroup) DefaultSecurityRules() ([]interface{}, error) { +func (s *mqlAzureSubscriptionNetworkServiceSecurityGroup) DefaultSecurityRules() ([]interface{}, error) { res, ok := s.Cache.Load("defaultSecurityRules") if !ok || !res.Valid { - return nil, errors.New("\"azure.network.securitygroup\" failed: no value provided for static field \"defaultSecurityRules\"") + return nil, errors.New("\"azure.subscription.networkService.securityGroup\" failed: no value provided for static field \"defaultSecurityRules\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.network.securitygroup\" failed to cast field \"defaultSecurityRules\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.networkService.securityGroup\" failed to cast field \"defaultSecurityRules\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureNetworkSecuritygroup) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.network.securitygroup].MqlCompute") +func (s *mqlAzureSubscriptionNetworkServiceSecurityGroup) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.networkService.securityGroup].MqlCompute") switch name { case "id": return nil @@ -4750,12 +5843,12 @@ func (s *mqlAzureNetworkSecuritygroup) MqlCompute(name string) error { case "defaultSecurityRules": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.network.securitygroup\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.networkService.securityGroup\" resource") } } -// AzureNetworkSecurityrule resource interface -type AzureNetworkSecurityrule interface { +// AzureSubscriptionNetworkServiceSecurityrule resource interface +type AzureSubscriptionNetworkServiceSecurityrule interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -4768,21 +5861,21 @@ type AzureNetworkSecurityrule interface { DestinationPortRange() ([]interface{}, error) } -// mqlAzureNetworkSecurityrule for the azure.network.securityrule resource -type mqlAzureNetworkSecurityrule struct { +// mqlAzureSubscriptionNetworkServiceSecurityrule for the azure.subscription.networkService.securityrule resource +type mqlAzureSubscriptionNetworkServiceSecurityrule struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureNetworkSecurityrule) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionNetworkServiceSecurityrule) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.network.securityrule resource -func newAzureNetworkSecurityrule(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.networkService.securityrule resource +func newAzureSubscriptionNetworkServiceSecurityrule(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureNetworkSecurityrule{runtime.NewResource("azure.network.securityrule")} + res := mqlAzureSubscriptionNetworkServiceSecurityrule{runtime.NewResource("azure.subscription.networkService.securityrule")} // assign all named fields var id string @@ -4796,32 +5889,32 @@ func newAzureNetworkSecurityrule(runtime *resources.Runtime, args *resources.Arg switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.network.securityrule\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.securityrule\", its \"id\" argument has the wrong type (expected type \"string\")") } case "name": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.network.securityrule\", its \"name\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.securityrule\", its \"name\" argument has the wrong type (expected type \"string\")") } case "etag": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.network.securityrule\", its \"etag\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.securityrule\", its \"etag\" argument has the wrong type (expected type \"string\")") } case "properties": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.network.securityrule\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.securityrule\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") } case "destinationPortRange": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.network.securityrule\", its \"destinationPortRange\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.securityrule\", its \"destinationPortRange\" argument has the wrong type (expected type \"[]interface{}\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.network.securityrule\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.securityrule\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.network.securityrule with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.networkService.securityrule with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -4839,30 +5932,30 @@ func newAzureNetworkSecurityrule(runtime *resources.Runtime, args *resources.Arg return &res, nil } -func (s *mqlAzureNetworkSecurityrule) Validate() error { +func (s *mqlAzureSubscriptionNetworkServiceSecurityrule) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.network.securityrule\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.securityrule\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("name"); !ok { - return errors.New("Initialized \"azure.network.securityrule\" resource without a \"name\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.securityrule\" resource without a \"name\". This field is required.") } if _, ok := s.Cache.Load("etag"); !ok { - return errors.New("Initialized \"azure.network.securityrule\" resource without a \"etag\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.securityrule\" resource without a \"etag\". This field is required.") } if _, ok := s.Cache.Load("properties"); !ok { - return errors.New("Initialized \"azure.network.securityrule\" resource without a \"properties\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.securityrule\" resource without a \"properties\". This field is required.") } if _, ok := s.Cache.Load("destinationPortRange"); !ok { - return errors.New("Initialized \"azure.network.securityrule\" resource without a \"destinationPortRange\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.securityrule\" resource without a \"destinationPortRange\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureNetworkSecurityrule) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.network.securityrule].Register") +func (s *mqlAzureSubscriptionNetworkServiceSecurityrule) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.networkService.securityrule].Register") switch name { case "id": return nil @@ -4875,13 +5968,13 @@ func (s *mqlAzureNetworkSecurityrule) Register(name string) error { case "destinationPortRange": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.network.securityrule\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.networkService.securityrule\" resource") } } // Field accessor autogenerated -func (s *mqlAzureNetworkSecurityrule) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.network.securityrule].Field") +func (s *mqlAzureSubscriptionNetworkServiceSecurityrule) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.networkService.securityrule].Field") switch name { case "id": return s.Id() @@ -4894,93 +5987,93 @@ func (s *mqlAzureNetworkSecurityrule) Field(name string) (interface{}, error) { case "destinationPortRange": return s.DestinationPortRange() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.network.securityrule\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.networkService.securityrule\" resource") } } // Id accessor autogenerated -func (s *mqlAzureNetworkSecurityrule) Id() (string, error) { +func (s *mqlAzureSubscriptionNetworkServiceSecurityrule) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.network.securityrule\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.networkService.securityrule\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.network.securityrule\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.networkService.securityrule\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Name accessor autogenerated -func (s *mqlAzureNetworkSecurityrule) Name() (string, error) { +func (s *mqlAzureSubscriptionNetworkServiceSecurityrule) Name() (string, error) { res, ok := s.Cache.Load("name") if !ok || !res.Valid { - return "", errors.New("\"azure.network.securityrule\" failed: no value provided for static field \"name\"") + return "", errors.New("\"azure.subscription.networkService.securityrule\" failed: no value provided for static field \"name\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.network.securityrule\" failed to cast field \"name\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.networkService.securityrule\" failed to cast field \"name\" to the right type (string): %#v", res) } return tres, nil } // Etag accessor autogenerated -func (s *mqlAzureNetworkSecurityrule) Etag() (string, error) { +func (s *mqlAzureSubscriptionNetworkServiceSecurityrule) Etag() (string, error) { res, ok := s.Cache.Load("etag") if !ok || !res.Valid { - return "", errors.New("\"azure.network.securityrule\" failed: no value provided for static field \"etag\"") + return "", errors.New("\"azure.subscription.networkService.securityrule\" failed: no value provided for static field \"etag\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.network.securityrule\" failed to cast field \"etag\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.networkService.securityrule\" failed to cast field \"etag\" to the right type (string): %#v", res) } return tres, nil } // Properties accessor autogenerated -func (s *mqlAzureNetworkSecurityrule) Properties() (interface{}, error) { +func (s *mqlAzureSubscriptionNetworkServiceSecurityrule) Properties() (interface{}, error) { res, ok := s.Cache.Load("properties") if !ok || !res.Valid { - return nil, errors.New("\"azure.network.securityrule\" failed: no value provided for static field \"properties\"") + return nil, errors.New("\"azure.subscription.networkService.securityrule\" failed: no value provided for static field \"properties\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.network.securityrule\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.networkService.securityrule\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) } return tres, nil } // DestinationPortRange accessor autogenerated -func (s *mqlAzureNetworkSecurityrule) DestinationPortRange() ([]interface{}, error) { +func (s *mqlAzureSubscriptionNetworkServiceSecurityrule) DestinationPortRange() ([]interface{}, error) { res, ok := s.Cache.Load("destinationPortRange") if !ok || !res.Valid { - return nil, errors.New("\"azure.network.securityrule\" failed: no value provided for static field \"destinationPortRange\"") + return nil, errors.New("\"azure.subscription.networkService.securityrule\" failed: no value provided for static field \"destinationPortRange\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.network.securityrule\" failed to cast field \"destinationPortRange\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.networkService.securityrule\" failed to cast field \"destinationPortRange\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureNetworkSecurityrule) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.network.securityrule].MqlCompute") +func (s *mqlAzureSubscriptionNetworkServiceSecurityrule) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.networkService.securityrule].MqlCompute") switch name { case "id": return nil @@ -4993,12 +6086,12 @@ func (s *mqlAzureNetworkSecurityrule) MqlCompute(name string) error { case "destinationPortRange": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.network.securityrule\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.networkService.securityrule\" resource") } } -// AzureNetworkWatcher resource interface -type AzureNetworkWatcher interface { +// AzureSubscriptionNetworkServiceWatcher resource interface +type AzureSubscriptionNetworkServiceWatcher interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -5015,21 +6108,21 @@ type AzureNetworkWatcher interface { ProvisioningState() (string, error) } -// mqlAzureNetworkWatcher for the azure.network.watcher resource -type mqlAzureNetworkWatcher struct { +// mqlAzureSubscriptionNetworkServiceWatcher for the azure.subscription.networkService.watcher resource +type mqlAzureSubscriptionNetworkServiceWatcher struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureNetworkWatcher) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionNetworkServiceWatcher) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.network.watcher resource -func newAzureNetworkWatcher(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.networkService.watcher resource +func newAzureSubscriptionNetworkServiceWatcher(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureNetworkWatcher{runtime.NewResource("azure.network.watcher")} + res := mqlAzureSubscriptionNetworkServiceWatcher{runtime.NewResource("azure.subscription.networkService.watcher")} // assign all named fields var id string @@ -5043,48 +6136,48 @@ func newAzureNetworkWatcher(runtime *resources.Runtime, args *resources.Args) (i switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.network.watcher\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.watcher\", its \"id\" argument has the wrong type (expected type \"string\")") } case "name": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.network.watcher\", its \"name\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.watcher\", its \"name\" argument has the wrong type (expected type \"string\")") } case "location": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.network.watcher\", its \"location\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.watcher\", its \"location\" argument has the wrong type (expected type \"string\")") } case "tags": if _, ok := val.(map[string]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.network.watcher\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.watcher\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") } case "type": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.network.watcher\", its \"type\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.watcher\", its \"type\" argument has the wrong type (expected type \"string\")") } case "etag": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.network.watcher\", its \"etag\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.watcher\", its \"etag\" argument has the wrong type (expected type \"string\")") } case "properties": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.network.watcher\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.watcher\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") } case "flowLogs": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.network.watcher\", its \"flowLogs\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.watcher\", its \"flowLogs\" argument has the wrong type (expected type \"[]interface{}\")") } case "provisioningState": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.network.watcher\", its \"provisioningState\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.watcher\", its \"provisioningState\" argument has the wrong type (expected type \"string\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.network.watcher\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.watcher\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.network.watcher with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.networkService.watcher with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -5102,39 +6195,39 @@ func newAzureNetworkWatcher(runtime *resources.Runtime, args *resources.Args) (i return &res, nil } -func (s *mqlAzureNetworkWatcher) Validate() error { +func (s *mqlAzureSubscriptionNetworkServiceWatcher) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.network.watcher\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.watcher\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("name"); !ok { - return errors.New("Initialized \"azure.network.watcher\" resource without a \"name\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.watcher\" resource without a \"name\". This field is required.") } if _, ok := s.Cache.Load("location"); !ok { - return errors.New("Initialized \"azure.network.watcher\" resource without a \"location\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.watcher\" resource without a \"location\". This field is required.") } if _, ok := s.Cache.Load("tags"); !ok { - return errors.New("Initialized \"azure.network.watcher\" resource without a \"tags\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.watcher\" resource without a \"tags\". This field is required.") } if _, ok := s.Cache.Load("type"); !ok { - return errors.New("Initialized \"azure.network.watcher\" resource without a \"type\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.watcher\" resource without a \"type\". This field is required.") } if _, ok := s.Cache.Load("etag"); !ok { - return errors.New("Initialized \"azure.network.watcher\" resource without a \"etag\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.watcher\" resource without a \"etag\". This field is required.") } if _, ok := s.Cache.Load("properties"); !ok { - return errors.New("Initialized \"azure.network.watcher\" resource without a \"properties\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.watcher\" resource without a \"properties\". This field is required.") } if _, ok := s.Cache.Load("provisioningState"); !ok { - return errors.New("Initialized \"azure.network.watcher\" resource without a \"provisioningState\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.watcher\" resource without a \"provisioningState\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureNetworkWatcher) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.network.watcher].Register") +func (s *mqlAzureSubscriptionNetworkServiceWatcher) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.networkService.watcher].Register") switch name { case "id": return nil @@ -5155,13 +6248,13 @@ func (s *mqlAzureNetworkWatcher) Register(name string) error { case "provisioningState": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.network.watcher\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.networkService.watcher\" resource") } } // Field accessor autogenerated -func (s *mqlAzureNetworkWatcher) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.network.watcher].Field") +func (s *mqlAzureSubscriptionNetworkServiceWatcher) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.networkService.watcher].Field") switch name { case "id": return s.Id() @@ -5182,124 +6275,124 @@ func (s *mqlAzureNetworkWatcher) Field(name string) (interface{}, error) { case "provisioningState": return s.ProvisioningState() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.network.watcher\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.networkService.watcher\" resource") } } // Id accessor autogenerated -func (s *mqlAzureNetworkWatcher) Id() (string, error) { +func (s *mqlAzureSubscriptionNetworkServiceWatcher) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.network.watcher\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.networkService.watcher\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.network.watcher\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.networkService.watcher\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Name accessor autogenerated -func (s *mqlAzureNetworkWatcher) Name() (string, error) { +func (s *mqlAzureSubscriptionNetworkServiceWatcher) Name() (string, error) { res, ok := s.Cache.Load("name") if !ok || !res.Valid { - return "", errors.New("\"azure.network.watcher\" failed: no value provided for static field \"name\"") + return "", errors.New("\"azure.subscription.networkService.watcher\" failed: no value provided for static field \"name\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.network.watcher\" failed to cast field \"name\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.networkService.watcher\" failed to cast field \"name\" to the right type (string): %#v", res) } return tres, nil } // Location accessor autogenerated -func (s *mqlAzureNetworkWatcher) Location() (string, error) { +func (s *mqlAzureSubscriptionNetworkServiceWatcher) Location() (string, error) { res, ok := s.Cache.Load("location") if !ok || !res.Valid { - return "", errors.New("\"azure.network.watcher\" failed: no value provided for static field \"location\"") + return "", errors.New("\"azure.subscription.networkService.watcher\" failed: no value provided for static field \"location\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.network.watcher\" failed to cast field \"location\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.networkService.watcher\" failed to cast field \"location\" to the right type (string): %#v", res) } return tres, nil } // Tags accessor autogenerated -func (s *mqlAzureNetworkWatcher) Tags() (map[string]interface{}, error) { +func (s *mqlAzureSubscriptionNetworkServiceWatcher) Tags() (map[string]interface{}, error) { res, ok := s.Cache.Load("tags") if !ok || !res.Valid { - return nil, errors.New("\"azure.network.watcher\" failed: no value provided for static field \"tags\"") + return nil, errors.New("\"azure.subscription.networkService.watcher\" failed: no value provided for static field \"tags\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(map[string]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.network.watcher\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.networkService.watcher\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) } return tres, nil } // Type accessor autogenerated -func (s *mqlAzureNetworkWatcher) Type() (string, error) { +func (s *mqlAzureSubscriptionNetworkServiceWatcher) Type() (string, error) { res, ok := s.Cache.Load("type") if !ok || !res.Valid { - return "", errors.New("\"azure.network.watcher\" failed: no value provided for static field \"type\"") + return "", errors.New("\"azure.subscription.networkService.watcher\" failed: no value provided for static field \"type\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.network.watcher\" failed to cast field \"type\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.networkService.watcher\" failed to cast field \"type\" to the right type (string): %#v", res) } return tres, nil } // Etag accessor autogenerated -func (s *mqlAzureNetworkWatcher) Etag() (string, error) { +func (s *mqlAzureSubscriptionNetworkServiceWatcher) Etag() (string, error) { res, ok := s.Cache.Load("etag") if !ok || !res.Valid { - return "", errors.New("\"azure.network.watcher\" failed: no value provided for static field \"etag\"") + return "", errors.New("\"azure.subscription.networkService.watcher\" failed: no value provided for static field \"etag\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.network.watcher\" failed to cast field \"etag\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.networkService.watcher\" failed to cast field \"etag\" to the right type (string): %#v", res) } return tres, nil } // Properties accessor autogenerated -func (s *mqlAzureNetworkWatcher) Properties() (interface{}, error) { +func (s *mqlAzureSubscriptionNetworkServiceWatcher) Properties() (interface{}, error) { res, ok := s.Cache.Load("properties") if !ok || !res.Valid { - return nil, errors.New("\"azure.network.watcher\" failed: no value provided for static field \"properties\"") + return nil, errors.New("\"azure.subscription.networkService.watcher\" failed: no value provided for static field \"properties\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.network.watcher\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.networkService.watcher\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) } return tres, nil } // FlowLogs accessor autogenerated -func (s *mqlAzureNetworkWatcher) FlowLogs() ([]interface{}, error) { +func (s *mqlAzureSubscriptionNetworkServiceWatcher) FlowLogs() ([]interface{}, error) { res, ok := s.Cache.Load("flowLogs") if !ok || !res.Valid { if err := s.ComputeFlowLogs(); err != nil { @@ -5307,7 +6400,7 @@ func (s *mqlAzureNetworkWatcher) FlowLogs() ([]interface{}, error) { } res, ok = s.Cache.Load("flowLogs") if !ok { - return nil, errors.New("\"azure.network.watcher\" calculated \"flowLogs\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.networkService.watcher\" calculated \"flowLogs\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "flowLogs") } @@ -5316,30 +6409,30 @@ func (s *mqlAzureNetworkWatcher) FlowLogs() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.network.watcher\" failed to cast field \"flowLogs\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.networkService.watcher\" failed to cast field \"flowLogs\" to the right type ([]interface{}): %#v", res) } return tres, nil } // ProvisioningState accessor autogenerated -func (s *mqlAzureNetworkWatcher) ProvisioningState() (string, error) { +func (s *mqlAzureSubscriptionNetworkServiceWatcher) ProvisioningState() (string, error) { res, ok := s.Cache.Load("provisioningState") if !ok || !res.Valid { - return "", errors.New("\"azure.network.watcher\" failed: no value provided for static field \"provisioningState\"") + return "", errors.New("\"azure.subscription.networkService.watcher\" failed: no value provided for static field \"provisioningState\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.network.watcher\" failed to cast field \"provisioningState\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.networkService.watcher\" failed to cast field \"provisioningState\" to the right type (string): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureNetworkWatcher) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.network.watcher].MqlCompute") +func (s *mqlAzureSubscriptionNetworkServiceWatcher) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.networkService.watcher].MqlCompute") switch name { case "id": return nil @@ -5360,12 +6453,12 @@ func (s *mqlAzureNetworkWatcher) MqlCompute(name string) error { case "provisioningState": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.network.watcher\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.networkService.watcher\" resource") } } // ComputeFlowLogs computer autogenerated -func (s *mqlAzureNetworkWatcher) ComputeFlowLogs() error { +func (s *mqlAzureSubscriptionNetworkServiceWatcher) ComputeFlowLogs() error { var err error if _, ok := s.Cache.Load("flowLogs"); ok { return nil @@ -5378,8 +6471,8 @@ func (s *mqlAzureNetworkWatcher) ComputeFlowLogs() error { return nil } -// AzureNetworkWatcherFlowlog resource interface -type AzureNetworkWatcherFlowlog interface { +// AzureSubscriptionNetworkServiceWatcherFlowlog resource interface +type AzureSubscriptionNetworkServiceWatcherFlowlog interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -5402,21 +6495,21 @@ type AzureNetworkWatcherFlowlog interface { Analytics() (interface{}, error) } -// mqlAzureNetworkWatcherFlowlog for the azure.network.watcher.flowlog resource -type mqlAzureNetworkWatcherFlowlog struct { +// mqlAzureSubscriptionNetworkServiceWatcherFlowlog for the azure.subscription.networkService.watcher.flowlog resource +type mqlAzureSubscriptionNetworkServiceWatcherFlowlog struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureNetworkWatcherFlowlog) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionNetworkServiceWatcherFlowlog) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.network.watcher.flowlog resource -func newAzureNetworkWatcherFlowlog(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.networkService.watcher.flowlog resource +func newAzureSubscriptionNetworkServiceWatcherFlowlog(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureNetworkWatcherFlowlog{runtime.NewResource("azure.network.watcher.flowlog")} + res := mqlAzureSubscriptionNetworkServiceWatcherFlowlog{runtime.NewResource("azure.subscription.networkService.watcher.flowlog")} // assign all named fields var id string @@ -5430,72 +6523,72 @@ func newAzureNetworkWatcherFlowlog(runtime *resources.Runtime, args *resources.A switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.network.watcher.flowlog\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.watcher.flowlog\", its \"id\" argument has the wrong type (expected type \"string\")") } case "name": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.network.watcher.flowlog\", its \"name\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.watcher.flowlog\", its \"name\" argument has the wrong type (expected type \"string\")") } case "location": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.network.watcher.flowlog\", its \"location\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.watcher.flowlog\", its \"location\" argument has the wrong type (expected type \"string\")") } case "tags": if _, ok := val.(map[string]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.network.watcher.flowlog\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.watcher.flowlog\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") } case "type": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.network.watcher.flowlog\", its \"type\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.watcher.flowlog\", its \"type\" argument has the wrong type (expected type \"string\")") } case "etag": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.network.watcher.flowlog\", its \"etag\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.watcher.flowlog\", its \"etag\" argument has the wrong type (expected type \"string\")") } case "provisioningState": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.network.watcher.flowlog\", its \"provisioningState\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.watcher.flowlog\", its \"provisioningState\" argument has the wrong type (expected type \"string\")") } case "enabled": if _, ok := val.(bool); !ok { - return nil, errors.New("Failed to initialize \"azure.network.watcher.flowlog\", its \"enabled\" argument has the wrong type (expected type \"bool\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.watcher.flowlog\", its \"enabled\" argument has the wrong type (expected type \"bool\")") } case "storageAccountId": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.network.watcher.flowlog\", its \"storageAccountId\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.watcher.flowlog\", its \"storageAccountId\" argument has the wrong type (expected type \"string\")") } case "targetResourceId": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.network.watcher.flowlog\", its \"targetResourceId\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.watcher.flowlog\", its \"targetResourceId\" argument has the wrong type (expected type \"string\")") } case "targetResourceGuid": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.network.watcher.flowlog\", its \"targetResourceGuid\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.watcher.flowlog\", its \"targetResourceGuid\" argument has the wrong type (expected type \"string\")") } case "version": if _, ok := val.(int64); !ok { - return nil, errors.New("Failed to initialize \"azure.network.watcher.flowlog\", its \"version\" argument has the wrong type (expected type \"int64\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.watcher.flowlog\", its \"version\" argument has the wrong type (expected type \"int64\")") } case "format": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.network.watcher.flowlog\", its \"format\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.watcher.flowlog\", its \"format\" argument has the wrong type (expected type \"string\")") } case "retentionPolicy": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.network.watcher.flowlog\", its \"retentionPolicy\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.watcher.flowlog\", its \"retentionPolicy\" argument has the wrong type (expected type \"interface{}\")") } case "analytics": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.network.watcher.flowlog\", its \"analytics\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.watcher.flowlog\", its \"analytics\" argument has the wrong type (expected type \"interface{}\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.network.watcher.flowlog\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.networkService.watcher.flowlog\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.network.watcher.flowlog with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.networkService.watcher.flowlog with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -5513,60 +6606,60 @@ func newAzureNetworkWatcherFlowlog(runtime *resources.Runtime, args *resources.A return &res, nil } -func (s *mqlAzureNetworkWatcherFlowlog) Validate() error { +func (s *mqlAzureSubscriptionNetworkServiceWatcherFlowlog) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.network.watcher.flowlog\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.watcher.flowlog\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("name"); !ok { - return errors.New("Initialized \"azure.network.watcher.flowlog\" resource without a \"name\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.watcher.flowlog\" resource without a \"name\". This field is required.") } if _, ok := s.Cache.Load("location"); !ok { - return errors.New("Initialized \"azure.network.watcher.flowlog\" resource without a \"location\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.watcher.flowlog\" resource without a \"location\". This field is required.") } if _, ok := s.Cache.Load("tags"); !ok { - return errors.New("Initialized \"azure.network.watcher.flowlog\" resource without a \"tags\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.watcher.flowlog\" resource without a \"tags\". This field is required.") } if _, ok := s.Cache.Load("type"); !ok { - return errors.New("Initialized \"azure.network.watcher.flowlog\" resource without a \"type\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.watcher.flowlog\" resource without a \"type\". This field is required.") } if _, ok := s.Cache.Load("etag"); !ok { - return errors.New("Initialized \"azure.network.watcher.flowlog\" resource without a \"etag\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.watcher.flowlog\" resource without a \"etag\". This field is required.") } if _, ok := s.Cache.Load("provisioningState"); !ok { - return errors.New("Initialized \"azure.network.watcher.flowlog\" resource without a \"provisioningState\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.watcher.flowlog\" resource without a \"provisioningState\". This field is required.") } if _, ok := s.Cache.Load("enabled"); !ok { - return errors.New("Initialized \"azure.network.watcher.flowlog\" resource without a \"enabled\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.watcher.flowlog\" resource without a \"enabled\". This field is required.") } if _, ok := s.Cache.Load("storageAccountId"); !ok { - return errors.New("Initialized \"azure.network.watcher.flowlog\" resource without a \"storageAccountId\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.watcher.flowlog\" resource without a \"storageAccountId\". This field is required.") } if _, ok := s.Cache.Load("targetResourceId"); !ok { - return errors.New("Initialized \"azure.network.watcher.flowlog\" resource without a \"targetResourceId\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.watcher.flowlog\" resource without a \"targetResourceId\". This field is required.") } if _, ok := s.Cache.Load("targetResourceGuid"); !ok { - return errors.New("Initialized \"azure.network.watcher.flowlog\" resource without a \"targetResourceGuid\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.watcher.flowlog\" resource without a \"targetResourceGuid\". This field is required.") } if _, ok := s.Cache.Load("version"); !ok { - return errors.New("Initialized \"azure.network.watcher.flowlog\" resource without a \"version\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.watcher.flowlog\" resource without a \"version\". This field is required.") } if _, ok := s.Cache.Load("format"); !ok { - return errors.New("Initialized \"azure.network.watcher.flowlog\" resource without a \"format\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.watcher.flowlog\" resource without a \"format\". This field is required.") } if _, ok := s.Cache.Load("retentionPolicy"); !ok { - return errors.New("Initialized \"azure.network.watcher.flowlog\" resource without a \"retentionPolicy\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.watcher.flowlog\" resource without a \"retentionPolicy\". This field is required.") } if _, ok := s.Cache.Load("analytics"); !ok { - return errors.New("Initialized \"azure.network.watcher.flowlog\" resource without a \"analytics\". This field is required.") + return errors.New("Initialized \"azure.subscription.networkService.watcher.flowlog\" resource without a \"analytics\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureNetworkWatcherFlowlog) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.network.watcher.flowlog].Register") +func (s *mqlAzureSubscriptionNetworkServiceWatcherFlowlog) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.networkService.watcher.flowlog].Register") switch name { case "id": return nil @@ -5599,13 +6692,13 @@ func (s *mqlAzureNetworkWatcherFlowlog) Register(name string) error { case "analytics": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.network.watcher.flowlog\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.networkService.watcher.flowlog\" resource") } } // Field accessor autogenerated -func (s *mqlAzureNetworkWatcherFlowlog) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.network.watcher.flowlog].Field") +func (s *mqlAzureSubscriptionNetworkServiceWatcherFlowlog) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.networkService.watcher.flowlog].Field") switch name { case "id": return s.Id() @@ -5638,253 +6731,253 @@ func (s *mqlAzureNetworkWatcherFlowlog) Field(name string) (interface{}, error) case "analytics": return s.Analytics() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.network.watcher.flowlog\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.networkService.watcher.flowlog\" resource") } } // Id accessor autogenerated -func (s *mqlAzureNetworkWatcherFlowlog) Id() (string, error) { +func (s *mqlAzureSubscriptionNetworkServiceWatcherFlowlog) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.network.watcher.flowlog\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.networkService.watcher.flowlog\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.network.watcher.flowlog\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.networkService.watcher.flowlog\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Name accessor autogenerated -func (s *mqlAzureNetworkWatcherFlowlog) Name() (string, error) { +func (s *mqlAzureSubscriptionNetworkServiceWatcherFlowlog) Name() (string, error) { res, ok := s.Cache.Load("name") if !ok || !res.Valid { - return "", errors.New("\"azure.network.watcher.flowlog\" failed: no value provided for static field \"name\"") + return "", errors.New("\"azure.subscription.networkService.watcher.flowlog\" failed: no value provided for static field \"name\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.network.watcher.flowlog\" failed to cast field \"name\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.networkService.watcher.flowlog\" failed to cast field \"name\" to the right type (string): %#v", res) } return tres, nil } // Location accessor autogenerated -func (s *mqlAzureNetworkWatcherFlowlog) Location() (string, error) { +func (s *mqlAzureSubscriptionNetworkServiceWatcherFlowlog) Location() (string, error) { res, ok := s.Cache.Load("location") if !ok || !res.Valid { - return "", errors.New("\"azure.network.watcher.flowlog\" failed: no value provided for static field \"location\"") + return "", errors.New("\"azure.subscription.networkService.watcher.flowlog\" failed: no value provided for static field \"location\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.network.watcher.flowlog\" failed to cast field \"location\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.networkService.watcher.flowlog\" failed to cast field \"location\" to the right type (string): %#v", res) } return tres, nil } // Tags accessor autogenerated -func (s *mqlAzureNetworkWatcherFlowlog) Tags() (map[string]interface{}, error) { +func (s *mqlAzureSubscriptionNetworkServiceWatcherFlowlog) Tags() (map[string]interface{}, error) { res, ok := s.Cache.Load("tags") if !ok || !res.Valid { - return nil, errors.New("\"azure.network.watcher.flowlog\" failed: no value provided for static field \"tags\"") + return nil, errors.New("\"azure.subscription.networkService.watcher.flowlog\" failed: no value provided for static field \"tags\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(map[string]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.network.watcher.flowlog\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.networkService.watcher.flowlog\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) } return tres, nil } // Type accessor autogenerated -func (s *mqlAzureNetworkWatcherFlowlog) Type() (string, error) { +func (s *mqlAzureSubscriptionNetworkServiceWatcherFlowlog) Type() (string, error) { res, ok := s.Cache.Load("type") if !ok || !res.Valid { - return "", errors.New("\"azure.network.watcher.flowlog\" failed: no value provided for static field \"type\"") + return "", errors.New("\"azure.subscription.networkService.watcher.flowlog\" failed: no value provided for static field \"type\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.network.watcher.flowlog\" failed to cast field \"type\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.networkService.watcher.flowlog\" failed to cast field \"type\" to the right type (string): %#v", res) } return tres, nil } // Etag accessor autogenerated -func (s *mqlAzureNetworkWatcherFlowlog) Etag() (string, error) { +func (s *mqlAzureSubscriptionNetworkServiceWatcherFlowlog) Etag() (string, error) { res, ok := s.Cache.Load("etag") if !ok || !res.Valid { - return "", errors.New("\"azure.network.watcher.flowlog\" failed: no value provided for static field \"etag\"") + return "", errors.New("\"azure.subscription.networkService.watcher.flowlog\" failed: no value provided for static field \"etag\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.network.watcher.flowlog\" failed to cast field \"etag\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.networkService.watcher.flowlog\" failed to cast field \"etag\" to the right type (string): %#v", res) } return tres, nil } // ProvisioningState accessor autogenerated -func (s *mqlAzureNetworkWatcherFlowlog) ProvisioningState() (string, error) { +func (s *mqlAzureSubscriptionNetworkServiceWatcherFlowlog) ProvisioningState() (string, error) { res, ok := s.Cache.Load("provisioningState") if !ok || !res.Valid { - return "", errors.New("\"azure.network.watcher.flowlog\" failed: no value provided for static field \"provisioningState\"") + return "", errors.New("\"azure.subscription.networkService.watcher.flowlog\" failed: no value provided for static field \"provisioningState\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.network.watcher.flowlog\" failed to cast field \"provisioningState\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.networkService.watcher.flowlog\" failed to cast field \"provisioningState\" to the right type (string): %#v", res) } return tres, nil } // Enabled accessor autogenerated -func (s *mqlAzureNetworkWatcherFlowlog) Enabled() (bool, error) { +func (s *mqlAzureSubscriptionNetworkServiceWatcherFlowlog) Enabled() (bool, error) { res, ok := s.Cache.Load("enabled") if !ok || !res.Valid { - return false, errors.New("\"azure.network.watcher.flowlog\" failed: no value provided for static field \"enabled\"") + return false, errors.New("\"azure.subscription.networkService.watcher.flowlog\" failed: no value provided for static field \"enabled\"") } if res.Error != nil { return false, res.Error } tres, ok := res.Data.(bool) if !ok { - return false, fmt.Errorf("\"azure.network.watcher.flowlog\" failed to cast field \"enabled\" to the right type (bool): %#v", res) + return false, fmt.Errorf("\"azure.subscription.networkService.watcher.flowlog\" failed to cast field \"enabled\" to the right type (bool): %#v", res) } return tres, nil } // StorageAccountId accessor autogenerated -func (s *mqlAzureNetworkWatcherFlowlog) StorageAccountId() (string, error) { +func (s *mqlAzureSubscriptionNetworkServiceWatcherFlowlog) StorageAccountId() (string, error) { res, ok := s.Cache.Load("storageAccountId") if !ok || !res.Valid { - return "", errors.New("\"azure.network.watcher.flowlog\" failed: no value provided for static field \"storageAccountId\"") + return "", errors.New("\"azure.subscription.networkService.watcher.flowlog\" failed: no value provided for static field \"storageAccountId\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.network.watcher.flowlog\" failed to cast field \"storageAccountId\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.networkService.watcher.flowlog\" failed to cast field \"storageAccountId\" to the right type (string): %#v", res) } return tres, nil } // TargetResourceId accessor autogenerated -func (s *mqlAzureNetworkWatcherFlowlog) TargetResourceId() (string, error) { +func (s *mqlAzureSubscriptionNetworkServiceWatcherFlowlog) TargetResourceId() (string, error) { res, ok := s.Cache.Load("targetResourceId") if !ok || !res.Valid { - return "", errors.New("\"azure.network.watcher.flowlog\" failed: no value provided for static field \"targetResourceId\"") + return "", errors.New("\"azure.subscription.networkService.watcher.flowlog\" failed: no value provided for static field \"targetResourceId\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.network.watcher.flowlog\" failed to cast field \"targetResourceId\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.networkService.watcher.flowlog\" failed to cast field \"targetResourceId\" to the right type (string): %#v", res) } return tres, nil } // TargetResourceGuid accessor autogenerated -func (s *mqlAzureNetworkWatcherFlowlog) TargetResourceGuid() (string, error) { +func (s *mqlAzureSubscriptionNetworkServiceWatcherFlowlog) TargetResourceGuid() (string, error) { res, ok := s.Cache.Load("targetResourceGuid") if !ok || !res.Valid { - return "", errors.New("\"azure.network.watcher.flowlog\" failed: no value provided for static field \"targetResourceGuid\"") + return "", errors.New("\"azure.subscription.networkService.watcher.flowlog\" failed: no value provided for static field \"targetResourceGuid\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.network.watcher.flowlog\" failed to cast field \"targetResourceGuid\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.networkService.watcher.flowlog\" failed to cast field \"targetResourceGuid\" to the right type (string): %#v", res) } return tres, nil } // Version accessor autogenerated -func (s *mqlAzureNetworkWatcherFlowlog) Version() (int64, error) { +func (s *mqlAzureSubscriptionNetworkServiceWatcherFlowlog) Version() (int64, error) { res, ok := s.Cache.Load("version") if !ok || !res.Valid { - return 0, errors.New("\"azure.network.watcher.flowlog\" failed: no value provided for static field \"version\"") + return 0, errors.New("\"azure.subscription.networkService.watcher.flowlog\" failed: no value provided for static field \"version\"") } if res.Error != nil { return 0, res.Error } tres, ok := res.Data.(int64) if !ok { - return 0, fmt.Errorf("\"azure.network.watcher.flowlog\" failed to cast field \"version\" to the right type (int64): %#v", res) + return 0, fmt.Errorf("\"azure.subscription.networkService.watcher.flowlog\" failed to cast field \"version\" to the right type (int64): %#v", res) } return tres, nil } // Format accessor autogenerated -func (s *mqlAzureNetworkWatcherFlowlog) Format() (string, error) { +func (s *mqlAzureSubscriptionNetworkServiceWatcherFlowlog) Format() (string, error) { res, ok := s.Cache.Load("format") if !ok || !res.Valid { - return "", errors.New("\"azure.network.watcher.flowlog\" failed: no value provided for static field \"format\"") + return "", errors.New("\"azure.subscription.networkService.watcher.flowlog\" failed: no value provided for static field \"format\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.network.watcher.flowlog\" failed to cast field \"format\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.networkService.watcher.flowlog\" failed to cast field \"format\" to the right type (string): %#v", res) } return tres, nil } // RetentionPolicy accessor autogenerated -func (s *mqlAzureNetworkWatcherFlowlog) RetentionPolicy() (interface{}, error) { +func (s *mqlAzureSubscriptionNetworkServiceWatcherFlowlog) RetentionPolicy() (interface{}, error) { res, ok := s.Cache.Load("retentionPolicy") if !ok || !res.Valid { - return nil, errors.New("\"azure.network.watcher.flowlog\" failed: no value provided for static field \"retentionPolicy\"") + return nil, errors.New("\"azure.subscription.networkService.watcher.flowlog\" failed: no value provided for static field \"retentionPolicy\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.network.watcher.flowlog\" failed to cast field \"retentionPolicy\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.networkService.watcher.flowlog\" failed to cast field \"retentionPolicy\" to the right type (interface{}): %#v", res) } return tres, nil } // Analytics accessor autogenerated -func (s *mqlAzureNetworkWatcherFlowlog) Analytics() (interface{}, error) { +func (s *mqlAzureSubscriptionNetworkServiceWatcherFlowlog) Analytics() (interface{}, error) { res, ok := s.Cache.Load("analytics") if !ok || !res.Valid { - return nil, errors.New("\"azure.network.watcher.flowlog\" failed: no value provided for static field \"analytics\"") + return nil, errors.New("\"azure.subscription.networkService.watcher.flowlog\" failed: no value provided for static field \"analytics\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.network.watcher.flowlog\" failed to cast field \"analytics\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.networkService.watcher.flowlog\" failed to cast field \"analytics\" to the right type (interface{}): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureNetworkWatcherFlowlog) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.network.watcher.flowlog].MqlCompute") +func (s *mqlAzureSubscriptionNetworkServiceWatcherFlowlog) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.networkService.watcher.flowlog].MqlCompute") switch name { case "id": return nil @@ -5917,35 +7010,45 @@ func (s *mqlAzureNetworkWatcherFlowlog) MqlCompute(name string) error { case "analytics": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.network.watcher.flowlog\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.networkService.watcher.flowlog\" resource") } } -// AzureStorage resource interface -type AzureStorage interface { +// AzureSubscriptionStorageService resource interface +type AzureSubscriptionStorageService interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) Register(string) error Validate() error + SubscriptionId() (string, error) Accounts() ([]interface{}, error) } -// mqlAzureStorage for the azure.storage resource -type mqlAzureStorage struct { +// mqlAzureSubscriptionStorageService for the azure.subscription.storageService resource +type mqlAzureSubscriptionStorageService struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureStorage) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionStorageService) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.storage resource -func newAzureStorage(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.storageService resource +func newAzureSubscriptionStorageService(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureStorage{runtime.NewResource("azure.storage")} + res := mqlAzureSubscriptionStorageService{runtime.NewResource("azure.subscription.storageService")} + var existing AzureSubscriptionStorageService + args, existing, err = res.init(args) + if err != nil { + return nil, err + } + if existing != nil { + return existing, nil + } + // assign all named fields var id string @@ -5957,18 +7060,22 @@ func newAzureStorage(runtime *resources.Runtime, args *resources.Args) (interfac } switch name { + case "subscriptionId": + if _, ok := val.(string); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription.storageService\", its \"subscriptionId\" argument has the wrong type (expected type \"string\")") + } case "accounts": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.storage\", its \"accounts\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService\", its \"accounts\" argument has the wrong type (expected type \"[]interface{}\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.storage\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.storage with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.storageService with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -5986,37 +7093,59 @@ func newAzureStorage(runtime *resources.Runtime, args *resources.Args) (interfac return &res, nil } -func (s *mqlAzureStorage) Validate() error { +func (s *mqlAzureSubscriptionStorageService) Validate() error { // required arguments - // no required fields found + if _, ok := s.Cache.Load("subscriptionId"); !ok { + return errors.New("Initialized \"azure.subscription.storageService\" resource without a \"subscriptionId\". This field is required.") + } return nil } // Register accessor autogenerated -func (s *mqlAzureStorage) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.storage].Register") +func (s *mqlAzureSubscriptionStorageService) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.storageService].Register") switch name { + case "subscriptionId": + return nil case "accounts": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.storage\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.storageService\" resource") } } // Field accessor autogenerated -func (s *mqlAzureStorage) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.storage].Field") +func (s *mqlAzureSubscriptionStorageService) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.storageService].Field") switch name { + case "subscriptionId": + return s.SubscriptionId() case "accounts": return s.Accounts() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.storage\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.storageService\" resource") + } +} + +// SubscriptionId accessor autogenerated +func (s *mqlAzureSubscriptionStorageService) SubscriptionId() (string, error) { + res, ok := s.Cache.Load("subscriptionId") + if !ok || !res.Valid { + return "", errors.New("\"azure.subscription.storageService\" failed: no value provided for static field \"subscriptionId\"") + } + if res.Error != nil { + return "", res.Error + } + tres, ok := res.Data.(string) + if !ok { + return "", fmt.Errorf("\"azure.subscription.storageService\" failed to cast field \"subscriptionId\" to the right type (string): %#v", res) } + return tres, nil } // Accounts accessor autogenerated -func (s *mqlAzureStorage) Accounts() ([]interface{}, error) { +func (s *mqlAzureSubscriptionStorageService) Accounts() ([]interface{}, error) { res, ok := s.Cache.Load("accounts") if !ok || !res.Valid { if err := s.ComputeAccounts(); err != nil { @@ -6024,7 +7153,7 @@ func (s *mqlAzureStorage) Accounts() ([]interface{}, error) { } res, ok = s.Cache.Load("accounts") if !ok { - return nil, errors.New("\"azure.storage\" calculated \"accounts\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.storageService\" calculated \"accounts\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "accounts") } @@ -6033,24 +7162,26 @@ func (s *mqlAzureStorage) Accounts() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.storage\" failed to cast field \"accounts\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.storageService\" failed to cast field \"accounts\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureStorage) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.storage].MqlCompute") +func (s *mqlAzureSubscriptionStorageService) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.storageService].MqlCompute") switch name { + case "subscriptionId": + return nil case "accounts": return s.ComputeAccounts() default: - return errors.New("Cannot find field '" + name + "' in \"azure.storage\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.storageService\" resource") } } // ComputeAccounts computer autogenerated -func (s *mqlAzureStorage) ComputeAccounts() error { +func (s *mqlAzureSubscriptionStorageService) ComputeAccounts() error { var err error if _, ok := s.Cache.Load("accounts"); ok { return nil @@ -6063,8 +7194,8 @@ func (s *mqlAzureStorage) ComputeAccounts() error { return nil } -// AzureStorageAccount resource interface -type AzureStorageAccount interface { +// AzureSubscriptionStorageServiceAccount resource interface +type AzureSubscriptionStorageServiceAccount interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -6080,28 +7211,28 @@ type AzureStorageAccount interface { Sku() (interface{}, error) Kind() (string, error) Containers() ([]interface{}, error) - QueueProperties() (AzureStorageAccountQueueServiceProperties, error) - TableProperties() (AzureStorageAccountTableServiceProperties, error) - BlobProperties() (AzureStorageAccountBlobServiceProperties, error) - DataProtection() (AzureStorageAccountDataProtection, error) + QueueProperties() (AzureSubscriptionStorageServiceAccountQueueServiceProperties, error) + TableProperties() (AzureSubscriptionStorageServiceAccountTableServiceProperties, error) + BlobProperties() (AzureSubscriptionStorageServiceAccountBlobServiceProperties, error) + DataProtection() (AzureSubscriptionStorageServiceAccountDataProtection, error) } -// mqlAzureStorageAccount for the azure.storage.account resource -type mqlAzureStorageAccount struct { +// mqlAzureSubscriptionStorageServiceAccount for the azure.subscription.storageService.account resource +type mqlAzureSubscriptionStorageServiceAccount struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureStorageAccount) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionStorageServiceAccount) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.storage.account resource -func newAzureStorageAccount(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.storageService.account resource +func newAzureSubscriptionStorageServiceAccount(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureStorageAccount{runtime.NewResource("azure.storage.account")} - var existing AzureStorageAccount + res := mqlAzureSubscriptionStorageServiceAccount{runtime.NewResource("azure.subscription.storageService.account")} + var existing AzureSubscriptionStorageServiceAccount args, existing, err = res.init(args) if err != nil { return nil, err @@ -6123,68 +7254,68 @@ func newAzureStorageAccount(runtime *resources.Runtime, args *resources.Args) (i switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account\", its \"id\" argument has the wrong type (expected type \"string\")") } case "name": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account\", its \"name\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account\", its \"name\" argument has the wrong type (expected type \"string\")") } case "location": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account\", its \"location\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account\", its \"location\" argument has the wrong type (expected type \"string\")") } case "tags": if _, ok := val.(map[string]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") } case "type": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account\", its \"type\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account\", its \"type\" argument has the wrong type (expected type \"string\")") } case "properties": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") } case "identity": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account\", its \"identity\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account\", its \"identity\" argument has the wrong type (expected type \"interface{}\")") } case "sku": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account\", its \"sku\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account\", its \"sku\" argument has the wrong type (expected type \"interface{}\")") } case "kind": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account\", its \"kind\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account\", its \"kind\" argument has the wrong type (expected type \"string\")") } case "containers": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account\", its \"containers\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account\", its \"containers\" argument has the wrong type (expected type \"[]interface{}\")") } case "queueProperties": - if _, ok := val.(AzureStorageAccountQueueServiceProperties); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account\", its \"queueProperties\" argument has the wrong type (expected type \"AzureStorageAccountQueueServiceProperties\")") + if _, ok := val.(AzureSubscriptionStorageServiceAccountQueueServiceProperties); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account\", its \"queueProperties\" argument has the wrong type (expected type \"AzureSubscriptionStorageServiceAccountQueueServiceProperties\")") } case "tableProperties": - if _, ok := val.(AzureStorageAccountTableServiceProperties); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account\", its \"tableProperties\" argument has the wrong type (expected type \"AzureStorageAccountTableServiceProperties\")") + if _, ok := val.(AzureSubscriptionStorageServiceAccountTableServiceProperties); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account\", its \"tableProperties\" argument has the wrong type (expected type \"AzureSubscriptionStorageServiceAccountTableServiceProperties\")") } case "blobProperties": - if _, ok := val.(AzureStorageAccountBlobServiceProperties); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account\", its \"blobProperties\" argument has the wrong type (expected type \"AzureStorageAccountBlobServiceProperties\")") + if _, ok := val.(AzureSubscriptionStorageServiceAccountBlobServiceProperties); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account\", its \"blobProperties\" argument has the wrong type (expected type \"AzureSubscriptionStorageServiceAccountBlobServiceProperties\")") } case "dataProtection": - if _, ok := val.(AzureStorageAccountDataProtection); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account\", its \"dataProtection\" argument has the wrong type (expected type \"AzureStorageAccountDataProtection\")") + if _, ok := val.(AzureSubscriptionStorageServiceAccountDataProtection); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account\", its \"dataProtection\" argument has the wrong type (expected type \"AzureSubscriptionStorageServiceAccountDataProtection\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.storage.account with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.storageService.account with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -6202,42 +7333,42 @@ func newAzureStorageAccount(runtime *resources.Runtime, args *resources.Args) (i return &res, nil } -func (s *mqlAzureStorageAccount) Validate() error { +func (s *mqlAzureSubscriptionStorageServiceAccount) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.storage.account\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("name"); !ok { - return errors.New("Initialized \"azure.storage.account\" resource without a \"name\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account\" resource without a \"name\". This field is required.") } if _, ok := s.Cache.Load("location"); !ok { - return errors.New("Initialized \"azure.storage.account\" resource without a \"location\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account\" resource without a \"location\". This field is required.") } if _, ok := s.Cache.Load("tags"); !ok { - return errors.New("Initialized \"azure.storage.account\" resource without a \"tags\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account\" resource without a \"tags\". This field is required.") } if _, ok := s.Cache.Load("type"); !ok { - return errors.New("Initialized \"azure.storage.account\" resource without a \"type\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account\" resource without a \"type\". This field is required.") } if _, ok := s.Cache.Load("properties"); !ok { - return errors.New("Initialized \"azure.storage.account\" resource without a \"properties\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account\" resource without a \"properties\". This field is required.") } if _, ok := s.Cache.Load("identity"); !ok { - return errors.New("Initialized \"azure.storage.account\" resource without a \"identity\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account\" resource without a \"identity\". This field is required.") } if _, ok := s.Cache.Load("sku"); !ok { - return errors.New("Initialized \"azure.storage.account\" resource without a \"sku\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account\" resource without a \"sku\". This field is required.") } if _, ok := s.Cache.Load("kind"); !ok { - return errors.New("Initialized \"azure.storage.account\" resource without a \"kind\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account\" resource without a \"kind\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureStorageAccount) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.storage.account].Register") +func (s *mqlAzureSubscriptionStorageServiceAccount) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.storageService.account].Register") switch name { case "id": return nil @@ -6268,13 +7399,13 @@ func (s *mqlAzureStorageAccount) Register(name string) error { case "dataProtection": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.storage.account\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.storageService.account\" resource") } } // Field accessor autogenerated -func (s *mqlAzureStorageAccount) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.storage.account].Field") +func (s *mqlAzureSubscriptionStorageServiceAccount) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.storageService.account].Field") switch name { case "id": return s.Id() @@ -6305,156 +7436,156 @@ func (s *mqlAzureStorageAccount) Field(name string) (interface{}, error) { case "dataProtection": return s.DataProtection() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.storage.account\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.storageService.account\" resource") } } // Id accessor autogenerated -func (s *mqlAzureStorageAccount) Id() (string, error) { +func (s *mqlAzureSubscriptionStorageServiceAccount) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.storage.account\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.storageService.account\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.storage.account\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.storageService.account\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Name accessor autogenerated -func (s *mqlAzureStorageAccount) Name() (string, error) { +func (s *mqlAzureSubscriptionStorageServiceAccount) Name() (string, error) { res, ok := s.Cache.Load("name") if !ok || !res.Valid { - return "", errors.New("\"azure.storage.account\" failed: no value provided for static field \"name\"") + return "", errors.New("\"azure.subscription.storageService.account\" failed: no value provided for static field \"name\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.storage.account\" failed to cast field \"name\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.storageService.account\" failed to cast field \"name\" to the right type (string): %#v", res) } return tres, nil } // Location accessor autogenerated -func (s *mqlAzureStorageAccount) Location() (string, error) { +func (s *mqlAzureSubscriptionStorageServiceAccount) Location() (string, error) { res, ok := s.Cache.Load("location") if !ok || !res.Valid { - return "", errors.New("\"azure.storage.account\" failed: no value provided for static field \"location\"") + return "", errors.New("\"azure.subscription.storageService.account\" failed: no value provided for static field \"location\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.storage.account\" failed to cast field \"location\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.storageService.account\" failed to cast field \"location\" to the right type (string): %#v", res) } return tres, nil } // Tags accessor autogenerated -func (s *mqlAzureStorageAccount) Tags() (map[string]interface{}, error) { +func (s *mqlAzureSubscriptionStorageServiceAccount) Tags() (map[string]interface{}, error) { res, ok := s.Cache.Load("tags") if !ok || !res.Valid { - return nil, errors.New("\"azure.storage.account\" failed: no value provided for static field \"tags\"") + return nil, errors.New("\"azure.subscription.storageService.account\" failed: no value provided for static field \"tags\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(map[string]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.storage.account\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.storageService.account\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) } return tres, nil } // Type accessor autogenerated -func (s *mqlAzureStorageAccount) Type() (string, error) { +func (s *mqlAzureSubscriptionStorageServiceAccount) Type() (string, error) { res, ok := s.Cache.Load("type") if !ok || !res.Valid { - return "", errors.New("\"azure.storage.account\" failed: no value provided for static field \"type\"") + return "", errors.New("\"azure.subscription.storageService.account\" failed: no value provided for static field \"type\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.storage.account\" failed to cast field \"type\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.storageService.account\" failed to cast field \"type\" to the right type (string): %#v", res) } return tres, nil } // Properties accessor autogenerated -func (s *mqlAzureStorageAccount) Properties() (interface{}, error) { +func (s *mqlAzureSubscriptionStorageServiceAccount) Properties() (interface{}, error) { res, ok := s.Cache.Load("properties") if !ok || !res.Valid { - return nil, errors.New("\"azure.storage.account\" failed: no value provided for static field \"properties\"") + return nil, errors.New("\"azure.subscription.storageService.account\" failed: no value provided for static field \"properties\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.storage.account\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.storageService.account\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) } return tres, nil } // Identity accessor autogenerated -func (s *mqlAzureStorageAccount) Identity() (interface{}, error) { +func (s *mqlAzureSubscriptionStorageServiceAccount) Identity() (interface{}, error) { res, ok := s.Cache.Load("identity") if !ok || !res.Valid { - return nil, errors.New("\"azure.storage.account\" failed: no value provided for static field \"identity\"") + return nil, errors.New("\"azure.subscription.storageService.account\" failed: no value provided for static field \"identity\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.storage.account\" failed to cast field \"identity\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.storageService.account\" failed to cast field \"identity\" to the right type (interface{}): %#v", res) } return tres, nil } // Sku accessor autogenerated -func (s *mqlAzureStorageAccount) Sku() (interface{}, error) { +func (s *mqlAzureSubscriptionStorageServiceAccount) Sku() (interface{}, error) { res, ok := s.Cache.Load("sku") if !ok || !res.Valid { - return nil, errors.New("\"azure.storage.account\" failed: no value provided for static field \"sku\"") + return nil, errors.New("\"azure.subscription.storageService.account\" failed: no value provided for static field \"sku\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.storage.account\" failed to cast field \"sku\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.storageService.account\" failed to cast field \"sku\" to the right type (interface{}): %#v", res) } return tres, nil } // Kind accessor autogenerated -func (s *mqlAzureStorageAccount) Kind() (string, error) { +func (s *mqlAzureSubscriptionStorageServiceAccount) Kind() (string, error) { res, ok := s.Cache.Load("kind") if !ok || !res.Valid { - return "", errors.New("\"azure.storage.account\" failed: no value provided for static field \"kind\"") + return "", errors.New("\"azure.subscription.storageService.account\" failed: no value provided for static field \"kind\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.storage.account\" failed to cast field \"kind\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.storageService.account\" failed to cast field \"kind\" to the right type (string): %#v", res) } return tres, nil } // Containers accessor autogenerated -func (s *mqlAzureStorageAccount) Containers() ([]interface{}, error) { +func (s *mqlAzureSubscriptionStorageServiceAccount) Containers() ([]interface{}, error) { res, ok := s.Cache.Load("containers") if !ok || !res.Valid { if err := s.ComputeContainers(); err != nil { @@ -6462,7 +7593,7 @@ func (s *mqlAzureStorageAccount) Containers() ([]interface{}, error) { } res, ok = s.Cache.Load("containers") if !ok { - return nil, errors.New("\"azure.storage.account\" calculated \"containers\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.storageService.account\" calculated \"containers\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "containers") } @@ -6471,13 +7602,13 @@ func (s *mqlAzureStorageAccount) Containers() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.storage.account\" failed to cast field \"containers\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.storageService.account\" failed to cast field \"containers\" to the right type ([]interface{}): %#v", res) } return tres, nil } // QueueProperties accessor autogenerated -func (s *mqlAzureStorageAccount) QueueProperties() (AzureStorageAccountQueueServiceProperties, error) { +func (s *mqlAzureSubscriptionStorageServiceAccount) QueueProperties() (AzureSubscriptionStorageServiceAccountQueueServiceProperties, error) { res, ok := s.Cache.Load("queueProperties") if !ok || !res.Valid { if err := s.ComputeQueueProperties(); err != nil { @@ -6485,22 +7616,22 @@ func (s *mqlAzureStorageAccount) QueueProperties() (AzureStorageAccountQueueServ } res, ok = s.Cache.Load("queueProperties") if !ok { - return nil, errors.New("\"azure.storage.account\" calculated \"queueProperties\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.storageService.account\" calculated \"queueProperties\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "queueProperties") } if res.Error != nil { return nil, res.Error } - tres, ok := res.Data.(AzureStorageAccountQueueServiceProperties) + tres, ok := res.Data.(AzureSubscriptionStorageServiceAccountQueueServiceProperties) if !ok { - return nil, fmt.Errorf("\"azure.storage.account\" failed to cast field \"queueProperties\" to the right type (AzureStorageAccountQueueServiceProperties): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.storageService.account\" failed to cast field \"queueProperties\" to the right type (AzureSubscriptionStorageServiceAccountQueueServiceProperties): %#v", res) } return tres, nil } // TableProperties accessor autogenerated -func (s *mqlAzureStorageAccount) TableProperties() (AzureStorageAccountTableServiceProperties, error) { +func (s *mqlAzureSubscriptionStorageServiceAccount) TableProperties() (AzureSubscriptionStorageServiceAccountTableServiceProperties, error) { res, ok := s.Cache.Load("tableProperties") if !ok || !res.Valid { if err := s.ComputeTableProperties(); err != nil { @@ -6508,22 +7639,22 @@ func (s *mqlAzureStorageAccount) TableProperties() (AzureStorageAccountTableServ } res, ok = s.Cache.Load("tableProperties") if !ok { - return nil, errors.New("\"azure.storage.account\" calculated \"tableProperties\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.storageService.account\" calculated \"tableProperties\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "tableProperties") } if res.Error != nil { return nil, res.Error } - tres, ok := res.Data.(AzureStorageAccountTableServiceProperties) + tres, ok := res.Data.(AzureSubscriptionStorageServiceAccountTableServiceProperties) if !ok { - return nil, fmt.Errorf("\"azure.storage.account\" failed to cast field \"tableProperties\" to the right type (AzureStorageAccountTableServiceProperties): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.storageService.account\" failed to cast field \"tableProperties\" to the right type (AzureSubscriptionStorageServiceAccountTableServiceProperties): %#v", res) } return tres, nil } // BlobProperties accessor autogenerated -func (s *mqlAzureStorageAccount) BlobProperties() (AzureStorageAccountBlobServiceProperties, error) { +func (s *mqlAzureSubscriptionStorageServiceAccount) BlobProperties() (AzureSubscriptionStorageServiceAccountBlobServiceProperties, error) { res, ok := s.Cache.Load("blobProperties") if !ok || !res.Valid { if err := s.ComputeBlobProperties(); err != nil { @@ -6531,22 +7662,22 @@ func (s *mqlAzureStorageAccount) BlobProperties() (AzureStorageAccountBlobServic } res, ok = s.Cache.Load("blobProperties") if !ok { - return nil, errors.New("\"azure.storage.account\" calculated \"blobProperties\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.storageService.account\" calculated \"blobProperties\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "blobProperties") } if res.Error != nil { return nil, res.Error } - tres, ok := res.Data.(AzureStorageAccountBlobServiceProperties) + tres, ok := res.Data.(AzureSubscriptionStorageServiceAccountBlobServiceProperties) if !ok { - return nil, fmt.Errorf("\"azure.storage.account\" failed to cast field \"blobProperties\" to the right type (AzureStorageAccountBlobServiceProperties): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.storageService.account\" failed to cast field \"blobProperties\" to the right type (AzureSubscriptionStorageServiceAccountBlobServiceProperties): %#v", res) } return tres, nil } // DataProtection accessor autogenerated -func (s *mqlAzureStorageAccount) DataProtection() (AzureStorageAccountDataProtection, error) { +func (s *mqlAzureSubscriptionStorageServiceAccount) DataProtection() (AzureSubscriptionStorageServiceAccountDataProtection, error) { res, ok := s.Cache.Load("dataProtection") if !ok || !res.Valid { if err := s.ComputeDataProtection(); err != nil { @@ -6554,23 +7685,23 @@ func (s *mqlAzureStorageAccount) DataProtection() (AzureStorageAccountDataProtec } res, ok = s.Cache.Load("dataProtection") if !ok { - return nil, errors.New("\"azure.storage.account\" calculated \"dataProtection\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.storageService.account\" calculated \"dataProtection\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "dataProtection") } if res.Error != nil { return nil, res.Error } - tres, ok := res.Data.(AzureStorageAccountDataProtection) + tres, ok := res.Data.(AzureSubscriptionStorageServiceAccountDataProtection) if !ok { - return nil, fmt.Errorf("\"azure.storage.account\" failed to cast field \"dataProtection\" to the right type (AzureStorageAccountDataProtection): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.storageService.account\" failed to cast field \"dataProtection\" to the right type (AzureSubscriptionStorageServiceAccountDataProtection): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureStorageAccount) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.storage.account].MqlCompute") +func (s *mqlAzureSubscriptionStorageServiceAccount) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.storageService.account].MqlCompute") switch name { case "id": return nil @@ -6601,12 +7732,12 @@ func (s *mqlAzureStorageAccount) MqlCompute(name string) error { case "dataProtection": return s.ComputeDataProtection() default: - return errors.New("Cannot find field '" + name + "' in \"azure.storage.account\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.storageService.account\" resource") } } // ComputeContainers computer autogenerated -func (s *mqlAzureStorageAccount) ComputeContainers() error { +func (s *mqlAzureSubscriptionStorageServiceAccount) ComputeContainers() error { var err error if _, ok := s.Cache.Load("containers"); ok { return nil @@ -6620,7 +7751,7 @@ func (s *mqlAzureStorageAccount) ComputeContainers() error { } // ComputeQueueProperties computer autogenerated -func (s *mqlAzureStorageAccount) ComputeQueueProperties() error { +func (s *mqlAzureSubscriptionStorageServiceAccount) ComputeQueueProperties() error { var err error if _, ok := s.Cache.Load("queueProperties"); ok { return nil @@ -6634,7 +7765,7 @@ func (s *mqlAzureStorageAccount) ComputeQueueProperties() error { } // ComputeTableProperties computer autogenerated -func (s *mqlAzureStorageAccount) ComputeTableProperties() error { +func (s *mqlAzureSubscriptionStorageServiceAccount) ComputeTableProperties() error { var err error if _, ok := s.Cache.Load("tableProperties"); ok { return nil @@ -6648,7 +7779,7 @@ func (s *mqlAzureStorageAccount) ComputeTableProperties() error { } // ComputeBlobProperties computer autogenerated -func (s *mqlAzureStorageAccount) ComputeBlobProperties() error { +func (s *mqlAzureSubscriptionStorageServiceAccount) ComputeBlobProperties() error { var err error if _, ok := s.Cache.Load("blobProperties"); ok { return nil @@ -6662,7 +7793,7 @@ func (s *mqlAzureStorageAccount) ComputeBlobProperties() error { } // ComputeDataProtection computer autogenerated -func (s *mqlAzureStorageAccount) ComputeDataProtection() error { +func (s *mqlAzureSubscriptionStorageServiceAccount) ComputeDataProtection() error { var err error if _, ok := s.Cache.Load("dataProtection"); ok { return nil @@ -6675,8 +7806,8 @@ func (s *mqlAzureStorageAccount) ComputeDataProtection() error { return nil } -// AzureStorageAccountDataProtection resource interface -type AzureStorageAccountDataProtection interface { +// AzureSubscriptionStorageServiceAccountDataProtection resource interface +type AzureSubscriptionStorageServiceAccountDataProtection interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -6689,21 +7820,21 @@ type AzureStorageAccountDataProtection interface { ContainerRetentionDays() (int64, error) } -// mqlAzureStorageAccountDataProtection for the azure.storage.account.dataProtection resource -type mqlAzureStorageAccountDataProtection struct { +// mqlAzureSubscriptionStorageServiceAccountDataProtection for the azure.subscription.storageService.account.dataProtection resource +type mqlAzureSubscriptionStorageServiceAccountDataProtection struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureStorageAccountDataProtection) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionStorageServiceAccountDataProtection) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.storage.account.dataProtection resource -func newAzureStorageAccountDataProtection(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.storageService.account.dataProtection resource +func newAzureSubscriptionStorageServiceAccountDataProtection(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureStorageAccountDataProtection{runtime.NewResource("azure.storage.account.dataProtection")} + res := mqlAzureSubscriptionStorageServiceAccountDataProtection{runtime.NewResource("azure.subscription.storageService.account.dataProtection")} // assign all named fields var id string @@ -6717,32 +7848,32 @@ func newAzureStorageAccountDataProtection(runtime *resources.Runtime, args *reso switch name { case "storageAccountId": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.dataProtection\", its \"storageAccountId\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.dataProtection\", its \"storageAccountId\" argument has the wrong type (expected type \"string\")") } case "blobSoftDeletionEnabled": if _, ok := val.(bool); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.dataProtection\", its \"blobSoftDeletionEnabled\" argument has the wrong type (expected type \"bool\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.dataProtection\", its \"blobSoftDeletionEnabled\" argument has the wrong type (expected type \"bool\")") } case "blobRetentionDays": if _, ok := val.(int64); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.dataProtection\", its \"blobRetentionDays\" argument has the wrong type (expected type \"int64\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.dataProtection\", its \"blobRetentionDays\" argument has the wrong type (expected type \"int64\")") } case "containerSoftDeletionEnabled": if _, ok := val.(bool); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.dataProtection\", its \"containerSoftDeletionEnabled\" argument has the wrong type (expected type \"bool\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.dataProtection\", its \"containerSoftDeletionEnabled\" argument has the wrong type (expected type \"bool\")") } case "containerRetentionDays": if _, ok := val.(int64); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.dataProtection\", its \"containerRetentionDays\" argument has the wrong type (expected type \"int64\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.dataProtection\", its \"containerRetentionDays\" argument has the wrong type (expected type \"int64\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.dataProtection\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.dataProtection\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.storage.account.dataProtection with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.storageService.account.dataProtection with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -6760,30 +7891,30 @@ func newAzureStorageAccountDataProtection(runtime *resources.Runtime, args *reso return &res, nil } -func (s *mqlAzureStorageAccountDataProtection) Validate() error { +func (s *mqlAzureSubscriptionStorageServiceAccountDataProtection) Validate() error { // required arguments if _, ok := s.Cache.Load("storageAccountId"); !ok { - return errors.New("Initialized \"azure.storage.account.dataProtection\" resource without a \"storageAccountId\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.dataProtection\" resource without a \"storageAccountId\". This field is required.") } if _, ok := s.Cache.Load("blobSoftDeletionEnabled"); !ok { - return errors.New("Initialized \"azure.storage.account.dataProtection\" resource without a \"blobSoftDeletionEnabled\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.dataProtection\" resource without a \"blobSoftDeletionEnabled\". This field is required.") } if _, ok := s.Cache.Load("blobRetentionDays"); !ok { - return errors.New("Initialized \"azure.storage.account.dataProtection\" resource without a \"blobRetentionDays\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.dataProtection\" resource without a \"blobRetentionDays\". This field is required.") } if _, ok := s.Cache.Load("containerSoftDeletionEnabled"); !ok { - return errors.New("Initialized \"azure.storage.account.dataProtection\" resource without a \"containerSoftDeletionEnabled\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.dataProtection\" resource without a \"containerSoftDeletionEnabled\". This field is required.") } if _, ok := s.Cache.Load("containerRetentionDays"); !ok { - return errors.New("Initialized \"azure.storage.account.dataProtection\" resource without a \"containerRetentionDays\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.dataProtection\" resource without a \"containerRetentionDays\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureStorageAccountDataProtection) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.storage.account.dataProtection].Register") +func (s *mqlAzureSubscriptionStorageServiceAccountDataProtection) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.storageService.account.dataProtection].Register") switch name { case "storageAccountId": return nil @@ -6796,13 +7927,13 @@ func (s *mqlAzureStorageAccountDataProtection) Register(name string) error { case "containerRetentionDays": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.storage.account.dataProtection\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.storageService.account.dataProtection\" resource") } } // Field accessor autogenerated -func (s *mqlAzureStorageAccountDataProtection) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.storage.account.dataProtection].Field") +func (s *mqlAzureSubscriptionStorageServiceAccountDataProtection) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.storageService.account.dataProtection].Field") switch name { case "storageAccountId": return s.StorageAccountId() @@ -6815,93 +7946,93 @@ func (s *mqlAzureStorageAccountDataProtection) Field(name string) (interface{}, case "containerRetentionDays": return s.ContainerRetentionDays() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.storage.account.dataProtection\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.storageService.account.dataProtection\" resource") } } // StorageAccountId accessor autogenerated -func (s *mqlAzureStorageAccountDataProtection) StorageAccountId() (string, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountDataProtection) StorageAccountId() (string, error) { res, ok := s.Cache.Load("storageAccountId") if !ok || !res.Valid { - return "", errors.New("\"azure.storage.account.dataProtection\" failed: no value provided for static field \"storageAccountId\"") + return "", errors.New("\"azure.subscription.storageService.account.dataProtection\" failed: no value provided for static field \"storageAccountId\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.storage.account.dataProtection\" failed to cast field \"storageAccountId\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.storageService.account.dataProtection\" failed to cast field \"storageAccountId\" to the right type (string): %#v", res) } return tres, nil } // BlobSoftDeletionEnabled accessor autogenerated -func (s *mqlAzureStorageAccountDataProtection) BlobSoftDeletionEnabled() (bool, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountDataProtection) BlobSoftDeletionEnabled() (bool, error) { res, ok := s.Cache.Load("blobSoftDeletionEnabled") if !ok || !res.Valid { - return false, errors.New("\"azure.storage.account.dataProtection\" failed: no value provided for static field \"blobSoftDeletionEnabled\"") + return false, errors.New("\"azure.subscription.storageService.account.dataProtection\" failed: no value provided for static field \"blobSoftDeletionEnabled\"") } if res.Error != nil { return false, res.Error } tres, ok := res.Data.(bool) if !ok { - return false, fmt.Errorf("\"azure.storage.account.dataProtection\" failed to cast field \"blobSoftDeletionEnabled\" to the right type (bool): %#v", res) + return false, fmt.Errorf("\"azure.subscription.storageService.account.dataProtection\" failed to cast field \"blobSoftDeletionEnabled\" to the right type (bool): %#v", res) } return tres, nil } // BlobRetentionDays accessor autogenerated -func (s *mqlAzureStorageAccountDataProtection) BlobRetentionDays() (int64, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountDataProtection) BlobRetentionDays() (int64, error) { res, ok := s.Cache.Load("blobRetentionDays") if !ok || !res.Valid { - return 0, errors.New("\"azure.storage.account.dataProtection\" failed: no value provided for static field \"blobRetentionDays\"") + return 0, errors.New("\"azure.subscription.storageService.account.dataProtection\" failed: no value provided for static field \"blobRetentionDays\"") } if res.Error != nil { return 0, res.Error } tres, ok := res.Data.(int64) if !ok { - return 0, fmt.Errorf("\"azure.storage.account.dataProtection\" failed to cast field \"blobRetentionDays\" to the right type (int64): %#v", res) + return 0, fmt.Errorf("\"azure.subscription.storageService.account.dataProtection\" failed to cast field \"blobRetentionDays\" to the right type (int64): %#v", res) } return tres, nil } // ContainerSoftDeletionEnabled accessor autogenerated -func (s *mqlAzureStorageAccountDataProtection) ContainerSoftDeletionEnabled() (bool, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountDataProtection) ContainerSoftDeletionEnabled() (bool, error) { res, ok := s.Cache.Load("containerSoftDeletionEnabled") if !ok || !res.Valid { - return false, errors.New("\"azure.storage.account.dataProtection\" failed: no value provided for static field \"containerSoftDeletionEnabled\"") + return false, errors.New("\"azure.subscription.storageService.account.dataProtection\" failed: no value provided for static field \"containerSoftDeletionEnabled\"") } if res.Error != nil { return false, res.Error } tres, ok := res.Data.(bool) if !ok { - return false, fmt.Errorf("\"azure.storage.account.dataProtection\" failed to cast field \"containerSoftDeletionEnabled\" to the right type (bool): %#v", res) + return false, fmt.Errorf("\"azure.subscription.storageService.account.dataProtection\" failed to cast field \"containerSoftDeletionEnabled\" to the right type (bool): %#v", res) } return tres, nil } // ContainerRetentionDays accessor autogenerated -func (s *mqlAzureStorageAccountDataProtection) ContainerRetentionDays() (int64, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountDataProtection) ContainerRetentionDays() (int64, error) { res, ok := s.Cache.Load("containerRetentionDays") if !ok || !res.Valid { - return 0, errors.New("\"azure.storage.account.dataProtection\" failed: no value provided for static field \"containerRetentionDays\"") + return 0, errors.New("\"azure.subscription.storageService.account.dataProtection\" failed: no value provided for static field \"containerRetentionDays\"") } if res.Error != nil { return 0, res.Error } tres, ok := res.Data.(int64) if !ok { - return 0, fmt.Errorf("\"azure.storage.account.dataProtection\" failed to cast field \"containerRetentionDays\" to the right type (int64): %#v", res) + return 0, fmt.Errorf("\"azure.subscription.storageService.account.dataProtection\" failed to cast field \"containerRetentionDays\" to the right type (int64): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureStorageAccountDataProtection) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.storage.account.dataProtection].MqlCompute") +func (s *mqlAzureSubscriptionStorageServiceAccountDataProtection) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.storageService.account.dataProtection].MqlCompute") switch name { case "storageAccountId": return nil @@ -6914,38 +8045,38 @@ func (s *mqlAzureStorageAccountDataProtection) MqlCompute(name string) error { case "containerRetentionDays": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.storage.account.dataProtection\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.storageService.account.dataProtection\" resource") } } -// AzureStorageAccountBlobServiceProperties resource interface -type AzureStorageAccountBlobServiceProperties interface { +// AzureSubscriptionStorageServiceAccountBlobServiceProperties resource interface +type AzureSubscriptionStorageServiceAccountBlobServiceProperties interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) Register(string) error Validate() error Id() (string, error) - HourMetrics() (AzureStorageAccountServicePropertiesMetrics, error) - MinuteMetrics() (AzureStorageAccountServicePropertiesMetrics, error) - Logging() (AzureStorageAccountServicePropertiesLogging, error) + HourMetrics() (AzureSubscriptionStorageServiceAccountServicePropertiesMetrics, error) + MinuteMetrics() (AzureSubscriptionStorageServiceAccountServicePropertiesMetrics, error) + Logging() (AzureSubscriptionStorageServiceAccountServicePropertiesLogging, error) } -// mqlAzureStorageAccountBlobServiceProperties for the azure.storage.account.blobService.properties resource -type mqlAzureStorageAccountBlobServiceProperties struct { +// mqlAzureSubscriptionStorageServiceAccountBlobServiceProperties for the azure.subscription.storageService.account.blobService.properties resource +type mqlAzureSubscriptionStorageServiceAccountBlobServiceProperties struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureStorageAccountBlobServiceProperties) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionStorageServiceAccountBlobServiceProperties) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.storage.account.blobService.properties resource -func newAzureStorageAccountBlobServiceProperties(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.storageService.account.blobService.properties resource +func newAzureSubscriptionStorageServiceAccountBlobServiceProperties(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureStorageAccountBlobServiceProperties{runtime.NewResource("azure.storage.account.blobService.properties")} + res := mqlAzureSubscriptionStorageServiceAccountBlobServiceProperties{runtime.NewResource("azure.subscription.storageService.account.blobService.properties")} // assign all named fields var id string @@ -6959,28 +8090,28 @@ func newAzureStorageAccountBlobServiceProperties(runtime *resources.Runtime, arg switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.blobService.properties\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.blobService.properties\", its \"id\" argument has the wrong type (expected type \"string\")") } case "hourMetrics": - if _, ok := val.(AzureStorageAccountServicePropertiesMetrics); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.blobService.properties\", its \"hourMetrics\" argument has the wrong type (expected type \"AzureStorageAccountServicePropertiesMetrics\")") + if _, ok := val.(AzureSubscriptionStorageServiceAccountServicePropertiesMetrics); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.blobService.properties\", its \"hourMetrics\" argument has the wrong type (expected type \"AzureSubscriptionStorageServiceAccountServicePropertiesMetrics\")") } case "minuteMetrics": - if _, ok := val.(AzureStorageAccountServicePropertiesMetrics); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.blobService.properties\", its \"minuteMetrics\" argument has the wrong type (expected type \"AzureStorageAccountServicePropertiesMetrics\")") + if _, ok := val.(AzureSubscriptionStorageServiceAccountServicePropertiesMetrics); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.blobService.properties\", its \"minuteMetrics\" argument has the wrong type (expected type \"AzureSubscriptionStorageServiceAccountServicePropertiesMetrics\")") } case "logging": - if _, ok := val.(AzureStorageAccountServicePropertiesLogging); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.blobService.properties\", its \"logging\" argument has the wrong type (expected type \"AzureStorageAccountServicePropertiesLogging\")") + if _, ok := val.(AzureSubscriptionStorageServiceAccountServicePropertiesLogging); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.blobService.properties\", its \"logging\" argument has the wrong type (expected type \"AzureSubscriptionStorageServiceAccountServicePropertiesLogging\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.blobService.properties\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.blobService.properties\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.storage.account.blobService.properties with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.storageService.account.blobService.properties with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -6998,27 +8129,27 @@ func newAzureStorageAccountBlobServiceProperties(runtime *resources.Runtime, arg return &res, nil } -func (s *mqlAzureStorageAccountBlobServiceProperties) Validate() error { +func (s *mqlAzureSubscriptionStorageServiceAccountBlobServiceProperties) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.storage.account.blobService.properties\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.blobService.properties\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("hourMetrics"); !ok { - return errors.New("Initialized \"azure.storage.account.blobService.properties\" resource without a \"hourMetrics\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.blobService.properties\" resource without a \"hourMetrics\". This field is required.") } if _, ok := s.Cache.Load("minuteMetrics"); !ok { - return errors.New("Initialized \"azure.storage.account.blobService.properties\" resource without a \"minuteMetrics\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.blobService.properties\" resource without a \"minuteMetrics\". This field is required.") } if _, ok := s.Cache.Load("logging"); !ok { - return errors.New("Initialized \"azure.storage.account.blobService.properties\" resource without a \"logging\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.blobService.properties\" resource without a \"logging\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureStorageAccountBlobServiceProperties) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.storage.account.blobService.properties].Register") +func (s *mqlAzureSubscriptionStorageServiceAccountBlobServiceProperties) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.storageService.account.blobService.properties].Register") switch name { case "id": return nil @@ -7029,13 +8160,13 @@ func (s *mqlAzureStorageAccountBlobServiceProperties) Register(name string) erro case "logging": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.storage.account.blobService.properties\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.storageService.account.blobService.properties\" resource") } } // Field accessor autogenerated -func (s *mqlAzureStorageAccountBlobServiceProperties) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.storage.account.blobService.properties].Field") +func (s *mqlAzureSubscriptionStorageServiceAccountBlobServiceProperties) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.storageService.account.blobService.properties].Field") switch name { case "id": return s.Id() @@ -7046,77 +8177,77 @@ func (s *mqlAzureStorageAccountBlobServiceProperties) Field(name string) (interf case "logging": return s.Logging() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.storage.account.blobService.properties\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.storageService.account.blobService.properties\" resource") } } // Id accessor autogenerated -func (s *mqlAzureStorageAccountBlobServiceProperties) Id() (string, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountBlobServiceProperties) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.storage.account.blobService.properties\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.storageService.account.blobService.properties\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.storage.account.blobService.properties\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.storageService.account.blobService.properties\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // HourMetrics accessor autogenerated -func (s *mqlAzureStorageAccountBlobServiceProperties) HourMetrics() (AzureStorageAccountServicePropertiesMetrics, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountBlobServiceProperties) HourMetrics() (AzureSubscriptionStorageServiceAccountServicePropertiesMetrics, error) { res, ok := s.Cache.Load("hourMetrics") if !ok || !res.Valid { - return nil, errors.New("\"azure.storage.account.blobService.properties\" failed: no value provided for static field \"hourMetrics\"") + return nil, errors.New("\"azure.subscription.storageService.account.blobService.properties\" failed: no value provided for static field \"hourMetrics\"") } if res.Error != nil { return nil, res.Error } - tres, ok := res.Data.(AzureStorageAccountServicePropertiesMetrics) + tres, ok := res.Data.(AzureSubscriptionStorageServiceAccountServicePropertiesMetrics) if !ok { - return nil, fmt.Errorf("\"azure.storage.account.blobService.properties\" failed to cast field \"hourMetrics\" to the right type (AzureStorageAccountServicePropertiesMetrics): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.storageService.account.blobService.properties\" failed to cast field \"hourMetrics\" to the right type (AzureSubscriptionStorageServiceAccountServicePropertiesMetrics): %#v", res) } return tres, nil } // MinuteMetrics accessor autogenerated -func (s *mqlAzureStorageAccountBlobServiceProperties) MinuteMetrics() (AzureStorageAccountServicePropertiesMetrics, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountBlobServiceProperties) MinuteMetrics() (AzureSubscriptionStorageServiceAccountServicePropertiesMetrics, error) { res, ok := s.Cache.Load("minuteMetrics") if !ok || !res.Valid { - return nil, errors.New("\"azure.storage.account.blobService.properties\" failed: no value provided for static field \"minuteMetrics\"") + return nil, errors.New("\"azure.subscription.storageService.account.blobService.properties\" failed: no value provided for static field \"minuteMetrics\"") } if res.Error != nil { return nil, res.Error } - tres, ok := res.Data.(AzureStorageAccountServicePropertiesMetrics) + tres, ok := res.Data.(AzureSubscriptionStorageServiceAccountServicePropertiesMetrics) if !ok { - return nil, fmt.Errorf("\"azure.storage.account.blobService.properties\" failed to cast field \"minuteMetrics\" to the right type (AzureStorageAccountServicePropertiesMetrics): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.storageService.account.blobService.properties\" failed to cast field \"minuteMetrics\" to the right type (AzureSubscriptionStorageServiceAccountServicePropertiesMetrics): %#v", res) } return tres, nil } // Logging accessor autogenerated -func (s *mqlAzureStorageAccountBlobServiceProperties) Logging() (AzureStorageAccountServicePropertiesLogging, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountBlobServiceProperties) Logging() (AzureSubscriptionStorageServiceAccountServicePropertiesLogging, error) { res, ok := s.Cache.Load("logging") if !ok || !res.Valid { - return nil, errors.New("\"azure.storage.account.blobService.properties\" failed: no value provided for static field \"logging\"") + return nil, errors.New("\"azure.subscription.storageService.account.blobService.properties\" failed: no value provided for static field \"logging\"") } if res.Error != nil { return nil, res.Error } - tres, ok := res.Data.(AzureStorageAccountServicePropertiesLogging) + tres, ok := res.Data.(AzureSubscriptionStorageServiceAccountServicePropertiesLogging) if !ok { - return nil, fmt.Errorf("\"azure.storage.account.blobService.properties\" failed to cast field \"logging\" to the right type (AzureStorageAccountServicePropertiesLogging): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.storageService.account.blobService.properties\" failed to cast field \"logging\" to the right type (AzureSubscriptionStorageServiceAccountServicePropertiesLogging): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureStorageAccountBlobServiceProperties) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.storage.account.blobService.properties].MqlCompute") +func (s *mqlAzureSubscriptionStorageServiceAccountBlobServiceProperties) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.storageService.account.blobService.properties].MqlCompute") switch name { case "id": return nil @@ -7127,38 +8258,38 @@ func (s *mqlAzureStorageAccountBlobServiceProperties) MqlCompute(name string) er case "logging": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.storage.account.blobService.properties\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.storageService.account.blobService.properties\" resource") } } -// AzureStorageAccountQueueServiceProperties resource interface -type AzureStorageAccountQueueServiceProperties interface { +// AzureSubscriptionStorageServiceAccountQueueServiceProperties resource interface +type AzureSubscriptionStorageServiceAccountQueueServiceProperties interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) Register(string) error Validate() error Id() (string, error) - HourMetrics() (AzureStorageAccountServicePropertiesMetrics, error) - MinuteMetrics() (AzureStorageAccountServicePropertiesMetrics, error) - Logging() (AzureStorageAccountServicePropertiesLogging, error) + HourMetrics() (AzureSubscriptionStorageServiceAccountServicePropertiesMetrics, error) + MinuteMetrics() (AzureSubscriptionStorageServiceAccountServicePropertiesMetrics, error) + Logging() (AzureSubscriptionStorageServiceAccountServicePropertiesLogging, error) } -// mqlAzureStorageAccountQueueServiceProperties for the azure.storage.account.queueService.properties resource -type mqlAzureStorageAccountQueueServiceProperties struct { +// mqlAzureSubscriptionStorageServiceAccountQueueServiceProperties for the azure.subscription.storageService.account.queueService.properties resource +type mqlAzureSubscriptionStorageServiceAccountQueueServiceProperties struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureStorageAccountQueueServiceProperties) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionStorageServiceAccountQueueServiceProperties) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.storage.account.queueService.properties resource -func newAzureStorageAccountQueueServiceProperties(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.storageService.account.queueService.properties resource +func newAzureSubscriptionStorageServiceAccountQueueServiceProperties(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureStorageAccountQueueServiceProperties{runtime.NewResource("azure.storage.account.queueService.properties")} + res := mqlAzureSubscriptionStorageServiceAccountQueueServiceProperties{runtime.NewResource("azure.subscription.storageService.account.queueService.properties")} // assign all named fields var id string @@ -7172,28 +8303,28 @@ func newAzureStorageAccountQueueServiceProperties(runtime *resources.Runtime, ar switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.queueService.properties\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.queueService.properties\", its \"id\" argument has the wrong type (expected type \"string\")") } case "hourMetrics": - if _, ok := val.(AzureStorageAccountServicePropertiesMetrics); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.queueService.properties\", its \"hourMetrics\" argument has the wrong type (expected type \"AzureStorageAccountServicePropertiesMetrics\")") + if _, ok := val.(AzureSubscriptionStorageServiceAccountServicePropertiesMetrics); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.queueService.properties\", its \"hourMetrics\" argument has the wrong type (expected type \"AzureSubscriptionStorageServiceAccountServicePropertiesMetrics\")") } case "minuteMetrics": - if _, ok := val.(AzureStorageAccountServicePropertiesMetrics); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.queueService.properties\", its \"minuteMetrics\" argument has the wrong type (expected type \"AzureStorageAccountServicePropertiesMetrics\")") + if _, ok := val.(AzureSubscriptionStorageServiceAccountServicePropertiesMetrics); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.queueService.properties\", its \"minuteMetrics\" argument has the wrong type (expected type \"AzureSubscriptionStorageServiceAccountServicePropertiesMetrics\")") } case "logging": - if _, ok := val.(AzureStorageAccountServicePropertiesLogging); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.queueService.properties\", its \"logging\" argument has the wrong type (expected type \"AzureStorageAccountServicePropertiesLogging\")") + if _, ok := val.(AzureSubscriptionStorageServiceAccountServicePropertiesLogging); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.queueService.properties\", its \"logging\" argument has the wrong type (expected type \"AzureSubscriptionStorageServiceAccountServicePropertiesLogging\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.queueService.properties\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.queueService.properties\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.storage.account.queueService.properties with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.storageService.account.queueService.properties with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -7211,27 +8342,27 @@ func newAzureStorageAccountQueueServiceProperties(runtime *resources.Runtime, ar return &res, nil } -func (s *mqlAzureStorageAccountQueueServiceProperties) Validate() error { +func (s *mqlAzureSubscriptionStorageServiceAccountQueueServiceProperties) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.storage.account.queueService.properties\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.queueService.properties\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("hourMetrics"); !ok { - return errors.New("Initialized \"azure.storage.account.queueService.properties\" resource without a \"hourMetrics\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.queueService.properties\" resource without a \"hourMetrics\". This field is required.") } if _, ok := s.Cache.Load("minuteMetrics"); !ok { - return errors.New("Initialized \"azure.storage.account.queueService.properties\" resource without a \"minuteMetrics\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.queueService.properties\" resource without a \"minuteMetrics\". This field is required.") } if _, ok := s.Cache.Load("logging"); !ok { - return errors.New("Initialized \"azure.storage.account.queueService.properties\" resource without a \"logging\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.queueService.properties\" resource without a \"logging\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureStorageAccountQueueServiceProperties) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.storage.account.queueService.properties].Register") +func (s *mqlAzureSubscriptionStorageServiceAccountQueueServiceProperties) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.storageService.account.queueService.properties].Register") switch name { case "id": return nil @@ -7242,13 +8373,13 @@ func (s *mqlAzureStorageAccountQueueServiceProperties) Register(name string) err case "logging": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.storage.account.queueService.properties\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.storageService.account.queueService.properties\" resource") } } // Field accessor autogenerated -func (s *mqlAzureStorageAccountQueueServiceProperties) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.storage.account.queueService.properties].Field") +func (s *mqlAzureSubscriptionStorageServiceAccountQueueServiceProperties) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.storageService.account.queueService.properties].Field") switch name { case "id": return s.Id() @@ -7259,77 +8390,77 @@ func (s *mqlAzureStorageAccountQueueServiceProperties) Field(name string) (inter case "logging": return s.Logging() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.storage.account.queueService.properties\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.storageService.account.queueService.properties\" resource") } } // Id accessor autogenerated -func (s *mqlAzureStorageAccountQueueServiceProperties) Id() (string, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountQueueServiceProperties) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.storage.account.queueService.properties\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.storageService.account.queueService.properties\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.storage.account.queueService.properties\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.storageService.account.queueService.properties\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // HourMetrics accessor autogenerated -func (s *mqlAzureStorageAccountQueueServiceProperties) HourMetrics() (AzureStorageAccountServicePropertiesMetrics, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountQueueServiceProperties) HourMetrics() (AzureSubscriptionStorageServiceAccountServicePropertiesMetrics, error) { res, ok := s.Cache.Load("hourMetrics") if !ok || !res.Valid { - return nil, errors.New("\"azure.storage.account.queueService.properties\" failed: no value provided for static field \"hourMetrics\"") + return nil, errors.New("\"azure.subscription.storageService.account.queueService.properties\" failed: no value provided for static field \"hourMetrics\"") } if res.Error != nil { return nil, res.Error } - tres, ok := res.Data.(AzureStorageAccountServicePropertiesMetrics) + tres, ok := res.Data.(AzureSubscriptionStorageServiceAccountServicePropertiesMetrics) if !ok { - return nil, fmt.Errorf("\"azure.storage.account.queueService.properties\" failed to cast field \"hourMetrics\" to the right type (AzureStorageAccountServicePropertiesMetrics): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.storageService.account.queueService.properties\" failed to cast field \"hourMetrics\" to the right type (AzureSubscriptionStorageServiceAccountServicePropertiesMetrics): %#v", res) } return tres, nil } // MinuteMetrics accessor autogenerated -func (s *mqlAzureStorageAccountQueueServiceProperties) MinuteMetrics() (AzureStorageAccountServicePropertiesMetrics, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountQueueServiceProperties) MinuteMetrics() (AzureSubscriptionStorageServiceAccountServicePropertiesMetrics, error) { res, ok := s.Cache.Load("minuteMetrics") if !ok || !res.Valid { - return nil, errors.New("\"azure.storage.account.queueService.properties\" failed: no value provided for static field \"minuteMetrics\"") + return nil, errors.New("\"azure.subscription.storageService.account.queueService.properties\" failed: no value provided for static field \"minuteMetrics\"") } if res.Error != nil { return nil, res.Error } - tres, ok := res.Data.(AzureStorageAccountServicePropertiesMetrics) + tres, ok := res.Data.(AzureSubscriptionStorageServiceAccountServicePropertiesMetrics) if !ok { - return nil, fmt.Errorf("\"azure.storage.account.queueService.properties\" failed to cast field \"minuteMetrics\" to the right type (AzureStorageAccountServicePropertiesMetrics): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.storageService.account.queueService.properties\" failed to cast field \"minuteMetrics\" to the right type (AzureSubscriptionStorageServiceAccountServicePropertiesMetrics): %#v", res) } return tres, nil } // Logging accessor autogenerated -func (s *mqlAzureStorageAccountQueueServiceProperties) Logging() (AzureStorageAccountServicePropertiesLogging, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountQueueServiceProperties) Logging() (AzureSubscriptionStorageServiceAccountServicePropertiesLogging, error) { res, ok := s.Cache.Load("logging") if !ok || !res.Valid { - return nil, errors.New("\"azure.storage.account.queueService.properties\" failed: no value provided for static field \"logging\"") + return nil, errors.New("\"azure.subscription.storageService.account.queueService.properties\" failed: no value provided for static field \"logging\"") } if res.Error != nil { return nil, res.Error } - tres, ok := res.Data.(AzureStorageAccountServicePropertiesLogging) + tres, ok := res.Data.(AzureSubscriptionStorageServiceAccountServicePropertiesLogging) if !ok { - return nil, fmt.Errorf("\"azure.storage.account.queueService.properties\" failed to cast field \"logging\" to the right type (AzureStorageAccountServicePropertiesLogging): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.storageService.account.queueService.properties\" failed to cast field \"logging\" to the right type (AzureSubscriptionStorageServiceAccountServicePropertiesLogging): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureStorageAccountQueueServiceProperties) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.storage.account.queueService.properties].MqlCompute") +func (s *mqlAzureSubscriptionStorageServiceAccountQueueServiceProperties) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.storageService.account.queueService.properties].MqlCompute") switch name { case "id": return nil @@ -7340,38 +8471,38 @@ func (s *mqlAzureStorageAccountQueueServiceProperties) MqlCompute(name string) e case "logging": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.storage.account.queueService.properties\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.storageService.account.queueService.properties\" resource") } } -// AzureStorageAccountTableServiceProperties resource interface -type AzureStorageAccountTableServiceProperties interface { +// AzureSubscriptionStorageServiceAccountTableServiceProperties resource interface +type AzureSubscriptionStorageServiceAccountTableServiceProperties interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) Register(string) error Validate() error Id() (string, error) - HourMetrics() (AzureStorageAccountServicePropertiesMetrics, error) - MinuteMetrics() (AzureStorageAccountServicePropertiesMetrics, error) - Logging() (AzureStorageAccountServicePropertiesLogging, error) + HourMetrics() (AzureSubscriptionStorageServiceAccountServicePropertiesMetrics, error) + MinuteMetrics() (AzureSubscriptionStorageServiceAccountServicePropertiesMetrics, error) + Logging() (AzureSubscriptionStorageServiceAccountServicePropertiesLogging, error) } -// mqlAzureStorageAccountTableServiceProperties for the azure.storage.account.tableService.properties resource -type mqlAzureStorageAccountTableServiceProperties struct { +// mqlAzureSubscriptionStorageServiceAccountTableServiceProperties for the azure.subscription.storageService.account.tableService.properties resource +type mqlAzureSubscriptionStorageServiceAccountTableServiceProperties struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureStorageAccountTableServiceProperties) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionStorageServiceAccountTableServiceProperties) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.storage.account.tableService.properties resource -func newAzureStorageAccountTableServiceProperties(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.storageService.account.tableService.properties resource +func newAzureSubscriptionStorageServiceAccountTableServiceProperties(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureStorageAccountTableServiceProperties{runtime.NewResource("azure.storage.account.tableService.properties")} + res := mqlAzureSubscriptionStorageServiceAccountTableServiceProperties{runtime.NewResource("azure.subscription.storageService.account.tableService.properties")} // assign all named fields var id string @@ -7385,28 +8516,28 @@ func newAzureStorageAccountTableServiceProperties(runtime *resources.Runtime, ar switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.tableService.properties\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.tableService.properties\", its \"id\" argument has the wrong type (expected type \"string\")") } case "hourMetrics": - if _, ok := val.(AzureStorageAccountServicePropertiesMetrics); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.tableService.properties\", its \"hourMetrics\" argument has the wrong type (expected type \"AzureStorageAccountServicePropertiesMetrics\")") + if _, ok := val.(AzureSubscriptionStorageServiceAccountServicePropertiesMetrics); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.tableService.properties\", its \"hourMetrics\" argument has the wrong type (expected type \"AzureSubscriptionStorageServiceAccountServicePropertiesMetrics\")") } case "minuteMetrics": - if _, ok := val.(AzureStorageAccountServicePropertiesMetrics); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.tableService.properties\", its \"minuteMetrics\" argument has the wrong type (expected type \"AzureStorageAccountServicePropertiesMetrics\")") + if _, ok := val.(AzureSubscriptionStorageServiceAccountServicePropertiesMetrics); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.tableService.properties\", its \"minuteMetrics\" argument has the wrong type (expected type \"AzureSubscriptionStorageServiceAccountServicePropertiesMetrics\")") } case "logging": - if _, ok := val.(AzureStorageAccountServicePropertiesLogging); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.tableService.properties\", its \"logging\" argument has the wrong type (expected type \"AzureStorageAccountServicePropertiesLogging\")") + if _, ok := val.(AzureSubscriptionStorageServiceAccountServicePropertiesLogging); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.tableService.properties\", its \"logging\" argument has the wrong type (expected type \"AzureSubscriptionStorageServiceAccountServicePropertiesLogging\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.tableService.properties\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.tableService.properties\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.storage.account.tableService.properties with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.storageService.account.tableService.properties with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -7424,27 +8555,27 @@ func newAzureStorageAccountTableServiceProperties(runtime *resources.Runtime, ar return &res, nil } -func (s *mqlAzureStorageAccountTableServiceProperties) Validate() error { +func (s *mqlAzureSubscriptionStorageServiceAccountTableServiceProperties) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.storage.account.tableService.properties\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.tableService.properties\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("hourMetrics"); !ok { - return errors.New("Initialized \"azure.storage.account.tableService.properties\" resource without a \"hourMetrics\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.tableService.properties\" resource without a \"hourMetrics\". This field is required.") } if _, ok := s.Cache.Load("minuteMetrics"); !ok { - return errors.New("Initialized \"azure.storage.account.tableService.properties\" resource without a \"minuteMetrics\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.tableService.properties\" resource without a \"minuteMetrics\". This field is required.") } if _, ok := s.Cache.Load("logging"); !ok { - return errors.New("Initialized \"azure.storage.account.tableService.properties\" resource without a \"logging\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.tableService.properties\" resource without a \"logging\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureStorageAccountTableServiceProperties) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.storage.account.tableService.properties].Register") +func (s *mqlAzureSubscriptionStorageServiceAccountTableServiceProperties) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.storageService.account.tableService.properties].Register") switch name { case "id": return nil @@ -7455,13 +8586,13 @@ func (s *mqlAzureStorageAccountTableServiceProperties) Register(name string) err case "logging": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.storage.account.tableService.properties\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.storageService.account.tableService.properties\" resource") } } // Field accessor autogenerated -func (s *mqlAzureStorageAccountTableServiceProperties) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.storage.account.tableService.properties].Field") +func (s *mqlAzureSubscriptionStorageServiceAccountTableServiceProperties) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.storageService.account.tableService.properties].Field") switch name { case "id": return s.Id() @@ -7472,77 +8603,77 @@ func (s *mqlAzureStorageAccountTableServiceProperties) Field(name string) (inter case "logging": return s.Logging() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.storage.account.tableService.properties\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.storageService.account.tableService.properties\" resource") } } // Id accessor autogenerated -func (s *mqlAzureStorageAccountTableServiceProperties) Id() (string, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountTableServiceProperties) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.storage.account.tableService.properties\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.storageService.account.tableService.properties\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.storage.account.tableService.properties\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.storageService.account.tableService.properties\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // HourMetrics accessor autogenerated -func (s *mqlAzureStorageAccountTableServiceProperties) HourMetrics() (AzureStorageAccountServicePropertiesMetrics, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountTableServiceProperties) HourMetrics() (AzureSubscriptionStorageServiceAccountServicePropertiesMetrics, error) { res, ok := s.Cache.Load("hourMetrics") if !ok || !res.Valid { - return nil, errors.New("\"azure.storage.account.tableService.properties\" failed: no value provided for static field \"hourMetrics\"") + return nil, errors.New("\"azure.subscription.storageService.account.tableService.properties\" failed: no value provided for static field \"hourMetrics\"") } if res.Error != nil { return nil, res.Error } - tres, ok := res.Data.(AzureStorageAccountServicePropertiesMetrics) + tres, ok := res.Data.(AzureSubscriptionStorageServiceAccountServicePropertiesMetrics) if !ok { - return nil, fmt.Errorf("\"azure.storage.account.tableService.properties\" failed to cast field \"hourMetrics\" to the right type (AzureStorageAccountServicePropertiesMetrics): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.storageService.account.tableService.properties\" failed to cast field \"hourMetrics\" to the right type (AzureSubscriptionStorageServiceAccountServicePropertiesMetrics): %#v", res) } return tres, nil } // MinuteMetrics accessor autogenerated -func (s *mqlAzureStorageAccountTableServiceProperties) MinuteMetrics() (AzureStorageAccountServicePropertiesMetrics, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountTableServiceProperties) MinuteMetrics() (AzureSubscriptionStorageServiceAccountServicePropertiesMetrics, error) { res, ok := s.Cache.Load("minuteMetrics") if !ok || !res.Valid { - return nil, errors.New("\"azure.storage.account.tableService.properties\" failed: no value provided for static field \"minuteMetrics\"") + return nil, errors.New("\"azure.subscription.storageService.account.tableService.properties\" failed: no value provided for static field \"minuteMetrics\"") } if res.Error != nil { return nil, res.Error } - tres, ok := res.Data.(AzureStorageAccountServicePropertiesMetrics) + tres, ok := res.Data.(AzureSubscriptionStorageServiceAccountServicePropertiesMetrics) if !ok { - return nil, fmt.Errorf("\"azure.storage.account.tableService.properties\" failed to cast field \"minuteMetrics\" to the right type (AzureStorageAccountServicePropertiesMetrics): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.storageService.account.tableService.properties\" failed to cast field \"minuteMetrics\" to the right type (AzureSubscriptionStorageServiceAccountServicePropertiesMetrics): %#v", res) } return tres, nil } // Logging accessor autogenerated -func (s *mqlAzureStorageAccountTableServiceProperties) Logging() (AzureStorageAccountServicePropertiesLogging, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountTableServiceProperties) Logging() (AzureSubscriptionStorageServiceAccountServicePropertiesLogging, error) { res, ok := s.Cache.Load("logging") if !ok || !res.Valid { - return nil, errors.New("\"azure.storage.account.tableService.properties\" failed: no value provided for static field \"logging\"") + return nil, errors.New("\"azure.subscription.storageService.account.tableService.properties\" failed: no value provided for static field \"logging\"") } if res.Error != nil { return nil, res.Error } - tres, ok := res.Data.(AzureStorageAccountServicePropertiesLogging) + tres, ok := res.Data.(AzureSubscriptionStorageServiceAccountServicePropertiesLogging) if !ok { - return nil, fmt.Errorf("\"azure.storage.account.tableService.properties\" failed to cast field \"logging\" to the right type (AzureStorageAccountServicePropertiesLogging): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.storageService.account.tableService.properties\" failed to cast field \"logging\" to the right type (AzureSubscriptionStorageServiceAccountServicePropertiesLogging): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureStorageAccountTableServiceProperties) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.storage.account.tableService.properties].MqlCompute") +func (s *mqlAzureSubscriptionStorageServiceAccountTableServiceProperties) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.storageService.account.tableService.properties].MqlCompute") switch name { case "id": return nil @@ -7553,12 +8684,12 @@ func (s *mqlAzureStorageAccountTableServiceProperties) MqlCompute(name string) e case "logging": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.storage.account.tableService.properties\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.storageService.account.tableService.properties\" resource") } } -// AzureStorageAccountServicePropertiesMetrics resource interface -type AzureStorageAccountServicePropertiesMetrics interface { +// AzureSubscriptionStorageServiceAccountServicePropertiesMetrics resource interface +type AzureSubscriptionStorageServiceAccountServicePropertiesMetrics interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -7566,26 +8697,26 @@ type AzureStorageAccountServicePropertiesMetrics interface { Validate() error Id() (string, error) IncludeAPIs() (bool, error) - RetentionPolicy() (AzureStorageAccountServicePropertiesRetentionPolicy, error) + RetentionPolicy() (AzureSubscriptionStorageServiceAccountServicePropertiesRetentionPolicy, error) Enabled() (bool, error) Version() (string, error) } -// mqlAzureStorageAccountServicePropertiesMetrics for the azure.storage.account.service.properties.metrics resource -type mqlAzureStorageAccountServicePropertiesMetrics struct { +// mqlAzureSubscriptionStorageServiceAccountServicePropertiesMetrics for the azure.subscription.storageService.account.service.properties.metrics resource +type mqlAzureSubscriptionStorageServiceAccountServicePropertiesMetrics struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureStorageAccountServicePropertiesMetrics) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionStorageServiceAccountServicePropertiesMetrics) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.storage.account.service.properties.metrics resource -func newAzureStorageAccountServicePropertiesMetrics(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.storageService.account.service.properties.metrics resource +func newAzureSubscriptionStorageServiceAccountServicePropertiesMetrics(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureStorageAccountServicePropertiesMetrics{runtime.NewResource("azure.storage.account.service.properties.metrics")} + res := mqlAzureSubscriptionStorageServiceAccountServicePropertiesMetrics{runtime.NewResource("azure.subscription.storageService.account.service.properties.metrics")} // assign all named fields var id string @@ -7599,32 +8730,32 @@ func newAzureStorageAccountServicePropertiesMetrics(runtime *resources.Runtime, switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.service.properties.metrics\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.service.properties.metrics\", its \"id\" argument has the wrong type (expected type \"string\")") } case "includeAPIs": if _, ok := val.(bool); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.service.properties.metrics\", its \"includeAPIs\" argument has the wrong type (expected type \"bool\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.service.properties.metrics\", its \"includeAPIs\" argument has the wrong type (expected type \"bool\")") } case "retentionPolicy": - if _, ok := val.(AzureStorageAccountServicePropertiesRetentionPolicy); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.service.properties.metrics\", its \"retentionPolicy\" argument has the wrong type (expected type \"AzureStorageAccountServicePropertiesRetentionPolicy\")") + if _, ok := val.(AzureSubscriptionStorageServiceAccountServicePropertiesRetentionPolicy); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.service.properties.metrics\", its \"retentionPolicy\" argument has the wrong type (expected type \"AzureSubscriptionStorageServiceAccountServicePropertiesRetentionPolicy\")") } case "enabled": if _, ok := val.(bool); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.service.properties.metrics\", its \"enabled\" argument has the wrong type (expected type \"bool\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.service.properties.metrics\", its \"enabled\" argument has the wrong type (expected type \"bool\")") } case "version": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.service.properties.metrics\", its \"version\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.service.properties.metrics\", its \"version\" argument has the wrong type (expected type \"string\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.service.properties.metrics\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.service.properties.metrics\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.storage.account.service.properties.metrics with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.storageService.account.service.properties.metrics with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -7642,30 +8773,30 @@ func newAzureStorageAccountServicePropertiesMetrics(runtime *resources.Runtime, return &res, nil } -func (s *mqlAzureStorageAccountServicePropertiesMetrics) Validate() error { +func (s *mqlAzureSubscriptionStorageServiceAccountServicePropertiesMetrics) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.storage.account.service.properties.metrics\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.service.properties.metrics\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("includeAPIs"); !ok { - return errors.New("Initialized \"azure.storage.account.service.properties.metrics\" resource without a \"includeAPIs\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.service.properties.metrics\" resource without a \"includeAPIs\". This field is required.") } if _, ok := s.Cache.Load("retentionPolicy"); !ok { - return errors.New("Initialized \"azure.storage.account.service.properties.metrics\" resource without a \"retentionPolicy\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.service.properties.metrics\" resource without a \"retentionPolicy\". This field is required.") } if _, ok := s.Cache.Load("enabled"); !ok { - return errors.New("Initialized \"azure.storage.account.service.properties.metrics\" resource without a \"enabled\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.service.properties.metrics\" resource without a \"enabled\". This field is required.") } if _, ok := s.Cache.Load("version"); !ok { - return errors.New("Initialized \"azure.storage.account.service.properties.metrics\" resource without a \"version\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.service.properties.metrics\" resource without a \"version\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureStorageAccountServicePropertiesMetrics) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.storage.account.service.properties.metrics].Register") +func (s *mqlAzureSubscriptionStorageServiceAccountServicePropertiesMetrics) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.storageService.account.service.properties.metrics].Register") switch name { case "id": return nil @@ -7678,13 +8809,13 @@ func (s *mqlAzureStorageAccountServicePropertiesMetrics) Register(name string) e case "version": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.storage.account.service.properties.metrics\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.storageService.account.service.properties.metrics\" resource") } } // Field accessor autogenerated -func (s *mqlAzureStorageAccountServicePropertiesMetrics) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.storage.account.service.properties.metrics].Field") +func (s *mqlAzureSubscriptionStorageServiceAccountServicePropertiesMetrics) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.storageService.account.service.properties.metrics].Field") switch name { case "id": return s.Id() @@ -7697,93 +8828,93 @@ func (s *mqlAzureStorageAccountServicePropertiesMetrics) Field(name string) (int case "version": return s.Version() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.storage.account.service.properties.metrics\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.storageService.account.service.properties.metrics\" resource") } } // Id accessor autogenerated -func (s *mqlAzureStorageAccountServicePropertiesMetrics) Id() (string, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountServicePropertiesMetrics) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.storage.account.service.properties.metrics\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.storageService.account.service.properties.metrics\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.storage.account.service.properties.metrics\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.storageService.account.service.properties.metrics\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // IncludeAPIs accessor autogenerated -func (s *mqlAzureStorageAccountServicePropertiesMetrics) IncludeAPIs() (bool, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountServicePropertiesMetrics) IncludeAPIs() (bool, error) { res, ok := s.Cache.Load("includeAPIs") if !ok || !res.Valid { - return false, errors.New("\"azure.storage.account.service.properties.metrics\" failed: no value provided for static field \"includeAPIs\"") + return false, errors.New("\"azure.subscription.storageService.account.service.properties.metrics\" failed: no value provided for static field \"includeAPIs\"") } if res.Error != nil { return false, res.Error } tres, ok := res.Data.(bool) if !ok { - return false, fmt.Errorf("\"azure.storage.account.service.properties.metrics\" failed to cast field \"includeAPIs\" to the right type (bool): %#v", res) + return false, fmt.Errorf("\"azure.subscription.storageService.account.service.properties.metrics\" failed to cast field \"includeAPIs\" to the right type (bool): %#v", res) } return tres, nil } // RetentionPolicy accessor autogenerated -func (s *mqlAzureStorageAccountServicePropertiesMetrics) RetentionPolicy() (AzureStorageAccountServicePropertiesRetentionPolicy, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountServicePropertiesMetrics) RetentionPolicy() (AzureSubscriptionStorageServiceAccountServicePropertiesRetentionPolicy, error) { res, ok := s.Cache.Load("retentionPolicy") if !ok || !res.Valid { - return nil, errors.New("\"azure.storage.account.service.properties.metrics\" failed: no value provided for static field \"retentionPolicy\"") + return nil, errors.New("\"azure.subscription.storageService.account.service.properties.metrics\" failed: no value provided for static field \"retentionPolicy\"") } if res.Error != nil { return nil, res.Error } - tres, ok := res.Data.(AzureStorageAccountServicePropertiesRetentionPolicy) + tres, ok := res.Data.(AzureSubscriptionStorageServiceAccountServicePropertiesRetentionPolicy) if !ok { - return nil, fmt.Errorf("\"azure.storage.account.service.properties.metrics\" failed to cast field \"retentionPolicy\" to the right type (AzureStorageAccountServicePropertiesRetentionPolicy): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.storageService.account.service.properties.metrics\" failed to cast field \"retentionPolicy\" to the right type (AzureSubscriptionStorageServiceAccountServicePropertiesRetentionPolicy): %#v", res) } return tres, nil } // Enabled accessor autogenerated -func (s *mqlAzureStorageAccountServicePropertiesMetrics) Enabled() (bool, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountServicePropertiesMetrics) Enabled() (bool, error) { res, ok := s.Cache.Load("enabled") if !ok || !res.Valid { - return false, errors.New("\"azure.storage.account.service.properties.metrics\" failed: no value provided for static field \"enabled\"") + return false, errors.New("\"azure.subscription.storageService.account.service.properties.metrics\" failed: no value provided for static field \"enabled\"") } if res.Error != nil { return false, res.Error } tres, ok := res.Data.(bool) if !ok { - return false, fmt.Errorf("\"azure.storage.account.service.properties.metrics\" failed to cast field \"enabled\" to the right type (bool): %#v", res) + return false, fmt.Errorf("\"azure.subscription.storageService.account.service.properties.metrics\" failed to cast field \"enabled\" to the right type (bool): %#v", res) } return tres, nil } // Version accessor autogenerated -func (s *mqlAzureStorageAccountServicePropertiesMetrics) Version() (string, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountServicePropertiesMetrics) Version() (string, error) { res, ok := s.Cache.Load("version") if !ok || !res.Valid { - return "", errors.New("\"azure.storage.account.service.properties.metrics\" failed: no value provided for static field \"version\"") + return "", errors.New("\"azure.subscription.storageService.account.service.properties.metrics\" failed: no value provided for static field \"version\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.storage.account.service.properties.metrics\" failed to cast field \"version\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.storageService.account.service.properties.metrics\" failed to cast field \"version\" to the right type (string): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureStorageAccountServicePropertiesMetrics) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.storage.account.service.properties.metrics].MqlCompute") +func (s *mqlAzureSubscriptionStorageServiceAccountServicePropertiesMetrics) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.storageService.account.service.properties.metrics].MqlCompute") switch name { case "id": return nil @@ -7796,12 +8927,12 @@ func (s *mqlAzureStorageAccountServicePropertiesMetrics) MqlCompute(name string) case "version": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.storage.account.service.properties.metrics\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.storageService.account.service.properties.metrics\" resource") } } -// AzureStorageAccountServicePropertiesRetentionPolicy resource interface -type AzureStorageAccountServicePropertiesRetentionPolicy interface { +// AzureSubscriptionStorageServiceAccountServicePropertiesRetentionPolicy resource interface +type AzureSubscriptionStorageServiceAccountServicePropertiesRetentionPolicy interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -7812,21 +8943,21 @@ type AzureStorageAccountServicePropertiesRetentionPolicy interface { Enabled() (bool, error) } -// mqlAzureStorageAccountServicePropertiesRetentionPolicy for the azure.storage.account.service.properties.retentionPolicy resource -type mqlAzureStorageAccountServicePropertiesRetentionPolicy struct { +// mqlAzureSubscriptionStorageServiceAccountServicePropertiesRetentionPolicy for the azure.subscription.storageService.account.service.properties.retentionPolicy resource +type mqlAzureSubscriptionStorageServiceAccountServicePropertiesRetentionPolicy struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureStorageAccountServicePropertiesRetentionPolicy) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionStorageServiceAccountServicePropertiesRetentionPolicy) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.storage.account.service.properties.retentionPolicy resource -func newAzureStorageAccountServicePropertiesRetentionPolicy(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.storageService.account.service.properties.retentionPolicy resource +func newAzureSubscriptionStorageServiceAccountServicePropertiesRetentionPolicy(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureStorageAccountServicePropertiesRetentionPolicy{runtime.NewResource("azure.storage.account.service.properties.retentionPolicy")} + res := mqlAzureSubscriptionStorageServiceAccountServicePropertiesRetentionPolicy{runtime.NewResource("azure.subscription.storageService.account.service.properties.retentionPolicy")} // assign all named fields var id string @@ -7840,24 +8971,24 @@ func newAzureStorageAccountServicePropertiesRetentionPolicy(runtime *resources.R switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.service.properties.retentionPolicy\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.service.properties.retentionPolicy\", its \"id\" argument has the wrong type (expected type \"string\")") } case "retentionDays": if _, ok := val.(int64); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.service.properties.retentionPolicy\", its \"retentionDays\" argument has the wrong type (expected type \"int64\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.service.properties.retentionPolicy\", its \"retentionDays\" argument has the wrong type (expected type \"int64\")") } case "enabled": if _, ok := val.(bool); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.service.properties.retentionPolicy\", its \"enabled\" argument has the wrong type (expected type \"bool\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.service.properties.retentionPolicy\", its \"enabled\" argument has the wrong type (expected type \"bool\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.service.properties.retentionPolicy\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.service.properties.retentionPolicy\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.storage.account.service.properties.retentionPolicy with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.storageService.account.service.properties.retentionPolicy with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -7875,24 +9006,24 @@ func newAzureStorageAccountServicePropertiesRetentionPolicy(runtime *resources.R return &res, nil } -func (s *mqlAzureStorageAccountServicePropertiesRetentionPolicy) Validate() error { +func (s *mqlAzureSubscriptionStorageServiceAccountServicePropertiesRetentionPolicy) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.storage.account.service.properties.retentionPolicy\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.service.properties.retentionPolicy\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("retentionDays"); !ok { - return errors.New("Initialized \"azure.storage.account.service.properties.retentionPolicy\" resource without a \"retentionDays\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.service.properties.retentionPolicy\" resource without a \"retentionDays\". This field is required.") } if _, ok := s.Cache.Load("enabled"); !ok { - return errors.New("Initialized \"azure.storage.account.service.properties.retentionPolicy\" resource without a \"enabled\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.service.properties.retentionPolicy\" resource without a \"enabled\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureStorageAccountServicePropertiesRetentionPolicy) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.storage.account.service.properties.retentionPolicy].Register") +func (s *mqlAzureSubscriptionStorageServiceAccountServicePropertiesRetentionPolicy) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.storageService.account.service.properties.retentionPolicy].Register") switch name { case "id": return nil @@ -7901,13 +9032,13 @@ func (s *mqlAzureStorageAccountServicePropertiesRetentionPolicy) Register(name s case "enabled": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.storage.account.service.properties.retentionPolicy\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.storageService.account.service.properties.retentionPolicy\" resource") } } // Field accessor autogenerated -func (s *mqlAzureStorageAccountServicePropertiesRetentionPolicy) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.storage.account.service.properties.retentionPolicy].Field") +func (s *mqlAzureSubscriptionStorageServiceAccountServicePropertiesRetentionPolicy) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.storageService.account.service.properties.retentionPolicy].Field") switch name { case "id": return s.Id() @@ -7916,61 +9047,61 @@ func (s *mqlAzureStorageAccountServicePropertiesRetentionPolicy) Field(name stri case "enabled": return s.Enabled() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.storage.account.service.properties.retentionPolicy\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.storageService.account.service.properties.retentionPolicy\" resource") } } // Id accessor autogenerated -func (s *mqlAzureStorageAccountServicePropertiesRetentionPolicy) Id() (string, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountServicePropertiesRetentionPolicy) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.storage.account.service.properties.retentionPolicy\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.storageService.account.service.properties.retentionPolicy\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.storage.account.service.properties.retentionPolicy\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.storageService.account.service.properties.retentionPolicy\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // RetentionDays accessor autogenerated -func (s *mqlAzureStorageAccountServicePropertiesRetentionPolicy) RetentionDays() (int64, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountServicePropertiesRetentionPolicy) RetentionDays() (int64, error) { res, ok := s.Cache.Load("retentionDays") if !ok || !res.Valid { - return 0, errors.New("\"azure.storage.account.service.properties.retentionPolicy\" failed: no value provided for static field \"retentionDays\"") + return 0, errors.New("\"azure.subscription.storageService.account.service.properties.retentionPolicy\" failed: no value provided for static field \"retentionDays\"") } if res.Error != nil { return 0, res.Error } tres, ok := res.Data.(int64) if !ok { - return 0, fmt.Errorf("\"azure.storage.account.service.properties.retentionPolicy\" failed to cast field \"retentionDays\" to the right type (int64): %#v", res) + return 0, fmt.Errorf("\"azure.subscription.storageService.account.service.properties.retentionPolicy\" failed to cast field \"retentionDays\" to the right type (int64): %#v", res) } return tres, nil } // Enabled accessor autogenerated -func (s *mqlAzureStorageAccountServicePropertiesRetentionPolicy) Enabled() (bool, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountServicePropertiesRetentionPolicy) Enabled() (bool, error) { res, ok := s.Cache.Load("enabled") if !ok || !res.Valid { - return false, errors.New("\"azure.storage.account.service.properties.retentionPolicy\" failed: no value provided for static field \"enabled\"") + return false, errors.New("\"azure.subscription.storageService.account.service.properties.retentionPolicy\" failed: no value provided for static field \"enabled\"") } if res.Error != nil { return false, res.Error } tres, ok := res.Data.(bool) if !ok { - return false, fmt.Errorf("\"azure.storage.account.service.properties.retentionPolicy\" failed to cast field \"enabled\" to the right type (bool): %#v", res) + return false, fmt.Errorf("\"azure.subscription.storageService.account.service.properties.retentionPolicy\" failed to cast field \"enabled\" to the right type (bool): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureStorageAccountServicePropertiesRetentionPolicy) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.storage.account.service.properties.retentionPolicy].MqlCompute") +func (s *mqlAzureSubscriptionStorageServiceAccountServicePropertiesRetentionPolicy) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.storageService.account.service.properties.retentionPolicy].MqlCompute") switch name { case "id": return nil @@ -7979,12 +9110,12 @@ func (s *mqlAzureStorageAccountServicePropertiesRetentionPolicy) MqlCompute(name case "enabled": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.storage.account.service.properties.retentionPolicy\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.storageService.account.service.properties.retentionPolicy\" resource") } } -// AzureStorageAccountServicePropertiesLogging resource interface -type AzureStorageAccountServicePropertiesLogging interface { +// AzureSubscriptionStorageServiceAccountServicePropertiesLogging resource interface +type AzureSubscriptionStorageServiceAccountServicePropertiesLogging interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -7995,24 +9126,24 @@ type AzureStorageAccountServicePropertiesLogging interface { Read() (bool, error) Write() (bool, error) Version() (string, error) - RetentionPolicy() (AzureStorageAccountServicePropertiesRetentionPolicy, error) + RetentionPolicy() (AzureSubscriptionStorageServiceAccountServicePropertiesRetentionPolicy, error) } -// mqlAzureStorageAccountServicePropertiesLogging for the azure.storage.account.service.properties.logging resource -type mqlAzureStorageAccountServicePropertiesLogging struct { +// mqlAzureSubscriptionStorageServiceAccountServicePropertiesLogging for the azure.subscription.storageService.account.service.properties.logging resource +type mqlAzureSubscriptionStorageServiceAccountServicePropertiesLogging struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureStorageAccountServicePropertiesLogging) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionStorageServiceAccountServicePropertiesLogging) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.storage.account.service.properties.logging resource -func newAzureStorageAccountServicePropertiesLogging(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.storageService.account.service.properties.logging resource +func newAzureSubscriptionStorageServiceAccountServicePropertiesLogging(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureStorageAccountServicePropertiesLogging{runtime.NewResource("azure.storage.account.service.properties.logging")} + res := mqlAzureSubscriptionStorageServiceAccountServicePropertiesLogging{runtime.NewResource("azure.subscription.storageService.account.service.properties.logging")} // assign all named fields var id string @@ -8026,36 +9157,36 @@ func newAzureStorageAccountServicePropertiesLogging(runtime *resources.Runtime, switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.service.properties.logging\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.service.properties.logging\", its \"id\" argument has the wrong type (expected type \"string\")") } case "delete": if _, ok := val.(bool); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.service.properties.logging\", its \"delete\" argument has the wrong type (expected type \"bool\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.service.properties.logging\", its \"delete\" argument has the wrong type (expected type \"bool\")") } case "read": if _, ok := val.(bool); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.service.properties.logging\", its \"read\" argument has the wrong type (expected type \"bool\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.service.properties.logging\", its \"read\" argument has the wrong type (expected type \"bool\")") } case "write": if _, ok := val.(bool); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.service.properties.logging\", its \"write\" argument has the wrong type (expected type \"bool\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.service.properties.logging\", its \"write\" argument has the wrong type (expected type \"bool\")") } case "version": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.service.properties.logging\", its \"version\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.service.properties.logging\", its \"version\" argument has the wrong type (expected type \"string\")") } case "retentionPolicy": - if _, ok := val.(AzureStorageAccountServicePropertiesRetentionPolicy); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.service.properties.logging\", its \"retentionPolicy\" argument has the wrong type (expected type \"AzureStorageAccountServicePropertiesRetentionPolicy\")") + if _, ok := val.(AzureSubscriptionStorageServiceAccountServicePropertiesRetentionPolicy); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.service.properties.logging\", its \"retentionPolicy\" argument has the wrong type (expected type \"AzureSubscriptionStorageServiceAccountServicePropertiesRetentionPolicy\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.storage.account.service.properties.logging\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.service.properties.logging\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.storage.account.service.properties.logging with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.storageService.account.service.properties.logging with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -8073,33 +9204,33 @@ func newAzureStorageAccountServicePropertiesLogging(runtime *resources.Runtime, return &res, nil } -func (s *mqlAzureStorageAccountServicePropertiesLogging) Validate() error { +func (s *mqlAzureSubscriptionStorageServiceAccountServicePropertiesLogging) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.storage.account.service.properties.logging\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.service.properties.logging\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("delete"); !ok { - return errors.New("Initialized \"azure.storage.account.service.properties.logging\" resource without a \"delete\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.service.properties.logging\" resource without a \"delete\". This field is required.") } if _, ok := s.Cache.Load("read"); !ok { - return errors.New("Initialized \"azure.storage.account.service.properties.logging\" resource without a \"read\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.service.properties.logging\" resource without a \"read\". This field is required.") } if _, ok := s.Cache.Load("write"); !ok { - return errors.New("Initialized \"azure.storage.account.service.properties.logging\" resource without a \"write\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.service.properties.logging\" resource without a \"write\". This field is required.") } if _, ok := s.Cache.Load("version"); !ok { - return errors.New("Initialized \"azure.storage.account.service.properties.logging\" resource without a \"version\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.service.properties.logging\" resource without a \"version\". This field is required.") } if _, ok := s.Cache.Load("retentionPolicy"); !ok { - return errors.New("Initialized \"azure.storage.account.service.properties.logging\" resource without a \"retentionPolicy\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.service.properties.logging\" resource without a \"retentionPolicy\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureStorageAccountServicePropertiesLogging) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.storage.account.service.properties.logging].Register") +func (s *mqlAzureSubscriptionStorageServiceAccountServicePropertiesLogging) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.storageService.account.service.properties.logging].Register") switch name { case "id": return nil @@ -8114,13 +9245,13 @@ func (s *mqlAzureStorageAccountServicePropertiesLogging) Register(name string) e case "retentionPolicy": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.storage.account.service.properties.logging\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.storageService.account.service.properties.logging\" resource") } } // Field accessor autogenerated -func (s *mqlAzureStorageAccountServicePropertiesLogging) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.storage.account.service.properties.logging].Field") +func (s *mqlAzureSubscriptionStorageServiceAccountServicePropertiesLogging) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.storageService.account.service.properties.logging].Field") switch name { case "id": return s.Id() @@ -8135,109 +9266,109 @@ func (s *mqlAzureStorageAccountServicePropertiesLogging) Field(name string) (int case "retentionPolicy": return s.RetentionPolicy() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.storage.account.service.properties.logging\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.storageService.account.service.properties.logging\" resource") } } // Id accessor autogenerated -func (s *mqlAzureStorageAccountServicePropertiesLogging) Id() (string, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountServicePropertiesLogging) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.storage.account.service.properties.logging\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.storageService.account.service.properties.logging\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.storage.account.service.properties.logging\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.storageService.account.service.properties.logging\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Delete accessor autogenerated -func (s *mqlAzureStorageAccountServicePropertiesLogging) Delete() (bool, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountServicePropertiesLogging) Delete() (bool, error) { res, ok := s.Cache.Load("delete") if !ok || !res.Valid { - return false, errors.New("\"azure.storage.account.service.properties.logging\" failed: no value provided for static field \"delete\"") + return false, errors.New("\"azure.subscription.storageService.account.service.properties.logging\" failed: no value provided for static field \"delete\"") } if res.Error != nil { return false, res.Error } tres, ok := res.Data.(bool) if !ok { - return false, fmt.Errorf("\"azure.storage.account.service.properties.logging\" failed to cast field \"delete\" to the right type (bool): %#v", res) + return false, fmt.Errorf("\"azure.subscription.storageService.account.service.properties.logging\" failed to cast field \"delete\" to the right type (bool): %#v", res) } return tres, nil } // Read accessor autogenerated -func (s *mqlAzureStorageAccountServicePropertiesLogging) Read() (bool, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountServicePropertiesLogging) Read() (bool, error) { res, ok := s.Cache.Load("read") if !ok || !res.Valid { - return false, errors.New("\"azure.storage.account.service.properties.logging\" failed: no value provided for static field \"read\"") + return false, errors.New("\"azure.subscription.storageService.account.service.properties.logging\" failed: no value provided for static field \"read\"") } if res.Error != nil { return false, res.Error } tres, ok := res.Data.(bool) if !ok { - return false, fmt.Errorf("\"azure.storage.account.service.properties.logging\" failed to cast field \"read\" to the right type (bool): %#v", res) + return false, fmt.Errorf("\"azure.subscription.storageService.account.service.properties.logging\" failed to cast field \"read\" to the right type (bool): %#v", res) } return tres, nil } // Write accessor autogenerated -func (s *mqlAzureStorageAccountServicePropertiesLogging) Write() (bool, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountServicePropertiesLogging) Write() (bool, error) { res, ok := s.Cache.Load("write") if !ok || !res.Valid { - return false, errors.New("\"azure.storage.account.service.properties.logging\" failed: no value provided for static field \"write\"") + return false, errors.New("\"azure.subscription.storageService.account.service.properties.logging\" failed: no value provided for static field \"write\"") } if res.Error != nil { return false, res.Error } tres, ok := res.Data.(bool) if !ok { - return false, fmt.Errorf("\"azure.storage.account.service.properties.logging\" failed to cast field \"write\" to the right type (bool): %#v", res) + return false, fmt.Errorf("\"azure.subscription.storageService.account.service.properties.logging\" failed to cast field \"write\" to the right type (bool): %#v", res) } return tres, nil } // Version accessor autogenerated -func (s *mqlAzureStorageAccountServicePropertiesLogging) Version() (string, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountServicePropertiesLogging) Version() (string, error) { res, ok := s.Cache.Load("version") if !ok || !res.Valid { - return "", errors.New("\"azure.storage.account.service.properties.logging\" failed: no value provided for static field \"version\"") + return "", errors.New("\"azure.subscription.storageService.account.service.properties.logging\" failed: no value provided for static field \"version\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.storage.account.service.properties.logging\" failed to cast field \"version\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.storageService.account.service.properties.logging\" failed to cast field \"version\" to the right type (string): %#v", res) } return tres, nil } // RetentionPolicy accessor autogenerated -func (s *mqlAzureStorageAccountServicePropertiesLogging) RetentionPolicy() (AzureStorageAccountServicePropertiesRetentionPolicy, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountServicePropertiesLogging) RetentionPolicy() (AzureSubscriptionStorageServiceAccountServicePropertiesRetentionPolicy, error) { res, ok := s.Cache.Load("retentionPolicy") if !ok || !res.Valid { - return nil, errors.New("\"azure.storage.account.service.properties.logging\" failed: no value provided for static field \"retentionPolicy\"") + return nil, errors.New("\"azure.subscription.storageService.account.service.properties.logging\" failed: no value provided for static field \"retentionPolicy\"") } if res.Error != nil { return nil, res.Error } - tres, ok := res.Data.(AzureStorageAccountServicePropertiesRetentionPolicy) + tres, ok := res.Data.(AzureSubscriptionStorageServiceAccountServicePropertiesRetentionPolicy) if !ok { - return nil, fmt.Errorf("\"azure.storage.account.service.properties.logging\" failed to cast field \"retentionPolicy\" to the right type (AzureStorageAccountServicePropertiesRetentionPolicy): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.storageService.account.service.properties.logging\" failed to cast field \"retentionPolicy\" to the right type (AzureSubscriptionStorageServiceAccountServicePropertiesRetentionPolicy): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureStorageAccountServicePropertiesLogging) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.storage.account.service.properties.logging].MqlCompute") +func (s *mqlAzureSubscriptionStorageServiceAccountServicePropertiesLogging) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.storageService.account.service.properties.logging].MqlCompute") switch name { case "id": return nil @@ -8252,12 +9383,12 @@ func (s *mqlAzureStorageAccountServicePropertiesLogging) MqlCompute(name string) case "retentionPolicy": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.storage.account.service.properties.logging\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.storageService.account.service.properties.logging\" resource") } } -// AzureStorageContainer resource interface -type AzureStorageContainer interface { +// AzureSubscriptionStorageServiceAccountContainer resource interface +type AzureSubscriptionStorageServiceAccountContainer interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -8270,21 +9401,21 @@ type AzureStorageContainer interface { Properties() (interface{}, error) } -// mqlAzureStorageContainer for the azure.storage.container resource -type mqlAzureStorageContainer struct { +// mqlAzureSubscriptionStorageServiceAccountContainer for the azure.subscription.storageService.account.container resource +type mqlAzureSubscriptionStorageServiceAccountContainer struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureStorageContainer) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionStorageServiceAccountContainer) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.storage.container resource -func newAzureStorageContainer(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.storageService.account.container resource +func newAzureSubscriptionStorageServiceAccountContainer(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureStorageContainer{runtime.NewResource("azure.storage.container")} + res := mqlAzureSubscriptionStorageServiceAccountContainer{runtime.NewResource("azure.subscription.storageService.account.container")} // assign all named fields var id string @@ -8298,32 +9429,32 @@ func newAzureStorageContainer(runtime *resources.Runtime, args *resources.Args) switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.container\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.container\", its \"id\" argument has the wrong type (expected type \"string\")") } case "name": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.container\", its \"name\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.container\", its \"name\" argument has the wrong type (expected type \"string\")") } case "type": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.container\", its \"type\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.container\", its \"type\" argument has the wrong type (expected type \"string\")") } case "etag": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.container\", its \"etag\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.container\", its \"etag\" argument has the wrong type (expected type \"string\")") } case "properties": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.storage.container\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.container\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.storage.container\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.storageService.account.container\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.storage.container with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.storageService.account.container with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -8341,30 +9472,30 @@ func newAzureStorageContainer(runtime *resources.Runtime, args *resources.Args) return &res, nil } -func (s *mqlAzureStorageContainer) Validate() error { +func (s *mqlAzureSubscriptionStorageServiceAccountContainer) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.storage.container\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.container\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("name"); !ok { - return errors.New("Initialized \"azure.storage.container\" resource without a \"name\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.container\" resource without a \"name\". This field is required.") } if _, ok := s.Cache.Load("type"); !ok { - return errors.New("Initialized \"azure.storage.container\" resource without a \"type\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.container\" resource without a \"type\". This field is required.") } if _, ok := s.Cache.Load("etag"); !ok { - return errors.New("Initialized \"azure.storage.container\" resource without a \"etag\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.container\" resource without a \"etag\". This field is required.") } if _, ok := s.Cache.Load("properties"); !ok { - return errors.New("Initialized \"azure.storage.container\" resource without a \"properties\". This field is required.") + return errors.New("Initialized \"azure.subscription.storageService.account.container\" resource without a \"properties\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureStorageContainer) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.storage.container].Register") +func (s *mqlAzureSubscriptionStorageServiceAccountContainer) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.storageService.account.container].Register") switch name { case "id": return nil @@ -8377,13 +9508,13 @@ func (s *mqlAzureStorageContainer) Register(name string) error { case "properties": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.storage.container\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.storageService.account.container\" resource") } } // Field accessor autogenerated -func (s *mqlAzureStorageContainer) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.storage.container].Field") +func (s *mqlAzureSubscriptionStorageServiceAccountContainer) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.storageService.account.container].Field") switch name { case "id": return s.Id() @@ -8396,93 +9527,93 @@ func (s *mqlAzureStorageContainer) Field(name string) (interface{}, error) { case "properties": return s.Properties() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.storage.container\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.storageService.account.container\" resource") } } // Id accessor autogenerated -func (s *mqlAzureStorageContainer) Id() (string, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountContainer) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.storage.container\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.storageService.account.container\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.storage.container\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.storageService.account.container\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Name accessor autogenerated -func (s *mqlAzureStorageContainer) Name() (string, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountContainer) Name() (string, error) { res, ok := s.Cache.Load("name") if !ok || !res.Valid { - return "", errors.New("\"azure.storage.container\" failed: no value provided for static field \"name\"") + return "", errors.New("\"azure.subscription.storageService.account.container\" failed: no value provided for static field \"name\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.storage.container\" failed to cast field \"name\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.storageService.account.container\" failed to cast field \"name\" to the right type (string): %#v", res) } return tres, nil } // Type accessor autogenerated -func (s *mqlAzureStorageContainer) Type() (string, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountContainer) Type() (string, error) { res, ok := s.Cache.Load("type") if !ok || !res.Valid { - return "", errors.New("\"azure.storage.container\" failed: no value provided for static field \"type\"") + return "", errors.New("\"azure.subscription.storageService.account.container\" failed: no value provided for static field \"type\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.storage.container\" failed to cast field \"type\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.storageService.account.container\" failed to cast field \"type\" to the right type (string): %#v", res) } return tres, nil } // Etag accessor autogenerated -func (s *mqlAzureStorageContainer) Etag() (string, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountContainer) Etag() (string, error) { res, ok := s.Cache.Load("etag") if !ok || !res.Valid { - return "", errors.New("\"azure.storage.container\" failed: no value provided for static field \"etag\"") + return "", errors.New("\"azure.subscription.storageService.account.container\" failed: no value provided for static field \"etag\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.storage.container\" failed to cast field \"etag\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.storageService.account.container\" failed to cast field \"etag\" to the right type (string): %#v", res) } return tres, nil } // Properties accessor autogenerated -func (s *mqlAzureStorageContainer) Properties() (interface{}, error) { +func (s *mqlAzureSubscriptionStorageServiceAccountContainer) Properties() (interface{}, error) { res, ok := s.Cache.Load("properties") if !ok || !res.Valid { - return nil, errors.New("\"azure.storage.container\" failed: no value provided for static field \"properties\"") + return nil, errors.New("\"azure.subscription.storageService.account.container\" failed: no value provided for static field \"properties\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.storage.container\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.storageService.account.container\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureStorageContainer) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.storage.container].MqlCompute") +func (s *mqlAzureSubscriptionStorageServiceAccountContainer) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.storageService.account.container].MqlCompute") switch name { case "id": return nil @@ -8495,36 +9626,46 @@ func (s *mqlAzureStorageContainer) MqlCompute(name string) error { case "properties": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.storage.container\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.storageService.account.container\" resource") } } -// AzureWeb resource interface -type AzureWeb interface { +// AzureSubscriptionWebService resource interface +type AzureSubscriptionWebService interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) Register(string) error Validate() error + SubscriptionId() (string, error) Apps() ([]interface{}, error) AvailableRuntimes() ([]interface{}, error) } -// mqlAzureWeb for the azure.web resource -type mqlAzureWeb struct { +// mqlAzureSubscriptionWebService for the azure.subscription.webService resource +type mqlAzureSubscriptionWebService struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureWeb) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionWebService) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.web resource -func newAzureWeb(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.webService resource +func newAzureSubscriptionWebService(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureWeb{runtime.NewResource("azure.web")} + res := mqlAzureSubscriptionWebService{runtime.NewResource("azure.subscription.webService")} + var existing AzureSubscriptionWebService + args, existing, err = res.init(args) + if err != nil { + return nil, err + } + if existing != nil { + return existing, nil + } + // assign all named fields var id string @@ -8536,22 +9677,26 @@ func newAzureWeb(runtime *resources.Runtime, args *resources.Args) (interface{}, } switch name { + case "subscriptionId": + if _, ok := val.(string); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription.webService\", its \"subscriptionId\" argument has the wrong type (expected type \"string\")") + } case "apps": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.web\", its \"apps\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.webService\", its \"apps\" argument has the wrong type (expected type \"[]interface{}\")") } case "availableRuntimes": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.web\", its \"availableRuntimes\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.webService\", its \"availableRuntimes\" argument has the wrong type (expected type \"[]interface{}\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.web\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.webService\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.web with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.webService with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -8569,41 +9714,63 @@ func newAzureWeb(runtime *resources.Runtime, args *resources.Args) (interface{}, return &res, nil } -func (s *mqlAzureWeb) Validate() error { +func (s *mqlAzureSubscriptionWebService) Validate() error { // required arguments - // no required fields found + if _, ok := s.Cache.Load("subscriptionId"); !ok { + return errors.New("Initialized \"azure.subscription.webService\" resource without a \"subscriptionId\". This field is required.") + } return nil } // Register accessor autogenerated -func (s *mqlAzureWeb) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.web].Register") +func (s *mqlAzureSubscriptionWebService) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.webService].Register") switch name { + case "subscriptionId": + return nil case "apps": return nil case "availableRuntimes": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.web\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.webService\" resource") } } // Field accessor autogenerated -func (s *mqlAzureWeb) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.web].Field") +func (s *mqlAzureSubscriptionWebService) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.webService].Field") switch name { + case "subscriptionId": + return s.SubscriptionId() case "apps": return s.Apps() case "availableRuntimes": return s.AvailableRuntimes() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.web\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.webService\" resource") + } +} + +// SubscriptionId accessor autogenerated +func (s *mqlAzureSubscriptionWebService) SubscriptionId() (string, error) { + res, ok := s.Cache.Load("subscriptionId") + if !ok || !res.Valid { + return "", errors.New("\"azure.subscription.webService\" failed: no value provided for static field \"subscriptionId\"") } + if res.Error != nil { + return "", res.Error + } + tres, ok := res.Data.(string) + if !ok { + return "", fmt.Errorf("\"azure.subscription.webService\" failed to cast field \"subscriptionId\" to the right type (string): %#v", res) + } + return tres, nil } // Apps accessor autogenerated -func (s *mqlAzureWeb) Apps() ([]interface{}, error) { +func (s *mqlAzureSubscriptionWebService) Apps() ([]interface{}, error) { res, ok := s.Cache.Load("apps") if !ok || !res.Valid { if err := s.ComputeApps(); err != nil { @@ -8611,7 +9778,7 @@ func (s *mqlAzureWeb) Apps() ([]interface{}, error) { } res, ok = s.Cache.Load("apps") if !ok { - return nil, errors.New("\"azure.web\" calculated \"apps\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.webService\" calculated \"apps\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "apps") } @@ -8620,13 +9787,13 @@ func (s *mqlAzureWeb) Apps() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.web\" failed to cast field \"apps\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.webService\" failed to cast field \"apps\" to the right type ([]interface{}): %#v", res) } return tres, nil } // AvailableRuntimes accessor autogenerated -func (s *mqlAzureWeb) AvailableRuntimes() ([]interface{}, error) { +func (s *mqlAzureSubscriptionWebService) AvailableRuntimes() ([]interface{}, error) { res, ok := s.Cache.Load("availableRuntimes") if !ok || !res.Valid { if err := s.ComputeAvailableRuntimes(); err != nil { @@ -8634,7 +9801,7 @@ func (s *mqlAzureWeb) AvailableRuntimes() ([]interface{}, error) { } res, ok = s.Cache.Load("availableRuntimes") if !ok { - return nil, errors.New("\"azure.web\" calculated \"availableRuntimes\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.webService\" calculated \"availableRuntimes\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "availableRuntimes") } @@ -8643,26 +9810,28 @@ func (s *mqlAzureWeb) AvailableRuntimes() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.web\" failed to cast field \"availableRuntimes\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.webService\" failed to cast field \"availableRuntimes\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureWeb) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.web].MqlCompute") +func (s *mqlAzureSubscriptionWebService) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.webService].MqlCompute") switch name { + case "subscriptionId": + return nil case "apps": return s.ComputeApps() case "availableRuntimes": return s.ComputeAvailableRuntimes() default: - return errors.New("Cannot find field '" + name + "' in \"azure.web\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.webService\" resource") } } // ComputeApps computer autogenerated -func (s *mqlAzureWeb) ComputeApps() error { +func (s *mqlAzureSubscriptionWebService) ComputeApps() error { var err error if _, ok := s.Cache.Load("apps"); ok { return nil @@ -8676,7 +9845,7 @@ func (s *mqlAzureWeb) ComputeApps() error { } // ComputeAvailableRuntimes computer autogenerated -func (s *mqlAzureWeb) ComputeAvailableRuntimes() error { +func (s *mqlAzureSubscriptionWebService) ComputeAvailableRuntimes() error { var err error if _, ok := s.Cache.Load("availableRuntimes"); ok { return nil @@ -8689,8 +9858,8 @@ func (s *mqlAzureWeb) ComputeAvailableRuntimes() error { return nil } -// AzureWebAppsite resource interface -type AzureWebAppsite interface { +// AzureSubscriptionWebServiceAppsite resource interface +type AzureSubscriptionWebServiceAppsite interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -8704,29 +9873,29 @@ type AzureWebAppsite interface { Tags() (map[string]interface{}, error) Properties() (interface{}, error) Identity() (interface{}, error) - Configuration() (AzureWebAppsiteconfig, error) - AuthenticationSettings() (AzureWebAppsiteauthsettings, error) + Configuration() (AzureSubscriptionWebServiceAppsiteconfig, error) + AuthenticationSettings() (AzureSubscriptionWebServiceAppsiteauthsettings, error) Metadata() (interface{}, error) ApplicationSettings() (interface{}, error) ConnectionSettings() (interface{}, error) Stack() (interface{}, error) } -// mqlAzureWebAppsite for the azure.web.appsite resource -type mqlAzureWebAppsite struct { +// mqlAzureSubscriptionWebServiceAppsite for the azure.subscription.webService.appsite resource +type mqlAzureSubscriptionWebServiceAppsite struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureWebAppsite) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionWebServiceAppsite) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.web.appsite resource -func newAzureWebAppsite(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.webService.appsite resource +func newAzureSubscriptionWebServiceAppsite(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureWebAppsite{runtime.NewResource("azure.web.appsite")} + res := mqlAzureSubscriptionWebServiceAppsite{runtime.NewResource("azure.subscription.webService.appsite")} // assign all named fields var id string @@ -8740,68 +9909,68 @@ func newAzureWebAppsite(runtime *resources.Runtime, args *resources.Args) (inter switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.web.appsite\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.webService.appsite\", its \"id\" argument has the wrong type (expected type \"string\")") } case "name": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.web.appsite\", its \"name\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.webService.appsite\", its \"name\" argument has the wrong type (expected type \"string\")") } case "kind": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.web.appsite\", its \"kind\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.webService.appsite\", its \"kind\" argument has the wrong type (expected type \"string\")") } case "location": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.web.appsite\", its \"location\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.webService.appsite\", its \"location\" argument has the wrong type (expected type \"string\")") } case "type": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.web.appsite\", its \"type\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.webService.appsite\", its \"type\" argument has the wrong type (expected type \"string\")") } case "tags": if _, ok := val.(map[string]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.web.appsite\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.webService.appsite\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") } case "properties": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.web.appsite\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.webService.appsite\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") } case "identity": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.web.appsite\", its \"identity\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.webService.appsite\", its \"identity\" argument has the wrong type (expected type \"interface{}\")") } case "configuration": - if _, ok := val.(AzureWebAppsiteconfig); !ok { - return nil, errors.New("Failed to initialize \"azure.web.appsite\", its \"configuration\" argument has the wrong type (expected type \"AzureWebAppsiteconfig\")") + if _, ok := val.(AzureSubscriptionWebServiceAppsiteconfig); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription.webService.appsite\", its \"configuration\" argument has the wrong type (expected type \"AzureSubscriptionWebServiceAppsiteconfig\")") } case "authenticationSettings": - if _, ok := val.(AzureWebAppsiteauthsettings); !ok { - return nil, errors.New("Failed to initialize \"azure.web.appsite\", its \"authenticationSettings\" argument has the wrong type (expected type \"AzureWebAppsiteauthsettings\")") + if _, ok := val.(AzureSubscriptionWebServiceAppsiteauthsettings); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription.webService.appsite\", its \"authenticationSettings\" argument has the wrong type (expected type \"AzureSubscriptionWebServiceAppsiteauthsettings\")") } case "metadata": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.web.appsite\", its \"metadata\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.webService.appsite\", its \"metadata\" argument has the wrong type (expected type \"interface{}\")") } case "applicationSettings": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.web.appsite\", its \"applicationSettings\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.webService.appsite\", its \"applicationSettings\" argument has the wrong type (expected type \"interface{}\")") } case "connectionSettings": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.web.appsite\", its \"connectionSettings\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.webService.appsite\", its \"connectionSettings\" argument has the wrong type (expected type \"interface{}\")") } case "stack": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.web.appsite\", its \"stack\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.webService.appsite\", its \"stack\" argument has the wrong type (expected type \"interface{}\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.web.appsite\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.webService.appsite\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.web.appsite with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.webService.appsite with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -8819,39 +9988,39 @@ func newAzureWebAppsite(runtime *resources.Runtime, args *resources.Args) (inter return &res, nil } -func (s *mqlAzureWebAppsite) Validate() error { +func (s *mqlAzureSubscriptionWebServiceAppsite) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.web.appsite\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.webService.appsite\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("name"); !ok { - return errors.New("Initialized \"azure.web.appsite\" resource without a \"name\". This field is required.") + return errors.New("Initialized \"azure.subscription.webService.appsite\" resource without a \"name\". This field is required.") } if _, ok := s.Cache.Load("kind"); !ok { - return errors.New("Initialized \"azure.web.appsite\" resource without a \"kind\". This field is required.") + return errors.New("Initialized \"azure.subscription.webService.appsite\" resource without a \"kind\". This field is required.") } if _, ok := s.Cache.Load("location"); !ok { - return errors.New("Initialized \"azure.web.appsite\" resource without a \"location\". This field is required.") + return errors.New("Initialized \"azure.subscription.webService.appsite\" resource without a \"location\". This field is required.") } if _, ok := s.Cache.Load("type"); !ok { - return errors.New("Initialized \"azure.web.appsite\" resource without a \"type\". This field is required.") + return errors.New("Initialized \"azure.subscription.webService.appsite\" resource without a \"type\". This field is required.") } if _, ok := s.Cache.Load("tags"); !ok { - return errors.New("Initialized \"azure.web.appsite\" resource without a \"tags\". This field is required.") + return errors.New("Initialized \"azure.subscription.webService.appsite\" resource without a \"tags\". This field is required.") } if _, ok := s.Cache.Load("properties"); !ok { - return errors.New("Initialized \"azure.web.appsite\" resource without a \"properties\". This field is required.") + return errors.New("Initialized \"azure.subscription.webService.appsite\" resource without a \"properties\". This field is required.") } if _, ok := s.Cache.Load("identity"); !ok { - return errors.New("Initialized \"azure.web.appsite\" resource without a \"identity\". This field is required.") + return errors.New("Initialized \"azure.subscription.webService.appsite\" resource without a \"identity\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureWebAppsite) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.web.appsite].Register") +func (s *mqlAzureSubscriptionWebServiceAppsite) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.webService.appsite].Register") switch name { case "id": return nil @@ -8882,13 +10051,13 @@ func (s *mqlAzureWebAppsite) Register(name string) error { case "stack": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.web.appsite\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.webService.appsite\" resource") } } // Field accessor autogenerated -func (s *mqlAzureWebAppsite) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.web.appsite].Field") +func (s *mqlAzureSubscriptionWebServiceAppsite) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.webService.appsite].Field") switch name { case "id": return s.Id() @@ -8919,140 +10088,140 @@ func (s *mqlAzureWebAppsite) Field(name string) (interface{}, error) { case "stack": return s.Stack() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.web.appsite\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.webService.appsite\" resource") } } // Id accessor autogenerated -func (s *mqlAzureWebAppsite) Id() (string, error) { +func (s *mqlAzureSubscriptionWebServiceAppsite) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.web.appsite\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.webService.appsite\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.web.appsite\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.webService.appsite\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Name accessor autogenerated -func (s *mqlAzureWebAppsite) Name() (string, error) { +func (s *mqlAzureSubscriptionWebServiceAppsite) Name() (string, error) { res, ok := s.Cache.Load("name") if !ok || !res.Valid { - return "", errors.New("\"azure.web.appsite\" failed: no value provided for static field \"name\"") + return "", errors.New("\"azure.subscription.webService.appsite\" failed: no value provided for static field \"name\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.web.appsite\" failed to cast field \"name\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.webService.appsite\" failed to cast field \"name\" to the right type (string): %#v", res) } return tres, nil } // Kind accessor autogenerated -func (s *mqlAzureWebAppsite) Kind() (string, error) { +func (s *mqlAzureSubscriptionWebServiceAppsite) Kind() (string, error) { res, ok := s.Cache.Load("kind") if !ok || !res.Valid { - return "", errors.New("\"azure.web.appsite\" failed: no value provided for static field \"kind\"") + return "", errors.New("\"azure.subscription.webService.appsite\" failed: no value provided for static field \"kind\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.web.appsite\" failed to cast field \"kind\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.webService.appsite\" failed to cast field \"kind\" to the right type (string): %#v", res) } return tres, nil } // Location accessor autogenerated -func (s *mqlAzureWebAppsite) Location() (string, error) { +func (s *mqlAzureSubscriptionWebServiceAppsite) Location() (string, error) { res, ok := s.Cache.Load("location") if !ok || !res.Valid { - return "", errors.New("\"azure.web.appsite\" failed: no value provided for static field \"location\"") + return "", errors.New("\"azure.subscription.webService.appsite\" failed: no value provided for static field \"location\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.web.appsite\" failed to cast field \"location\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.webService.appsite\" failed to cast field \"location\" to the right type (string): %#v", res) } return tres, nil } // Type accessor autogenerated -func (s *mqlAzureWebAppsite) Type() (string, error) { +func (s *mqlAzureSubscriptionWebServiceAppsite) Type() (string, error) { res, ok := s.Cache.Load("type") if !ok || !res.Valid { - return "", errors.New("\"azure.web.appsite\" failed: no value provided for static field \"type\"") + return "", errors.New("\"azure.subscription.webService.appsite\" failed: no value provided for static field \"type\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.web.appsite\" failed to cast field \"type\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.webService.appsite\" failed to cast field \"type\" to the right type (string): %#v", res) } return tres, nil } // Tags accessor autogenerated -func (s *mqlAzureWebAppsite) Tags() (map[string]interface{}, error) { +func (s *mqlAzureSubscriptionWebServiceAppsite) Tags() (map[string]interface{}, error) { res, ok := s.Cache.Load("tags") if !ok || !res.Valid { - return nil, errors.New("\"azure.web.appsite\" failed: no value provided for static field \"tags\"") + return nil, errors.New("\"azure.subscription.webService.appsite\" failed: no value provided for static field \"tags\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(map[string]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.web.appsite\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.webService.appsite\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) } return tres, nil } // Properties accessor autogenerated -func (s *mqlAzureWebAppsite) Properties() (interface{}, error) { +func (s *mqlAzureSubscriptionWebServiceAppsite) Properties() (interface{}, error) { res, ok := s.Cache.Load("properties") if !ok || !res.Valid { - return nil, errors.New("\"azure.web.appsite\" failed: no value provided for static field \"properties\"") + return nil, errors.New("\"azure.subscription.webService.appsite\" failed: no value provided for static field \"properties\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.web.appsite\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.webService.appsite\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) } return tres, nil } // Identity accessor autogenerated -func (s *mqlAzureWebAppsite) Identity() (interface{}, error) { +func (s *mqlAzureSubscriptionWebServiceAppsite) Identity() (interface{}, error) { res, ok := s.Cache.Load("identity") if !ok || !res.Valid { - return nil, errors.New("\"azure.web.appsite\" failed: no value provided for static field \"identity\"") + return nil, errors.New("\"azure.subscription.webService.appsite\" failed: no value provided for static field \"identity\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.web.appsite\" failed to cast field \"identity\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.webService.appsite\" failed to cast field \"identity\" to the right type (interface{}): %#v", res) } return tres, nil } // Configuration accessor autogenerated -func (s *mqlAzureWebAppsite) Configuration() (AzureWebAppsiteconfig, error) { +func (s *mqlAzureSubscriptionWebServiceAppsite) Configuration() (AzureSubscriptionWebServiceAppsiteconfig, error) { res, ok := s.Cache.Load("configuration") if !ok || !res.Valid { if err := s.ComputeConfiguration(); err != nil { @@ -9060,22 +10229,22 @@ func (s *mqlAzureWebAppsite) Configuration() (AzureWebAppsiteconfig, error) { } res, ok = s.Cache.Load("configuration") if !ok { - return nil, errors.New("\"azure.web.appsite\" calculated \"configuration\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.webService.appsite\" calculated \"configuration\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "configuration") } if res.Error != nil { return nil, res.Error } - tres, ok := res.Data.(AzureWebAppsiteconfig) + tres, ok := res.Data.(AzureSubscriptionWebServiceAppsiteconfig) if !ok { - return nil, fmt.Errorf("\"azure.web.appsite\" failed to cast field \"configuration\" to the right type (AzureWebAppsiteconfig): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.webService.appsite\" failed to cast field \"configuration\" to the right type (AzureSubscriptionWebServiceAppsiteconfig): %#v", res) } return tres, nil } // AuthenticationSettings accessor autogenerated -func (s *mqlAzureWebAppsite) AuthenticationSettings() (AzureWebAppsiteauthsettings, error) { +func (s *mqlAzureSubscriptionWebServiceAppsite) AuthenticationSettings() (AzureSubscriptionWebServiceAppsiteauthsettings, error) { res, ok := s.Cache.Load("authenticationSettings") if !ok || !res.Valid { if err := s.ComputeAuthenticationSettings(); err != nil { @@ -9083,22 +10252,22 @@ func (s *mqlAzureWebAppsite) AuthenticationSettings() (AzureWebAppsiteauthsettin } res, ok = s.Cache.Load("authenticationSettings") if !ok { - return nil, errors.New("\"azure.web.appsite\" calculated \"authenticationSettings\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.webService.appsite\" calculated \"authenticationSettings\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "authenticationSettings") } if res.Error != nil { return nil, res.Error } - tres, ok := res.Data.(AzureWebAppsiteauthsettings) + tres, ok := res.Data.(AzureSubscriptionWebServiceAppsiteauthsettings) if !ok { - return nil, fmt.Errorf("\"azure.web.appsite\" failed to cast field \"authenticationSettings\" to the right type (AzureWebAppsiteauthsettings): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.webService.appsite\" failed to cast field \"authenticationSettings\" to the right type (AzureSubscriptionWebServiceAppsiteauthsettings): %#v", res) } return tres, nil } // Metadata accessor autogenerated -func (s *mqlAzureWebAppsite) Metadata() (interface{}, error) { +func (s *mqlAzureSubscriptionWebServiceAppsite) Metadata() (interface{}, error) { res, ok := s.Cache.Load("metadata") if !ok || !res.Valid { if err := s.ComputeMetadata(); err != nil { @@ -9106,7 +10275,7 @@ func (s *mqlAzureWebAppsite) Metadata() (interface{}, error) { } res, ok = s.Cache.Load("metadata") if !ok { - return nil, errors.New("\"azure.web.appsite\" calculated \"metadata\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.webService.appsite\" calculated \"metadata\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "metadata") } @@ -9115,13 +10284,13 @@ func (s *mqlAzureWebAppsite) Metadata() (interface{}, error) { } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.web.appsite\" failed to cast field \"metadata\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.webService.appsite\" failed to cast field \"metadata\" to the right type (interface{}): %#v", res) } return tres, nil } // ApplicationSettings accessor autogenerated -func (s *mqlAzureWebAppsite) ApplicationSettings() (interface{}, error) { +func (s *mqlAzureSubscriptionWebServiceAppsite) ApplicationSettings() (interface{}, error) { res, ok := s.Cache.Load("applicationSettings") if !ok || !res.Valid { if err := s.ComputeApplicationSettings(); err != nil { @@ -9129,7 +10298,7 @@ func (s *mqlAzureWebAppsite) ApplicationSettings() (interface{}, error) { } res, ok = s.Cache.Load("applicationSettings") if !ok { - return nil, errors.New("\"azure.web.appsite\" calculated \"applicationSettings\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.webService.appsite\" calculated \"applicationSettings\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "applicationSettings") } @@ -9138,13 +10307,13 @@ func (s *mqlAzureWebAppsite) ApplicationSettings() (interface{}, error) { } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.web.appsite\" failed to cast field \"applicationSettings\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.webService.appsite\" failed to cast field \"applicationSettings\" to the right type (interface{}): %#v", res) } return tres, nil } // ConnectionSettings accessor autogenerated -func (s *mqlAzureWebAppsite) ConnectionSettings() (interface{}, error) { +func (s *mqlAzureSubscriptionWebServiceAppsite) ConnectionSettings() (interface{}, error) { res, ok := s.Cache.Load("connectionSettings") if !ok || !res.Valid { if err := s.ComputeConnectionSettings(); err != nil { @@ -9152,7 +10321,7 @@ func (s *mqlAzureWebAppsite) ConnectionSettings() (interface{}, error) { } res, ok = s.Cache.Load("connectionSettings") if !ok { - return nil, errors.New("\"azure.web.appsite\" calculated \"connectionSettings\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.webService.appsite\" calculated \"connectionSettings\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "connectionSettings") } @@ -9161,13 +10330,13 @@ func (s *mqlAzureWebAppsite) ConnectionSettings() (interface{}, error) { } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.web.appsite\" failed to cast field \"connectionSettings\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.webService.appsite\" failed to cast field \"connectionSettings\" to the right type (interface{}): %#v", res) } return tres, nil } // Stack accessor autogenerated -func (s *mqlAzureWebAppsite) Stack() (interface{}, error) { +func (s *mqlAzureSubscriptionWebServiceAppsite) Stack() (interface{}, error) { res, ok := s.Cache.Load("stack") if !ok || !res.Valid { if err := s.ComputeStack(); err != nil { @@ -9175,7 +10344,7 @@ func (s *mqlAzureWebAppsite) Stack() (interface{}, error) { } res, ok = s.Cache.Load("stack") if !ok { - return nil, errors.New("\"azure.web.appsite\" calculated \"stack\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.webService.appsite\" calculated \"stack\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "stack") } @@ -9184,14 +10353,14 @@ func (s *mqlAzureWebAppsite) Stack() (interface{}, error) { } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.web.appsite\" failed to cast field \"stack\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.webService.appsite\" failed to cast field \"stack\" to the right type (interface{}): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureWebAppsite) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.web.appsite].MqlCompute") +func (s *mqlAzureSubscriptionWebServiceAppsite) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.webService.appsite].MqlCompute") switch name { case "id": return nil @@ -9222,12 +10391,12 @@ func (s *mqlAzureWebAppsite) MqlCompute(name string) error { case "stack": return s.ComputeStack() default: - return errors.New("Cannot find field '" + name + "' in \"azure.web.appsite\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.webService.appsite\" resource") } } // ComputeConfiguration computer autogenerated -func (s *mqlAzureWebAppsite) ComputeConfiguration() error { +func (s *mqlAzureSubscriptionWebServiceAppsite) ComputeConfiguration() error { var err error if _, ok := s.Cache.Load("configuration"); ok { return nil @@ -9241,7 +10410,7 @@ func (s *mqlAzureWebAppsite) ComputeConfiguration() error { } // ComputeAuthenticationSettings computer autogenerated -func (s *mqlAzureWebAppsite) ComputeAuthenticationSettings() error { +func (s *mqlAzureSubscriptionWebServiceAppsite) ComputeAuthenticationSettings() error { var err error if _, ok := s.Cache.Load("authenticationSettings"); ok { return nil @@ -9255,7 +10424,7 @@ func (s *mqlAzureWebAppsite) ComputeAuthenticationSettings() error { } // ComputeMetadata computer autogenerated -func (s *mqlAzureWebAppsite) ComputeMetadata() error { +func (s *mqlAzureSubscriptionWebServiceAppsite) ComputeMetadata() error { var err error if _, ok := s.Cache.Load("metadata"); ok { return nil @@ -9269,7 +10438,7 @@ func (s *mqlAzureWebAppsite) ComputeMetadata() error { } // ComputeApplicationSettings computer autogenerated -func (s *mqlAzureWebAppsite) ComputeApplicationSettings() error { +func (s *mqlAzureSubscriptionWebServiceAppsite) ComputeApplicationSettings() error { var err error if _, ok := s.Cache.Load("applicationSettings"); ok { return nil @@ -9283,7 +10452,7 @@ func (s *mqlAzureWebAppsite) ComputeApplicationSettings() error { } // ComputeConnectionSettings computer autogenerated -func (s *mqlAzureWebAppsite) ComputeConnectionSettings() error { +func (s *mqlAzureSubscriptionWebServiceAppsite) ComputeConnectionSettings() error { var err error if _, ok := s.Cache.Load("connectionSettings"); ok { return nil @@ -9297,7 +10466,7 @@ func (s *mqlAzureWebAppsite) ComputeConnectionSettings() error { } // ComputeStack computer autogenerated -func (s *mqlAzureWebAppsite) ComputeStack() error { +func (s *mqlAzureSubscriptionWebServiceAppsite) ComputeStack() error { var err error if _, ok := s.Cache.Load("stack"); ok { return nil @@ -9310,8 +10479,8 @@ func (s *mqlAzureWebAppsite) ComputeStack() error { return nil } -// AzureWebAppsiteauthsettings resource interface -type AzureWebAppsiteauthsettings interface { +// AzureSubscriptionWebServiceAppsiteauthsettings resource interface +type AzureSubscriptionWebServiceAppsiteauthsettings interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -9324,21 +10493,21 @@ type AzureWebAppsiteauthsettings interface { Properties() (interface{}, error) } -// mqlAzureWebAppsiteauthsettings for the azure.web.appsiteauthsettings resource -type mqlAzureWebAppsiteauthsettings struct { +// mqlAzureSubscriptionWebServiceAppsiteauthsettings for the azure.subscription.webService.appsiteauthsettings resource +type mqlAzureSubscriptionWebServiceAppsiteauthsettings struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureWebAppsiteauthsettings) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionWebServiceAppsiteauthsettings) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.web.appsiteauthsettings resource -func newAzureWebAppsiteauthsettings(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.webService.appsiteauthsettings resource +func newAzureSubscriptionWebServiceAppsiteauthsettings(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureWebAppsiteauthsettings{runtime.NewResource("azure.web.appsiteauthsettings")} + res := mqlAzureSubscriptionWebServiceAppsiteauthsettings{runtime.NewResource("azure.subscription.webService.appsiteauthsettings")} // assign all named fields var id string @@ -9352,32 +10521,32 @@ func newAzureWebAppsiteauthsettings(runtime *resources.Runtime, args *resources. switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.web.appsiteauthsettings\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.webService.appsiteauthsettings\", its \"id\" argument has the wrong type (expected type \"string\")") } case "name": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.web.appsiteauthsettings\", its \"name\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.webService.appsiteauthsettings\", its \"name\" argument has the wrong type (expected type \"string\")") } case "kind": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.web.appsiteauthsettings\", its \"kind\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.webService.appsiteauthsettings\", its \"kind\" argument has the wrong type (expected type \"string\")") } case "type": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.web.appsiteauthsettings\", its \"type\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.webService.appsiteauthsettings\", its \"type\" argument has the wrong type (expected type \"string\")") } case "properties": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.web.appsiteauthsettings\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.webService.appsiteauthsettings\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.web.appsiteauthsettings\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.webService.appsiteauthsettings\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.web.appsiteauthsettings with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.webService.appsiteauthsettings with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -9395,30 +10564,30 @@ func newAzureWebAppsiteauthsettings(runtime *resources.Runtime, args *resources. return &res, nil } -func (s *mqlAzureWebAppsiteauthsettings) Validate() error { +func (s *mqlAzureSubscriptionWebServiceAppsiteauthsettings) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.web.appsiteauthsettings\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.webService.appsiteauthsettings\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("name"); !ok { - return errors.New("Initialized \"azure.web.appsiteauthsettings\" resource without a \"name\". This field is required.") + return errors.New("Initialized \"azure.subscription.webService.appsiteauthsettings\" resource without a \"name\". This field is required.") } if _, ok := s.Cache.Load("kind"); !ok { - return errors.New("Initialized \"azure.web.appsiteauthsettings\" resource without a \"kind\". This field is required.") + return errors.New("Initialized \"azure.subscription.webService.appsiteauthsettings\" resource without a \"kind\". This field is required.") } if _, ok := s.Cache.Load("type"); !ok { - return errors.New("Initialized \"azure.web.appsiteauthsettings\" resource without a \"type\". This field is required.") + return errors.New("Initialized \"azure.subscription.webService.appsiteauthsettings\" resource without a \"type\". This field is required.") } if _, ok := s.Cache.Load("properties"); !ok { - return errors.New("Initialized \"azure.web.appsiteauthsettings\" resource without a \"properties\". This field is required.") + return errors.New("Initialized \"azure.subscription.webService.appsiteauthsettings\" resource without a \"properties\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureWebAppsiteauthsettings) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.web.appsiteauthsettings].Register") +func (s *mqlAzureSubscriptionWebServiceAppsiteauthsettings) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.webService.appsiteauthsettings].Register") switch name { case "id": return nil @@ -9431,13 +10600,13 @@ func (s *mqlAzureWebAppsiteauthsettings) Register(name string) error { case "properties": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.web.appsiteauthsettings\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.webService.appsiteauthsettings\" resource") } } // Field accessor autogenerated -func (s *mqlAzureWebAppsiteauthsettings) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.web.appsiteauthsettings].Field") +func (s *mqlAzureSubscriptionWebServiceAppsiteauthsettings) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.webService.appsiteauthsettings].Field") switch name { case "id": return s.Id() @@ -9450,93 +10619,93 @@ func (s *mqlAzureWebAppsiteauthsettings) Field(name string) (interface{}, error) case "properties": return s.Properties() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.web.appsiteauthsettings\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.webService.appsiteauthsettings\" resource") } } // Id accessor autogenerated -func (s *mqlAzureWebAppsiteauthsettings) Id() (string, error) { +func (s *mqlAzureSubscriptionWebServiceAppsiteauthsettings) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.web.appsiteauthsettings\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.webService.appsiteauthsettings\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.web.appsiteauthsettings\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.webService.appsiteauthsettings\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Name accessor autogenerated -func (s *mqlAzureWebAppsiteauthsettings) Name() (string, error) { +func (s *mqlAzureSubscriptionWebServiceAppsiteauthsettings) Name() (string, error) { res, ok := s.Cache.Load("name") if !ok || !res.Valid { - return "", errors.New("\"azure.web.appsiteauthsettings\" failed: no value provided for static field \"name\"") + return "", errors.New("\"azure.subscription.webService.appsiteauthsettings\" failed: no value provided for static field \"name\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.web.appsiteauthsettings\" failed to cast field \"name\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.webService.appsiteauthsettings\" failed to cast field \"name\" to the right type (string): %#v", res) } return tres, nil } // Kind accessor autogenerated -func (s *mqlAzureWebAppsiteauthsettings) Kind() (string, error) { +func (s *mqlAzureSubscriptionWebServiceAppsiteauthsettings) Kind() (string, error) { res, ok := s.Cache.Load("kind") if !ok || !res.Valid { - return "", errors.New("\"azure.web.appsiteauthsettings\" failed: no value provided for static field \"kind\"") + return "", errors.New("\"azure.subscription.webService.appsiteauthsettings\" failed: no value provided for static field \"kind\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.web.appsiteauthsettings\" failed to cast field \"kind\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.webService.appsiteauthsettings\" failed to cast field \"kind\" to the right type (string): %#v", res) } return tres, nil } // Type accessor autogenerated -func (s *mqlAzureWebAppsiteauthsettings) Type() (string, error) { +func (s *mqlAzureSubscriptionWebServiceAppsiteauthsettings) Type() (string, error) { res, ok := s.Cache.Load("type") if !ok || !res.Valid { - return "", errors.New("\"azure.web.appsiteauthsettings\" failed: no value provided for static field \"type\"") + return "", errors.New("\"azure.subscription.webService.appsiteauthsettings\" failed: no value provided for static field \"type\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.web.appsiteauthsettings\" failed to cast field \"type\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.webService.appsiteauthsettings\" failed to cast field \"type\" to the right type (string): %#v", res) } return tres, nil } // Properties accessor autogenerated -func (s *mqlAzureWebAppsiteauthsettings) Properties() (interface{}, error) { +func (s *mqlAzureSubscriptionWebServiceAppsiteauthsettings) Properties() (interface{}, error) { res, ok := s.Cache.Load("properties") if !ok || !res.Valid { - return nil, errors.New("\"azure.web.appsiteauthsettings\" failed: no value provided for static field \"properties\"") + return nil, errors.New("\"azure.subscription.webService.appsiteauthsettings\" failed: no value provided for static field \"properties\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.web.appsiteauthsettings\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.webService.appsiteauthsettings\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureWebAppsiteauthsettings) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.web.appsiteauthsettings].MqlCompute") +func (s *mqlAzureSubscriptionWebServiceAppsiteauthsettings) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.webService.appsiteauthsettings].MqlCompute") switch name { case "id": return nil @@ -9549,12 +10718,12 @@ func (s *mqlAzureWebAppsiteauthsettings) MqlCompute(name string) error { case "properties": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.web.appsiteauthsettings\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.webService.appsiteauthsettings\" resource") } } -// AzureWebAppsiteconfig resource interface -type AzureWebAppsiteconfig interface { +// AzureSubscriptionWebServiceAppsiteconfig resource interface +type AzureSubscriptionWebServiceAppsiteconfig interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -9567,21 +10736,21 @@ type AzureWebAppsiteconfig interface { Properties() (interface{}, error) } -// mqlAzureWebAppsiteconfig for the azure.web.appsiteconfig resource -type mqlAzureWebAppsiteconfig struct { +// mqlAzureSubscriptionWebServiceAppsiteconfig for the azure.subscription.webService.appsiteconfig resource +type mqlAzureSubscriptionWebServiceAppsiteconfig struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureWebAppsiteconfig) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionWebServiceAppsiteconfig) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.web.appsiteconfig resource -func newAzureWebAppsiteconfig(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.webService.appsiteconfig resource +func newAzureSubscriptionWebServiceAppsiteconfig(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureWebAppsiteconfig{runtime.NewResource("azure.web.appsiteconfig")} + res := mqlAzureSubscriptionWebServiceAppsiteconfig{runtime.NewResource("azure.subscription.webService.appsiteconfig")} // assign all named fields var id string @@ -9595,32 +10764,32 @@ func newAzureWebAppsiteconfig(runtime *resources.Runtime, args *resources.Args) switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.web.appsiteconfig\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.webService.appsiteconfig\", its \"id\" argument has the wrong type (expected type \"string\")") } case "name": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.web.appsiteconfig\", its \"name\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.webService.appsiteconfig\", its \"name\" argument has the wrong type (expected type \"string\")") } case "kind": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.web.appsiteconfig\", its \"kind\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.webService.appsiteconfig\", its \"kind\" argument has the wrong type (expected type \"string\")") } case "type": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.web.appsiteconfig\", its \"type\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.webService.appsiteconfig\", its \"type\" argument has the wrong type (expected type \"string\")") } case "properties": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.web.appsiteconfig\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.webService.appsiteconfig\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.web.appsiteconfig\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.webService.appsiteconfig\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.web.appsiteconfig with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.webService.appsiteconfig with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -9638,30 +10807,30 @@ func newAzureWebAppsiteconfig(runtime *resources.Runtime, args *resources.Args) return &res, nil } -func (s *mqlAzureWebAppsiteconfig) Validate() error { +func (s *mqlAzureSubscriptionWebServiceAppsiteconfig) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.web.appsiteconfig\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.webService.appsiteconfig\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("name"); !ok { - return errors.New("Initialized \"azure.web.appsiteconfig\" resource without a \"name\". This field is required.") + return errors.New("Initialized \"azure.subscription.webService.appsiteconfig\" resource without a \"name\". This field is required.") } if _, ok := s.Cache.Load("kind"); !ok { - return errors.New("Initialized \"azure.web.appsiteconfig\" resource without a \"kind\". This field is required.") + return errors.New("Initialized \"azure.subscription.webService.appsiteconfig\" resource without a \"kind\". This field is required.") } if _, ok := s.Cache.Load("type"); !ok { - return errors.New("Initialized \"azure.web.appsiteconfig\" resource without a \"type\". This field is required.") + return errors.New("Initialized \"azure.subscription.webService.appsiteconfig\" resource without a \"type\". This field is required.") } if _, ok := s.Cache.Load("properties"); !ok { - return errors.New("Initialized \"azure.web.appsiteconfig\" resource without a \"properties\". This field is required.") + return errors.New("Initialized \"azure.subscription.webService.appsiteconfig\" resource without a \"properties\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureWebAppsiteconfig) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.web.appsiteconfig].Register") +func (s *mqlAzureSubscriptionWebServiceAppsiteconfig) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.webService.appsiteconfig].Register") switch name { case "id": return nil @@ -9674,13 +10843,13 @@ func (s *mqlAzureWebAppsiteconfig) Register(name string) error { case "properties": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.web.appsiteconfig\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.webService.appsiteconfig\" resource") } } // Field accessor autogenerated -func (s *mqlAzureWebAppsiteconfig) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.web.appsiteconfig].Field") +func (s *mqlAzureSubscriptionWebServiceAppsiteconfig) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.webService.appsiteconfig].Field") switch name { case "id": return s.Id() @@ -9693,93 +10862,93 @@ func (s *mqlAzureWebAppsiteconfig) Field(name string) (interface{}, error) { case "properties": return s.Properties() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.web.appsiteconfig\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.webService.appsiteconfig\" resource") } } // Id accessor autogenerated -func (s *mqlAzureWebAppsiteconfig) Id() (string, error) { +func (s *mqlAzureSubscriptionWebServiceAppsiteconfig) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.web.appsiteconfig\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.webService.appsiteconfig\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.web.appsiteconfig\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.webService.appsiteconfig\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Name accessor autogenerated -func (s *mqlAzureWebAppsiteconfig) Name() (string, error) { +func (s *mqlAzureSubscriptionWebServiceAppsiteconfig) Name() (string, error) { res, ok := s.Cache.Load("name") if !ok || !res.Valid { - return "", errors.New("\"azure.web.appsiteconfig\" failed: no value provided for static field \"name\"") + return "", errors.New("\"azure.subscription.webService.appsiteconfig\" failed: no value provided for static field \"name\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.web.appsiteconfig\" failed to cast field \"name\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.webService.appsiteconfig\" failed to cast field \"name\" to the right type (string): %#v", res) } return tres, nil } // Kind accessor autogenerated -func (s *mqlAzureWebAppsiteconfig) Kind() (string, error) { +func (s *mqlAzureSubscriptionWebServiceAppsiteconfig) Kind() (string, error) { res, ok := s.Cache.Load("kind") if !ok || !res.Valid { - return "", errors.New("\"azure.web.appsiteconfig\" failed: no value provided for static field \"kind\"") + return "", errors.New("\"azure.subscription.webService.appsiteconfig\" failed: no value provided for static field \"kind\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.web.appsiteconfig\" failed to cast field \"kind\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.webService.appsiteconfig\" failed to cast field \"kind\" to the right type (string): %#v", res) } return tres, nil } // Type accessor autogenerated -func (s *mqlAzureWebAppsiteconfig) Type() (string, error) { +func (s *mqlAzureSubscriptionWebServiceAppsiteconfig) Type() (string, error) { res, ok := s.Cache.Load("type") if !ok || !res.Valid { - return "", errors.New("\"azure.web.appsiteconfig\" failed: no value provided for static field \"type\"") + return "", errors.New("\"azure.subscription.webService.appsiteconfig\" failed: no value provided for static field \"type\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.web.appsiteconfig\" failed to cast field \"type\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.webService.appsiteconfig\" failed to cast field \"type\" to the right type (string): %#v", res) } return tres, nil } // Properties accessor autogenerated -func (s *mqlAzureWebAppsiteconfig) Properties() (interface{}, error) { +func (s *mqlAzureSubscriptionWebServiceAppsiteconfig) Properties() (interface{}, error) { res, ok := s.Cache.Load("properties") if !ok || !res.Valid { - return nil, errors.New("\"azure.web.appsiteconfig\" failed: no value provided for static field \"properties\"") + return nil, errors.New("\"azure.subscription.webService.appsiteconfig\" failed: no value provided for static field \"properties\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.web.appsiteconfig\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.webService.appsiteconfig\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureWebAppsiteconfig) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.web.appsiteconfig].MqlCompute") +func (s *mqlAzureSubscriptionWebServiceAppsiteconfig) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.webService.appsiteconfig].MqlCompute") switch name { case "id": return nil @@ -9792,35 +10961,45 @@ func (s *mqlAzureWebAppsiteconfig) MqlCompute(name string) error { case "properties": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.web.appsiteconfig\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.webService.appsiteconfig\" resource") } } -// AzureSql resource interface -type AzureSql interface { +// AzureSubscriptionSqlService resource interface +type AzureSubscriptionSqlService interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) Register(string) error Validate() error + SubscriptionId() (string, error) Servers() ([]interface{}, error) } -// mqlAzureSql for the azure.sql resource -type mqlAzureSql struct { +// mqlAzureSubscriptionSqlService for the azure.subscription.sqlService resource +type mqlAzureSubscriptionSqlService struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureSql) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionSqlService) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.sql resource -func newAzureSql(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.sqlService resource +func newAzureSubscriptionSqlService(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureSql{runtime.NewResource("azure.sql")} + res := mqlAzureSubscriptionSqlService{runtime.NewResource("azure.subscription.sqlService")} + var existing AzureSubscriptionSqlService + args, existing, err = res.init(args) + if err != nil { + return nil, err + } + if existing != nil { + return existing, nil + } + // assign all named fields var id string @@ -9832,18 +11011,22 @@ func newAzureSql(runtime *resources.Runtime, args *resources.Args) (interface{}, } switch name { + case "subscriptionId": + if _, ok := val.(string); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService\", its \"subscriptionId\" argument has the wrong type (expected type \"string\")") + } case "servers": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.sql\", its \"servers\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService\", its \"servers\" argument has the wrong type (expected type \"[]interface{}\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.sql\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.sql with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.sqlService with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -9861,37 +11044,59 @@ func newAzureSql(runtime *resources.Runtime, args *resources.Args) (interface{}, return &res, nil } -func (s *mqlAzureSql) Validate() error { +func (s *mqlAzureSubscriptionSqlService) Validate() error { // required arguments - // no required fields found + if _, ok := s.Cache.Load("subscriptionId"); !ok { + return errors.New("Initialized \"azure.subscription.sqlService\" resource without a \"subscriptionId\". This field is required.") + } return nil } // Register accessor autogenerated -func (s *mqlAzureSql) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.sql].Register") +func (s *mqlAzureSubscriptionSqlService) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.sqlService].Register") switch name { + case "subscriptionId": + return nil case "servers": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.sql\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.sqlService\" resource") } } // Field accessor autogenerated -func (s *mqlAzureSql) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.sql].Field") +func (s *mqlAzureSubscriptionSqlService) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.sqlService].Field") switch name { + case "subscriptionId": + return s.SubscriptionId() case "servers": return s.Servers() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.sql\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.sqlService\" resource") + } +} + +// SubscriptionId accessor autogenerated +func (s *mqlAzureSubscriptionSqlService) SubscriptionId() (string, error) { + res, ok := s.Cache.Load("subscriptionId") + if !ok || !res.Valid { + return "", errors.New("\"azure.subscription.sqlService\" failed: no value provided for static field \"subscriptionId\"") + } + if res.Error != nil { + return "", res.Error } + tres, ok := res.Data.(string) + if !ok { + return "", fmt.Errorf("\"azure.subscription.sqlService\" failed to cast field \"subscriptionId\" to the right type (string): %#v", res) + } + return tres, nil } // Servers accessor autogenerated -func (s *mqlAzureSql) Servers() ([]interface{}, error) { +func (s *mqlAzureSubscriptionSqlService) Servers() ([]interface{}, error) { res, ok := s.Cache.Load("servers") if !ok || !res.Valid { if err := s.ComputeServers(); err != nil { @@ -9899,7 +11104,7 @@ func (s *mqlAzureSql) Servers() ([]interface{}, error) { } res, ok = s.Cache.Load("servers") if !ok { - return nil, errors.New("\"azure.sql\" calculated \"servers\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.sqlService\" calculated \"servers\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "servers") } @@ -9908,24 +11113,26 @@ func (s *mqlAzureSql) Servers() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.sql\" failed to cast field \"servers\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.sqlService\" failed to cast field \"servers\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureSql) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.sql].MqlCompute") +func (s *mqlAzureSubscriptionSqlService) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.sqlService].MqlCompute") switch name { + case "subscriptionId": + return nil case "servers": return s.ComputeServers() default: - return errors.New("Cannot find field '" + name + "' in \"azure.sql\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.sqlService\" resource") } } // ComputeServers computer autogenerated -func (s *mqlAzureSql) ComputeServers() error { +func (s *mqlAzureSubscriptionSqlService) ComputeServers() error { var err error if _, ok := s.Cache.Load("servers"); ok { return nil @@ -9938,8 +11145,8 @@ func (s *mqlAzureSql) ComputeServers() error { return nil } -// AzureSqlServer resource interface -type AzureSqlServer interface { +// AzureSubscriptionSqlServiceServer resource interface +type AzureSubscriptionSqlServiceServer interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -9959,24 +11166,24 @@ type AzureSqlServer interface { SecurityAlertPolicy() (interface{}, error) EncryptionProtector() (interface{}, error) ThreatDetectionPolicy() (interface{}, error) - VulnerabilityAssessmentSettings() (AzureSqlServerVulnerabilityassessmentsettings, error) + VulnerabilityAssessmentSettings() (AzureSubscriptionSqlServiceServerVulnerabilityassessmentsettings, error) } -// mqlAzureSqlServer for the azure.sql.server resource -type mqlAzureSqlServer struct { +// mqlAzureSubscriptionSqlServiceServer for the azure.subscription.sqlService.server resource +type mqlAzureSubscriptionSqlServiceServer struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureSqlServer) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionSqlServiceServer) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.sql.server resource -func newAzureSqlServer(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.sqlService.server resource +func newAzureSubscriptionSqlServiceServer(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureSqlServer{runtime.NewResource("azure.sql.server")} + res := mqlAzureSubscriptionSqlServiceServer{runtime.NewResource("azure.subscription.sqlService.server")} // assign all named fields var id string @@ -9990,72 +11197,72 @@ func newAzureSqlServer(runtime *resources.Runtime, args *resources.Args) (interf switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.server\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.server\", its \"id\" argument has the wrong type (expected type \"string\")") } case "name": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.server\", its \"name\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.server\", its \"name\" argument has the wrong type (expected type \"string\")") } case "location": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.server\", its \"location\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.server\", its \"location\" argument has the wrong type (expected type \"string\")") } case "tags": if _, ok := val.(map[string]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.server\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.server\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") } case "type": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.server\", its \"type\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.server\", its \"type\" argument has the wrong type (expected type \"string\")") } case "properties": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.server\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.server\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") } case "databases": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.server\", its \"databases\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.server\", its \"databases\" argument has the wrong type (expected type \"[]interface{}\")") } case "firewallRules": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.server\", its \"firewallRules\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.server\", its \"firewallRules\" argument has the wrong type (expected type \"[]interface{}\")") } case "azureAdAdministrators": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.server\", its \"azureAdAdministrators\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.server\", its \"azureAdAdministrators\" argument has the wrong type (expected type \"[]interface{}\")") } case "connectionPolicy": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.server\", its \"connectionPolicy\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.server\", its \"connectionPolicy\" argument has the wrong type (expected type \"interface{}\")") } case "auditingPolicy": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.server\", its \"auditingPolicy\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.server\", its \"auditingPolicy\" argument has the wrong type (expected type \"interface{}\")") } case "securityAlertPolicy": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.server\", its \"securityAlertPolicy\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.server\", its \"securityAlertPolicy\" argument has the wrong type (expected type \"interface{}\")") } case "encryptionProtector": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.server\", its \"encryptionProtector\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.server\", its \"encryptionProtector\" argument has the wrong type (expected type \"interface{}\")") } case "threatDetectionPolicy": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.server\", its \"threatDetectionPolicy\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.server\", its \"threatDetectionPolicy\" argument has the wrong type (expected type \"interface{}\")") } case "vulnerabilityAssessmentSettings": - if _, ok := val.(AzureSqlServerVulnerabilityassessmentsettings); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.server\", its \"vulnerabilityAssessmentSettings\" argument has the wrong type (expected type \"AzureSqlServerVulnerabilityassessmentsettings\")") + if _, ok := val.(AzureSubscriptionSqlServiceServerVulnerabilityassessmentsettings); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.server\", its \"vulnerabilityAssessmentSettings\" argument has the wrong type (expected type \"AzureSubscriptionSqlServiceServerVulnerabilityassessmentsettings\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.sql.server\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.server\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.sql.server with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.sqlService.server with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -10073,33 +11280,33 @@ func newAzureSqlServer(runtime *resources.Runtime, args *resources.Args) (interf return &res, nil } -func (s *mqlAzureSqlServer) Validate() error { +func (s *mqlAzureSubscriptionSqlServiceServer) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.sql.server\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.server\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("name"); !ok { - return errors.New("Initialized \"azure.sql.server\" resource without a \"name\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.server\" resource without a \"name\". This field is required.") } if _, ok := s.Cache.Load("location"); !ok { - return errors.New("Initialized \"azure.sql.server\" resource without a \"location\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.server\" resource without a \"location\". This field is required.") } if _, ok := s.Cache.Load("tags"); !ok { - return errors.New("Initialized \"azure.sql.server\" resource without a \"tags\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.server\" resource without a \"tags\". This field is required.") } if _, ok := s.Cache.Load("type"); !ok { - return errors.New("Initialized \"azure.sql.server\" resource without a \"type\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.server\" resource without a \"type\". This field is required.") } if _, ok := s.Cache.Load("properties"); !ok { - return errors.New("Initialized \"azure.sql.server\" resource without a \"properties\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.server\" resource without a \"properties\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureSqlServer) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.sql.server].Register") +func (s *mqlAzureSubscriptionSqlServiceServer) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.sqlService.server].Register") switch name { case "id": return nil @@ -10132,13 +11339,13 @@ func (s *mqlAzureSqlServer) Register(name string) error { case "vulnerabilityAssessmentSettings": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.sql.server\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.sqlService.server\" resource") } } // Field accessor autogenerated -func (s *mqlAzureSqlServer) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.sql.server].Field") +func (s *mqlAzureSubscriptionSqlServiceServer) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.sqlService.server].Field") switch name { case "id": return s.Id() @@ -10171,108 +11378,108 @@ func (s *mqlAzureSqlServer) Field(name string) (interface{}, error) { case "vulnerabilityAssessmentSettings": return s.VulnerabilityAssessmentSettings() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.sql.server\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.sqlService.server\" resource") } } // Id accessor autogenerated -func (s *mqlAzureSqlServer) Id() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceServer) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.server\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.sqlService.server\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.server\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.server\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Name accessor autogenerated -func (s *mqlAzureSqlServer) Name() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceServer) Name() (string, error) { res, ok := s.Cache.Load("name") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.server\" failed: no value provided for static field \"name\"") + return "", errors.New("\"azure.subscription.sqlService.server\" failed: no value provided for static field \"name\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.server\" failed to cast field \"name\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.server\" failed to cast field \"name\" to the right type (string): %#v", res) } return tres, nil } // Location accessor autogenerated -func (s *mqlAzureSqlServer) Location() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceServer) Location() (string, error) { res, ok := s.Cache.Load("location") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.server\" failed: no value provided for static field \"location\"") + return "", errors.New("\"azure.subscription.sqlService.server\" failed: no value provided for static field \"location\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.server\" failed to cast field \"location\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.server\" failed to cast field \"location\" to the right type (string): %#v", res) } return tres, nil } // Tags accessor autogenerated -func (s *mqlAzureSqlServer) Tags() (map[string]interface{}, error) { +func (s *mqlAzureSubscriptionSqlServiceServer) Tags() (map[string]interface{}, error) { res, ok := s.Cache.Load("tags") if !ok || !res.Valid { - return nil, errors.New("\"azure.sql.server\" failed: no value provided for static field \"tags\"") + return nil, errors.New("\"azure.subscription.sqlService.server\" failed: no value provided for static field \"tags\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(map[string]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.sql.server\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.sqlService.server\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) } return tres, nil } // Type accessor autogenerated -func (s *mqlAzureSqlServer) Type() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceServer) Type() (string, error) { res, ok := s.Cache.Load("type") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.server\" failed: no value provided for static field \"type\"") + return "", errors.New("\"azure.subscription.sqlService.server\" failed: no value provided for static field \"type\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.server\" failed to cast field \"type\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.server\" failed to cast field \"type\" to the right type (string): %#v", res) } return tres, nil } // Properties accessor autogenerated -func (s *mqlAzureSqlServer) Properties() (interface{}, error) { +func (s *mqlAzureSubscriptionSqlServiceServer) Properties() (interface{}, error) { res, ok := s.Cache.Load("properties") if !ok || !res.Valid { - return nil, errors.New("\"azure.sql.server\" failed: no value provided for static field \"properties\"") + return nil, errors.New("\"azure.subscription.sqlService.server\" failed: no value provided for static field \"properties\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.sql.server\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.sqlService.server\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) } return tres, nil } // Databases accessor autogenerated -func (s *mqlAzureSqlServer) Databases() ([]interface{}, error) { +func (s *mqlAzureSubscriptionSqlServiceServer) Databases() ([]interface{}, error) { res, ok := s.Cache.Load("databases") if !ok || !res.Valid { if err := s.ComputeDatabases(); err != nil { @@ -10280,7 +11487,7 @@ func (s *mqlAzureSqlServer) Databases() ([]interface{}, error) { } res, ok = s.Cache.Load("databases") if !ok { - return nil, errors.New("\"azure.sql.server\" calculated \"databases\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.sqlService.server\" calculated \"databases\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "databases") } @@ -10289,13 +11496,13 @@ func (s *mqlAzureSqlServer) Databases() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.sql.server\" failed to cast field \"databases\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.sqlService.server\" failed to cast field \"databases\" to the right type ([]interface{}): %#v", res) } return tres, nil } // FirewallRules accessor autogenerated -func (s *mqlAzureSqlServer) FirewallRules() ([]interface{}, error) { +func (s *mqlAzureSubscriptionSqlServiceServer) FirewallRules() ([]interface{}, error) { res, ok := s.Cache.Load("firewallRules") if !ok || !res.Valid { if err := s.ComputeFirewallRules(); err != nil { @@ -10303,7 +11510,7 @@ func (s *mqlAzureSqlServer) FirewallRules() ([]interface{}, error) { } res, ok = s.Cache.Load("firewallRules") if !ok { - return nil, errors.New("\"azure.sql.server\" calculated \"firewallRules\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.sqlService.server\" calculated \"firewallRules\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "firewallRules") } @@ -10312,13 +11519,13 @@ func (s *mqlAzureSqlServer) FirewallRules() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.sql.server\" failed to cast field \"firewallRules\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.sqlService.server\" failed to cast field \"firewallRules\" to the right type ([]interface{}): %#v", res) } return tres, nil } // AzureAdAdministrators accessor autogenerated -func (s *mqlAzureSqlServer) AzureAdAdministrators() ([]interface{}, error) { +func (s *mqlAzureSubscriptionSqlServiceServer) AzureAdAdministrators() ([]interface{}, error) { res, ok := s.Cache.Load("azureAdAdministrators") if !ok || !res.Valid { if err := s.ComputeAzureAdAdministrators(); err != nil { @@ -10326,7 +11533,7 @@ func (s *mqlAzureSqlServer) AzureAdAdministrators() ([]interface{}, error) { } res, ok = s.Cache.Load("azureAdAdministrators") if !ok { - return nil, errors.New("\"azure.sql.server\" calculated \"azureAdAdministrators\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.sqlService.server\" calculated \"azureAdAdministrators\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "azureAdAdministrators") } @@ -10335,13 +11542,13 @@ func (s *mqlAzureSqlServer) AzureAdAdministrators() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.sql.server\" failed to cast field \"azureAdAdministrators\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.sqlService.server\" failed to cast field \"azureAdAdministrators\" to the right type ([]interface{}): %#v", res) } return tres, nil } // ConnectionPolicy accessor autogenerated -func (s *mqlAzureSqlServer) ConnectionPolicy() (interface{}, error) { +func (s *mqlAzureSubscriptionSqlServiceServer) ConnectionPolicy() (interface{}, error) { res, ok := s.Cache.Load("connectionPolicy") if !ok || !res.Valid { if err := s.ComputeConnectionPolicy(); err != nil { @@ -10349,7 +11556,7 @@ func (s *mqlAzureSqlServer) ConnectionPolicy() (interface{}, error) { } res, ok = s.Cache.Load("connectionPolicy") if !ok { - return nil, errors.New("\"azure.sql.server\" calculated \"connectionPolicy\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.sqlService.server\" calculated \"connectionPolicy\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "connectionPolicy") } @@ -10358,13 +11565,13 @@ func (s *mqlAzureSqlServer) ConnectionPolicy() (interface{}, error) { } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.sql.server\" failed to cast field \"connectionPolicy\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.sqlService.server\" failed to cast field \"connectionPolicy\" to the right type (interface{}): %#v", res) } return tres, nil } // AuditingPolicy accessor autogenerated -func (s *mqlAzureSqlServer) AuditingPolicy() (interface{}, error) { +func (s *mqlAzureSubscriptionSqlServiceServer) AuditingPolicy() (interface{}, error) { res, ok := s.Cache.Load("auditingPolicy") if !ok || !res.Valid { if err := s.ComputeAuditingPolicy(); err != nil { @@ -10372,7 +11579,7 @@ func (s *mqlAzureSqlServer) AuditingPolicy() (interface{}, error) { } res, ok = s.Cache.Load("auditingPolicy") if !ok { - return nil, errors.New("\"azure.sql.server\" calculated \"auditingPolicy\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.sqlService.server\" calculated \"auditingPolicy\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "auditingPolicy") } @@ -10381,13 +11588,13 @@ func (s *mqlAzureSqlServer) AuditingPolicy() (interface{}, error) { } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.sql.server\" failed to cast field \"auditingPolicy\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.sqlService.server\" failed to cast field \"auditingPolicy\" to the right type (interface{}): %#v", res) } return tres, nil } // SecurityAlertPolicy accessor autogenerated -func (s *mqlAzureSqlServer) SecurityAlertPolicy() (interface{}, error) { +func (s *mqlAzureSubscriptionSqlServiceServer) SecurityAlertPolicy() (interface{}, error) { res, ok := s.Cache.Load("securityAlertPolicy") if !ok || !res.Valid { if err := s.ComputeSecurityAlertPolicy(); err != nil { @@ -10395,7 +11602,7 @@ func (s *mqlAzureSqlServer) SecurityAlertPolicy() (interface{}, error) { } res, ok = s.Cache.Load("securityAlertPolicy") if !ok { - return nil, errors.New("\"azure.sql.server\" calculated \"securityAlertPolicy\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.sqlService.server\" calculated \"securityAlertPolicy\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "securityAlertPolicy") } @@ -10404,13 +11611,13 @@ func (s *mqlAzureSqlServer) SecurityAlertPolicy() (interface{}, error) { } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.sql.server\" failed to cast field \"securityAlertPolicy\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.sqlService.server\" failed to cast field \"securityAlertPolicy\" to the right type (interface{}): %#v", res) } return tres, nil } // EncryptionProtector accessor autogenerated -func (s *mqlAzureSqlServer) EncryptionProtector() (interface{}, error) { +func (s *mqlAzureSubscriptionSqlServiceServer) EncryptionProtector() (interface{}, error) { res, ok := s.Cache.Load("encryptionProtector") if !ok || !res.Valid { if err := s.ComputeEncryptionProtector(); err != nil { @@ -10418,7 +11625,7 @@ func (s *mqlAzureSqlServer) EncryptionProtector() (interface{}, error) { } res, ok = s.Cache.Load("encryptionProtector") if !ok { - return nil, errors.New("\"azure.sql.server\" calculated \"encryptionProtector\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.sqlService.server\" calculated \"encryptionProtector\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "encryptionProtector") } @@ -10427,13 +11634,13 @@ func (s *mqlAzureSqlServer) EncryptionProtector() (interface{}, error) { } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.sql.server\" failed to cast field \"encryptionProtector\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.sqlService.server\" failed to cast field \"encryptionProtector\" to the right type (interface{}): %#v", res) } return tres, nil } // ThreatDetectionPolicy accessor autogenerated -func (s *mqlAzureSqlServer) ThreatDetectionPolicy() (interface{}, error) { +func (s *mqlAzureSubscriptionSqlServiceServer) ThreatDetectionPolicy() (interface{}, error) { res, ok := s.Cache.Load("threatDetectionPolicy") if !ok || !res.Valid { if err := s.ComputeThreatDetectionPolicy(); err != nil { @@ -10441,7 +11648,7 @@ func (s *mqlAzureSqlServer) ThreatDetectionPolicy() (interface{}, error) { } res, ok = s.Cache.Load("threatDetectionPolicy") if !ok { - return nil, errors.New("\"azure.sql.server\" calculated \"threatDetectionPolicy\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.sqlService.server\" calculated \"threatDetectionPolicy\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "threatDetectionPolicy") } @@ -10450,13 +11657,13 @@ func (s *mqlAzureSqlServer) ThreatDetectionPolicy() (interface{}, error) { } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.sql.server\" failed to cast field \"threatDetectionPolicy\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.sqlService.server\" failed to cast field \"threatDetectionPolicy\" to the right type (interface{}): %#v", res) } return tres, nil } // VulnerabilityAssessmentSettings accessor autogenerated -func (s *mqlAzureSqlServer) VulnerabilityAssessmentSettings() (AzureSqlServerVulnerabilityassessmentsettings, error) { +func (s *mqlAzureSubscriptionSqlServiceServer) VulnerabilityAssessmentSettings() (AzureSubscriptionSqlServiceServerVulnerabilityassessmentsettings, error) { res, ok := s.Cache.Load("vulnerabilityAssessmentSettings") if !ok || !res.Valid { if err := s.ComputeVulnerabilityAssessmentSettings(); err != nil { @@ -10464,23 +11671,23 @@ func (s *mqlAzureSqlServer) VulnerabilityAssessmentSettings() (AzureSqlServerVul } res, ok = s.Cache.Load("vulnerabilityAssessmentSettings") if !ok { - return nil, errors.New("\"azure.sql.server\" calculated \"vulnerabilityAssessmentSettings\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.sqlService.server\" calculated \"vulnerabilityAssessmentSettings\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "vulnerabilityAssessmentSettings") } if res.Error != nil { return nil, res.Error } - tres, ok := res.Data.(AzureSqlServerVulnerabilityassessmentsettings) + tres, ok := res.Data.(AzureSubscriptionSqlServiceServerVulnerabilityassessmentsettings) if !ok { - return nil, fmt.Errorf("\"azure.sql.server\" failed to cast field \"vulnerabilityAssessmentSettings\" to the right type (AzureSqlServerVulnerabilityassessmentsettings): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.sqlService.server\" failed to cast field \"vulnerabilityAssessmentSettings\" to the right type (AzureSubscriptionSqlServiceServerVulnerabilityassessmentsettings): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureSqlServer) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.sql.server].MqlCompute") +func (s *mqlAzureSubscriptionSqlServiceServer) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.sqlService.server].MqlCompute") switch name { case "id": return nil @@ -10513,12 +11720,12 @@ func (s *mqlAzureSqlServer) MqlCompute(name string) error { case "vulnerabilityAssessmentSettings": return s.ComputeVulnerabilityAssessmentSettings() default: - return errors.New("Cannot find field '" + name + "' in \"azure.sql.server\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.sqlService.server\" resource") } } // ComputeDatabases computer autogenerated -func (s *mqlAzureSqlServer) ComputeDatabases() error { +func (s *mqlAzureSubscriptionSqlServiceServer) ComputeDatabases() error { var err error if _, ok := s.Cache.Load("databases"); ok { return nil @@ -10532,7 +11739,7 @@ func (s *mqlAzureSqlServer) ComputeDatabases() error { } // ComputeFirewallRules computer autogenerated -func (s *mqlAzureSqlServer) ComputeFirewallRules() error { +func (s *mqlAzureSubscriptionSqlServiceServer) ComputeFirewallRules() error { var err error if _, ok := s.Cache.Load("firewallRules"); ok { return nil @@ -10546,7 +11753,7 @@ func (s *mqlAzureSqlServer) ComputeFirewallRules() error { } // ComputeAzureAdAdministrators computer autogenerated -func (s *mqlAzureSqlServer) ComputeAzureAdAdministrators() error { +func (s *mqlAzureSubscriptionSqlServiceServer) ComputeAzureAdAdministrators() error { var err error if _, ok := s.Cache.Load("azureAdAdministrators"); ok { return nil @@ -10560,7 +11767,7 @@ func (s *mqlAzureSqlServer) ComputeAzureAdAdministrators() error { } // ComputeConnectionPolicy computer autogenerated -func (s *mqlAzureSqlServer) ComputeConnectionPolicy() error { +func (s *mqlAzureSubscriptionSqlServiceServer) ComputeConnectionPolicy() error { var err error if _, ok := s.Cache.Load("connectionPolicy"); ok { return nil @@ -10574,7 +11781,7 @@ func (s *mqlAzureSqlServer) ComputeConnectionPolicy() error { } // ComputeAuditingPolicy computer autogenerated -func (s *mqlAzureSqlServer) ComputeAuditingPolicy() error { +func (s *mqlAzureSubscriptionSqlServiceServer) ComputeAuditingPolicy() error { var err error if _, ok := s.Cache.Load("auditingPolicy"); ok { return nil @@ -10588,7 +11795,7 @@ func (s *mqlAzureSqlServer) ComputeAuditingPolicy() error { } // ComputeSecurityAlertPolicy computer autogenerated -func (s *mqlAzureSqlServer) ComputeSecurityAlertPolicy() error { +func (s *mqlAzureSubscriptionSqlServiceServer) ComputeSecurityAlertPolicy() error { var err error if _, ok := s.Cache.Load("securityAlertPolicy"); ok { return nil @@ -10602,7 +11809,7 @@ func (s *mqlAzureSqlServer) ComputeSecurityAlertPolicy() error { } // ComputeEncryptionProtector computer autogenerated -func (s *mqlAzureSqlServer) ComputeEncryptionProtector() error { +func (s *mqlAzureSubscriptionSqlServiceServer) ComputeEncryptionProtector() error { var err error if _, ok := s.Cache.Load("encryptionProtector"); ok { return nil @@ -10616,7 +11823,7 @@ func (s *mqlAzureSqlServer) ComputeEncryptionProtector() error { } // ComputeThreatDetectionPolicy computer autogenerated -func (s *mqlAzureSqlServer) ComputeThreatDetectionPolicy() error { +func (s *mqlAzureSubscriptionSqlServiceServer) ComputeThreatDetectionPolicy() error { var err error if _, ok := s.Cache.Load("threatDetectionPolicy"); ok { return nil @@ -10630,7 +11837,7 @@ func (s *mqlAzureSqlServer) ComputeThreatDetectionPolicy() error { } // ComputeVulnerabilityAssessmentSettings computer autogenerated -func (s *mqlAzureSqlServer) ComputeVulnerabilityAssessmentSettings() error { +func (s *mqlAzureSubscriptionSqlServiceServer) ComputeVulnerabilityAssessmentSettings() error { var err error if _, ok := s.Cache.Load("vulnerabilityAssessmentSettings"); ok { return nil @@ -10643,8 +11850,8 @@ func (s *mqlAzureSqlServer) ComputeVulnerabilityAssessmentSettings() error { return nil } -// AzureSqlServerVulnerabilityassessmentsettings resource interface -type AzureSqlServerVulnerabilityassessmentsettings interface { +// AzureSubscriptionSqlServiceServerVulnerabilityassessmentsettings resource interface +type AzureSubscriptionSqlServiceServerVulnerabilityassessmentsettings interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -10661,21 +11868,21 @@ type AzureSqlServerVulnerabilityassessmentsettings interface { MailSubscriptionAdmins() (bool, error) } -// mqlAzureSqlServerVulnerabilityassessmentsettings for the azure.sql.server.vulnerabilityassessmentsettings resource -type mqlAzureSqlServerVulnerabilityassessmentsettings struct { +// mqlAzureSubscriptionSqlServiceServerVulnerabilityassessmentsettings for the azure.subscription.sqlService.server.vulnerabilityassessmentsettings resource +type mqlAzureSubscriptionSqlServiceServerVulnerabilityassessmentsettings struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureSqlServerVulnerabilityassessmentsettings) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionSqlServiceServerVulnerabilityassessmentsettings) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.sql.server.vulnerabilityassessmentsettings resource -func newAzureSqlServerVulnerabilityassessmentsettings(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.sqlService.server.vulnerabilityassessmentsettings resource +func newAzureSubscriptionSqlServiceServerVulnerabilityassessmentsettings(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureSqlServerVulnerabilityassessmentsettings{runtime.NewResource("azure.sql.server.vulnerabilityassessmentsettings")} + res := mqlAzureSubscriptionSqlServiceServerVulnerabilityassessmentsettings{runtime.NewResource("azure.subscription.sqlService.server.vulnerabilityassessmentsettings")} // assign all named fields var id string @@ -10689,48 +11896,48 @@ func newAzureSqlServerVulnerabilityassessmentsettings(runtime *resources.Runtime switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.server.vulnerabilityassessmentsettings\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\", its \"id\" argument has the wrong type (expected type \"string\")") } case "name": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.server.vulnerabilityassessmentsettings\", its \"name\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\", its \"name\" argument has the wrong type (expected type \"string\")") } case "type": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.server.vulnerabilityassessmentsettings\", its \"type\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\", its \"type\" argument has the wrong type (expected type \"string\")") } case "storageContainerPath": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.server.vulnerabilityassessmentsettings\", its \"storageContainerPath\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\", its \"storageContainerPath\" argument has the wrong type (expected type \"string\")") } case "storageAccountAccessKey": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.server.vulnerabilityassessmentsettings\", its \"storageAccountAccessKey\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\", its \"storageAccountAccessKey\" argument has the wrong type (expected type \"string\")") } case "storageContainerSasKey": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.server.vulnerabilityassessmentsettings\", its \"storageContainerSasKey\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\", its \"storageContainerSasKey\" argument has the wrong type (expected type \"string\")") } case "recurringScanEnabled": if _, ok := val.(bool); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.server.vulnerabilityassessmentsettings\", its \"recurringScanEnabled\" argument has the wrong type (expected type \"bool\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\", its \"recurringScanEnabled\" argument has the wrong type (expected type \"bool\")") } case "recurringScanEmails": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.server.vulnerabilityassessmentsettings\", its \"recurringScanEmails\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\", its \"recurringScanEmails\" argument has the wrong type (expected type \"[]interface{}\")") } case "mailSubscriptionAdmins": if _, ok := val.(bool); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.server.vulnerabilityassessmentsettings\", its \"mailSubscriptionAdmins\" argument has the wrong type (expected type \"bool\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\", its \"mailSubscriptionAdmins\" argument has the wrong type (expected type \"bool\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.sql.server.vulnerabilityassessmentsettings\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.sql.server.vulnerabilityassessmentsettings with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.sqlService.server.vulnerabilityassessmentsettings with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -10748,42 +11955,42 @@ func newAzureSqlServerVulnerabilityassessmentsettings(runtime *resources.Runtime return &res, nil } -func (s *mqlAzureSqlServerVulnerabilityassessmentsettings) Validate() error { +func (s *mqlAzureSubscriptionSqlServiceServerVulnerabilityassessmentsettings) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.sql.server.vulnerabilityassessmentsettings\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("name"); !ok { - return errors.New("Initialized \"azure.sql.server.vulnerabilityassessmentsettings\" resource without a \"name\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\" resource without a \"name\". This field is required.") } if _, ok := s.Cache.Load("type"); !ok { - return errors.New("Initialized \"azure.sql.server.vulnerabilityassessmentsettings\" resource without a \"type\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\" resource without a \"type\". This field is required.") } if _, ok := s.Cache.Load("storageContainerPath"); !ok { - return errors.New("Initialized \"azure.sql.server.vulnerabilityassessmentsettings\" resource without a \"storageContainerPath\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\" resource without a \"storageContainerPath\". This field is required.") } if _, ok := s.Cache.Load("storageAccountAccessKey"); !ok { - return errors.New("Initialized \"azure.sql.server.vulnerabilityassessmentsettings\" resource without a \"storageAccountAccessKey\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\" resource without a \"storageAccountAccessKey\". This field is required.") } if _, ok := s.Cache.Load("storageContainerSasKey"); !ok { - return errors.New("Initialized \"azure.sql.server.vulnerabilityassessmentsettings\" resource without a \"storageContainerSasKey\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\" resource without a \"storageContainerSasKey\". This field is required.") } if _, ok := s.Cache.Load("recurringScanEnabled"); !ok { - return errors.New("Initialized \"azure.sql.server.vulnerabilityassessmentsettings\" resource without a \"recurringScanEnabled\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\" resource without a \"recurringScanEnabled\". This field is required.") } if _, ok := s.Cache.Load("recurringScanEmails"); !ok { - return errors.New("Initialized \"azure.sql.server.vulnerabilityassessmentsettings\" resource without a \"recurringScanEmails\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\" resource without a \"recurringScanEmails\". This field is required.") } if _, ok := s.Cache.Load("mailSubscriptionAdmins"); !ok { - return errors.New("Initialized \"azure.sql.server.vulnerabilityassessmentsettings\" resource without a \"mailSubscriptionAdmins\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\" resource without a \"mailSubscriptionAdmins\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureSqlServerVulnerabilityassessmentsettings) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.sql.server.vulnerabilityassessmentsettings].Register") +func (s *mqlAzureSubscriptionSqlServiceServerVulnerabilityassessmentsettings) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.sqlService.server.vulnerabilityassessmentsettings].Register") switch name { case "id": return nil @@ -10804,13 +12011,13 @@ func (s *mqlAzureSqlServerVulnerabilityassessmentsettings) Register(name string) case "mailSubscriptionAdmins": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.sql.server.vulnerabilityassessmentsettings\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\" resource") } } // Field accessor autogenerated -func (s *mqlAzureSqlServerVulnerabilityassessmentsettings) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.sql.server.vulnerabilityassessmentsettings].Field") +func (s *mqlAzureSubscriptionSqlServiceServerVulnerabilityassessmentsettings) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.sqlService.server.vulnerabilityassessmentsettings].Field") switch name { case "id": return s.Id() @@ -10831,157 +12038,157 @@ func (s *mqlAzureSqlServerVulnerabilityassessmentsettings) Field(name string) (i case "mailSubscriptionAdmins": return s.MailSubscriptionAdmins() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.sql.server.vulnerabilityassessmentsettings\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\" resource") } } // Id accessor autogenerated -func (s *mqlAzureSqlServerVulnerabilityassessmentsettings) Id() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceServerVulnerabilityassessmentsettings) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.server.vulnerabilityassessmentsettings\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.server.vulnerabilityassessmentsettings\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Name accessor autogenerated -func (s *mqlAzureSqlServerVulnerabilityassessmentsettings) Name() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceServerVulnerabilityassessmentsettings) Name() (string, error) { res, ok := s.Cache.Load("name") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.server.vulnerabilityassessmentsettings\" failed: no value provided for static field \"name\"") + return "", errors.New("\"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\" failed: no value provided for static field \"name\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.server.vulnerabilityassessmentsettings\" failed to cast field \"name\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\" failed to cast field \"name\" to the right type (string): %#v", res) } return tres, nil } // Type accessor autogenerated -func (s *mqlAzureSqlServerVulnerabilityassessmentsettings) Type() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceServerVulnerabilityassessmentsettings) Type() (string, error) { res, ok := s.Cache.Load("type") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.server.vulnerabilityassessmentsettings\" failed: no value provided for static field \"type\"") + return "", errors.New("\"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\" failed: no value provided for static field \"type\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.server.vulnerabilityassessmentsettings\" failed to cast field \"type\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\" failed to cast field \"type\" to the right type (string): %#v", res) } return tres, nil } // StorageContainerPath accessor autogenerated -func (s *mqlAzureSqlServerVulnerabilityassessmentsettings) StorageContainerPath() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceServerVulnerabilityassessmentsettings) StorageContainerPath() (string, error) { res, ok := s.Cache.Load("storageContainerPath") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.server.vulnerabilityassessmentsettings\" failed: no value provided for static field \"storageContainerPath\"") + return "", errors.New("\"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\" failed: no value provided for static field \"storageContainerPath\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.server.vulnerabilityassessmentsettings\" failed to cast field \"storageContainerPath\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\" failed to cast field \"storageContainerPath\" to the right type (string): %#v", res) } return tres, nil } // StorageAccountAccessKey accessor autogenerated -func (s *mqlAzureSqlServerVulnerabilityassessmentsettings) StorageAccountAccessKey() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceServerVulnerabilityassessmentsettings) StorageAccountAccessKey() (string, error) { res, ok := s.Cache.Load("storageAccountAccessKey") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.server.vulnerabilityassessmentsettings\" failed: no value provided for static field \"storageAccountAccessKey\"") + return "", errors.New("\"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\" failed: no value provided for static field \"storageAccountAccessKey\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.server.vulnerabilityassessmentsettings\" failed to cast field \"storageAccountAccessKey\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\" failed to cast field \"storageAccountAccessKey\" to the right type (string): %#v", res) } return tres, nil } // StorageContainerSasKey accessor autogenerated -func (s *mqlAzureSqlServerVulnerabilityassessmentsettings) StorageContainerSasKey() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceServerVulnerabilityassessmentsettings) StorageContainerSasKey() (string, error) { res, ok := s.Cache.Load("storageContainerSasKey") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.server.vulnerabilityassessmentsettings\" failed: no value provided for static field \"storageContainerSasKey\"") + return "", errors.New("\"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\" failed: no value provided for static field \"storageContainerSasKey\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.server.vulnerabilityassessmentsettings\" failed to cast field \"storageContainerSasKey\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\" failed to cast field \"storageContainerSasKey\" to the right type (string): %#v", res) } return tres, nil } // RecurringScanEnabled accessor autogenerated -func (s *mqlAzureSqlServerVulnerabilityassessmentsettings) RecurringScanEnabled() (bool, error) { +func (s *mqlAzureSubscriptionSqlServiceServerVulnerabilityassessmentsettings) RecurringScanEnabled() (bool, error) { res, ok := s.Cache.Load("recurringScanEnabled") if !ok || !res.Valid { - return false, errors.New("\"azure.sql.server.vulnerabilityassessmentsettings\" failed: no value provided for static field \"recurringScanEnabled\"") + return false, errors.New("\"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\" failed: no value provided for static field \"recurringScanEnabled\"") } if res.Error != nil { return false, res.Error } tres, ok := res.Data.(bool) if !ok { - return false, fmt.Errorf("\"azure.sql.server.vulnerabilityassessmentsettings\" failed to cast field \"recurringScanEnabled\" to the right type (bool): %#v", res) + return false, fmt.Errorf("\"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\" failed to cast field \"recurringScanEnabled\" to the right type (bool): %#v", res) } return tres, nil } // RecurringScanEmails accessor autogenerated -func (s *mqlAzureSqlServerVulnerabilityassessmentsettings) RecurringScanEmails() ([]interface{}, error) { +func (s *mqlAzureSubscriptionSqlServiceServerVulnerabilityassessmentsettings) RecurringScanEmails() ([]interface{}, error) { res, ok := s.Cache.Load("recurringScanEmails") if !ok || !res.Valid { - return nil, errors.New("\"azure.sql.server.vulnerabilityassessmentsettings\" failed: no value provided for static field \"recurringScanEmails\"") + return nil, errors.New("\"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\" failed: no value provided for static field \"recurringScanEmails\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.sql.server.vulnerabilityassessmentsettings\" failed to cast field \"recurringScanEmails\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\" failed to cast field \"recurringScanEmails\" to the right type ([]interface{}): %#v", res) } return tres, nil } // MailSubscriptionAdmins accessor autogenerated -func (s *mqlAzureSqlServerVulnerabilityassessmentsettings) MailSubscriptionAdmins() (bool, error) { +func (s *mqlAzureSubscriptionSqlServiceServerVulnerabilityassessmentsettings) MailSubscriptionAdmins() (bool, error) { res, ok := s.Cache.Load("mailSubscriptionAdmins") if !ok || !res.Valid { - return false, errors.New("\"azure.sql.server.vulnerabilityassessmentsettings\" failed: no value provided for static field \"mailSubscriptionAdmins\"") + return false, errors.New("\"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\" failed: no value provided for static field \"mailSubscriptionAdmins\"") } if res.Error != nil { return false, res.Error } tres, ok := res.Data.(bool) if !ok { - return false, fmt.Errorf("\"azure.sql.server.vulnerabilityassessmentsettings\" failed to cast field \"mailSubscriptionAdmins\" to the right type (bool): %#v", res) + return false, fmt.Errorf("\"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\" failed to cast field \"mailSubscriptionAdmins\" to the right type (bool): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureSqlServerVulnerabilityassessmentsettings) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.sql.server.vulnerabilityassessmentsettings].MqlCompute") +func (s *mqlAzureSubscriptionSqlServiceServerVulnerabilityassessmentsettings) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.sqlService.server.vulnerabilityassessmentsettings].MqlCompute") switch name { case "id": return nil @@ -11002,12 +12209,12 @@ func (s *mqlAzureSqlServerVulnerabilityassessmentsettings) MqlCompute(name strin case "mailSubscriptionAdmins": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.sql.server.vulnerabilityassessmentsettings\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.sqlService.server.vulnerabilityassessmentsettings\" resource") } } -// AzureSqlServerAdministrator resource interface -type AzureSqlServerAdministrator interface { +// AzureSubscriptionSqlServiceServerAdministrator resource interface +type AzureSubscriptionSqlServiceServerAdministrator interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -11022,21 +12229,21 @@ type AzureSqlServerAdministrator interface { TenantId() (string, error) } -// mqlAzureSqlServerAdministrator for the azure.sql.server.administrator resource -type mqlAzureSqlServerAdministrator struct { +// mqlAzureSubscriptionSqlServiceServerAdministrator for the azure.subscription.sqlService.server.administrator resource +type mqlAzureSubscriptionSqlServiceServerAdministrator struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureSqlServerAdministrator) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionSqlServiceServerAdministrator) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.sql.server.administrator resource -func newAzureSqlServerAdministrator(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.sqlService.server.administrator resource +func newAzureSubscriptionSqlServiceServerAdministrator(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureSqlServerAdministrator{runtime.NewResource("azure.sql.server.administrator")} + res := mqlAzureSubscriptionSqlServiceServerAdministrator{runtime.NewResource("azure.subscription.sqlService.server.administrator")} // assign all named fields var id string @@ -11050,40 +12257,40 @@ func newAzureSqlServerAdministrator(runtime *resources.Runtime, args *resources. switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.server.administrator\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.server.administrator\", its \"id\" argument has the wrong type (expected type \"string\")") } case "name": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.server.administrator\", its \"name\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.server.administrator\", its \"name\" argument has the wrong type (expected type \"string\")") } case "type": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.server.administrator\", its \"type\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.server.administrator\", its \"type\" argument has the wrong type (expected type \"string\")") } case "administratorType": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.server.administrator\", its \"administratorType\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.server.administrator\", its \"administratorType\" argument has the wrong type (expected type \"string\")") } case "login": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.server.administrator\", its \"login\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.server.administrator\", its \"login\" argument has the wrong type (expected type \"string\")") } case "sid": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.server.administrator\", its \"sid\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.server.administrator\", its \"sid\" argument has the wrong type (expected type \"string\")") } case "tenantId": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.server.administrator\", its \"tenantId\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.server.administrator\", its \"tenantId\" argument has the wrong type (expected type \"string\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.sql.server.administrator\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.server.administrator\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.sql.server.administrator with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.sqlService.server.administrator with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -11101,36 +12308,36 @@ func newAzureSqlServerAdministrator(runtime *resources.Runtime, args *resources. return &res, nil } -func (s *mqlAzureSqlServerAdministrator) Validate() error { +func (s *mqlAzureSubscriptionSqlServiceServerAdministrator) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.sql.server.administrator\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.server.administrator\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("name"); !ok { - return errors.New("Initialized \"azure.sql.server.administrator\" resource without a \"name\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.server.administrator\" resource without a \"name\". This field is required.") } if _, ok := s.Cache.Load("type"); !ok { - return errors.New("Initialized \"azure.sql.server.administrator\" resource without a \"type\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.server.administrator\" resource without a \"type\". This field is required.") } if _, ok := s.Cache.Load("administratorType"); !ok { - return errors.New("Initialized \"azure.sql.server.administrator\" resource without a \"administratorType\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.server.administrator\" resource without a \"administratorType\". This field is required.") } if _, ok := s.Cache.Load("login"); !ok { - return errors.New("Initialized \"azure.sql.server.administrator\" resource without a \"login\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.server.administrator\" resource without a \"login\". This field is required.") } if _, ok := s.Cache.Load("sid"); !ok { - return errors.New("Initialized \"azure.sql.server.administrator\" resource without a \"sid\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.server.administrator\" resource without a \"sid\". This field is required.") } if _, ok := s.Cache.Load("tenantId"); !ok { - return errors.New("Initialized \"azure.sql.server.administrator\" resource without a \"tenantId\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.server.administrator\" resource without a \"tenantId\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureSqlServerAdministrator) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.sql.server.administrator].Register") +func (s *mqlAzureSubscriptionSqlServiceServerAdministrator) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.sqlService.server.administrator].Register") switch name { case "id": return nil @@ -11147,13 +12354,13 @@ func (s *mqlAzureSqlServerAdministrator) Register(name string) error { case "tenantId": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.sql.server.administrator\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.sqlService.server.administrator\" resource") } } // Field accessor autogenerated -func (s *mqlAzureSqlServerAdministrator) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.sql.server.administrator].Field") +func (s *mqlAzureSubscriptionSqlServiceServerAdministrator) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.sqlService.server.administrator].Field") switch name { case "id": return s.Id() @@ -11170,125 +12377,125 @@ func (s *mqlAzureSqlServerAdministrator) Field(name string) (interface{}, error) case "tenantId": return s.TenantId() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.sql.server.administrator\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.sqlService.server.administrator\" resource") } } // Id accessor autogenerated -func (s *mqlAzureSqlServerAdministrator) Id() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceServerAdministrator) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.server.administrator\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.sqlService.server.administrator\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.server.administrator\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.server.administrator\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Name accessor autogenerated -func (s *mqlAzureSqlServerAdministrator) Name() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceServerAdministrator) Name() (string, error) { res, ok := s.Cache.Load("name") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.server.administrator\" failed: no value provided for static field \"name\"") + return "", errors.New("\"azure.subscription.sqlService.server.administrator\" failed: no value provided for static field \"name\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.server.administrator\" failed to cast field \"name\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.server.administrator\" failed to cast field \"name\" to the right type (string): %#v", res) } return tres, nil } // Type accessor autogenerated -func (s *mqlAzureSqlServerAdministrator) Type() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceServerAdministrator) Type() (string, error) { res, ok := s.Cache.Load("type") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.server.administrator\" failed: no value provided for static field \"type\"") + return "", errors.New("\"azure.subscription.sqlService.server.administrator\" failed: no value provided for static field \"type\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.server.administrator\" failed to cast field \"type\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.server.administrator\" failed to cast field \"type\" to the right type (string): %#v", res) } return tres, nil } // AdministratorType accessor autogenerated -func (s *mqlAzureSqlServerAdministrator) AdministratorType() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceServerAdministrator) AdministratorType() (string, error) { res, ok := s.Cache.Load("administratorType") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.server.administrator\" failed: no value provided for static field \"administratorType\"") + return "", errors.New("\"azure.subscription.sqlService.server.administrator\" failed: no value provided for static field \"administratorType\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.server.administrator\" failed to cast field \"administratorType\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.server.administrator\" failed to cast field \"administratorType\" to the right type (string): %#v", res) } return tres, nil } // Login accessor autogenerated -func (s *mqlAzureSqlServerAdministrator) Login() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceServerAdministrator) Login() (string, error) { res, ok := s.Cache.Load("login") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.server.administrator\" failed: no value provided for static field \"login\"") + return "", errors.New("\"azure.subscription.sqlService.server.administrator\" failed: no value provided for static field \"login\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.server.administrator\" failed to cast field \"login\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.server.administrator\" failed to cast field \"login\" to the right type (string): %#v", res) } return tres, nil } // Sid accessor autogenerated -func (s *mqlAzureSqlServerAdministrator) Sid() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceServerAdministrator) Sid() (string, error) { res, ok := s.Cache.Load("sid") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.server.administrator\" failed: no value provided for static field \"sid\"") + return "", errors.New("\"azure.subscription.sqlService.server.administrator\" failed: no value provided for static field \"sid\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.server.administrator\" failed to cast field \"sid\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.server.administrator\" failed to cast field \"sid\" to the right type (string): %#v", res) } return tres, nil } // TenantId accessor autogenerated -func (s *mqlAzureSqlServerAdministrator) TenantId() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceServerAdministrator) TenantId() (string, error) { res, ok := s.Cache.Load("tenantId") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.server.administrator\" failed: no value provided for static field \"tenantId\"") + return "", errors.New("\"azure.subscription.sqlService.server.administrator\" failed: no value provided for static field \"tenantId\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.server.administrator\" failed to cast field \"tenantId\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.server.administrator\" failed to cast field \"tenantId\" to the right type (string): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureSqlServerAdministrator) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.sql.server.administrator].MqlCompute") +func (s *mqlAzureSubscriptionSqlServiceServerAdministrator) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.sqlService.server.administrator].MqlCompute") switch name { case "id": return nil @@ -11305,12 +12512,12 @@ func (s *mqlAzureSqlServerAdministrator) MqlCompute(name string) error { case "tenantId": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.sql.server.administrator\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.sqlService.server.administrator\" resource") } } -// AzureSqlDatabase resource interface -type AzureSqlDatabase interface { +// AzureSubscriptionSqlServiceDatabase resource interface +type AzureSubscriptionSqlServiceDatabase interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -11352,21 +12559,21 @@ type AzureSqlDatabase interface { Usage() ([]interface{}, error) } -// mqlAzureSqlDatabase for the azure.sql.database resource -type mqlAzureSqlDatabase struct { +// mqlAzureSubscriptionSqlServiceDatabase for the azure.subscription.sqlService.database resource +type mqlAzureSubscriptionSqlServiceDatabase struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureSqlDatabase) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionSqlServiceDatabase) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.sql.database resource -func newAzureSqlDatabase(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.sqlService.database resource +func newAzureSubscriptionSqlServiceDatabase(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureSqlDatabase{runtime.NewResource("azure.sql.database")} + res := mqlAzureSubscriptionSqlServiceDatabase{runtime.NewResource("azure.subscription.sqlService.database")} // assign all named fields var id string @@ -11380,148 +12587,148 @@ func newAzureSqlDatabase(runtime *resources.Runtime, args *resources.Args) (inte switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.database\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.database\", its \"id\" argument has the wrong type (expected type \"string\")") } case "name": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.database\", its \"name\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.database\", its \"name\" argument has the wrong type (expected type \"string\")") } case "type": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.database\", its \"type\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.database\", its \"type\" argument has the wrong type (expected type \"string\")") } case "collation": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.database\", its \"collation\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.database\", its \"collation\" argument has the wrong type (expected type \"string\")") } case "creationDate": if _, ok := val.(*time.Time); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.database\", its \"creationDate\" argument has the wrong type (expected type \"*time.Time\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.database\", its \"creationDate\" argument has the wrong type (expected type \"*time.Time\")") } case "containmentState": if _, ok := val.(int64); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.database\", its \"containmentState\" argument has the wrong type (expected type \"int64\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.database\", its \"containmentState\" argument has the wrong type (expected type \"int64\")") } case "currentServiceObjectiveId": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.database\", its \"currentServiceObjectiveId\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.database\", its \"currentServiceObjectiveId\" argument has the wrong type (expected type \"string\")") } case "databaseId": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.database\", its \"databaseId\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.database\", its \"databaseId\" argument has the wrong type (expected type \"string\")") } case "earliestRestoreDate": if _, ok := val.(*time.Time); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.database\", its \"earliestRestoreDate\" argument has the wrong type (expected type \"*time.Time\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.database\", its \"earliestRestoreDate\" argument has the wrong type (expected type \"*time.Time\")") } case "createMode": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.database\", its \"createMode\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.database\", its \"createMode\" argument has the wrong type (expected type \"string\")") } case "sourceDatabaseId": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.database\", its \"sourceDatabaseId\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.database\", its \"sourceDatabaseId\" argument has the wrong type (expected type \"string\")") } case "sourceDatabaseDeletionDate": if _, ok := val.(*time.Time); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.database\", its \"sourceDatabaseDeletionDate\" argument has the wrong type (expected type \"*time.Time\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.database\", its \"sourceDatabaseDeletionDate\" argument has the wrong type (expected type \"*time.Time\")") } case "restorePointInTime": if _, ok := val.(*time.Time); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.database\", its \"restorePointInTime\" argument has the wrong type (expected type \"*time.Time\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.database\", its \"restorePointInTime\" argument has the wrong type (expected type \"*time.Time\")") } case "recoveryServicesRecoveryPointResourceId": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.database\", its \"recoveryServicesRecoveryPointResourceId\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.database\", its \"recoveryServicesRecoveryPointResourceId\" argument has the wrong type (expected type \"string\")") } case "edition": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.database\", its \"edition\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.database\", its \"edition\" argument has the wrong type (expected type \"string\")") } case "maxSizeBytes": if _, ok := val.(int64); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.database\", its \"maxSizeBytes\" argument has the wrong type (expected type \"int64\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.database\", its \"maxSizeBytes\" argument has the wrong type (expected type \"int64\")") } case "requestedServiceObjectiveId": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.database\", its \"requestedServiceObjectiveId\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.database\", its \"requestedServiceObjectiveId\" argument has the wrong type (expected type \"string\")") } case "requestedServiceObjectiveName": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.database\", its \"requestedServiceObjectiveName\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.database\", its \"requestedServiceObjectiveName\" argument has the wrong type (expected type \"string\")") } case "serviceLevelObjective": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.database\", its \"serviceLevelObjective\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.database\", its \"serviceLevelObjective\" argument has the wrong type (expected type \"string\")") } case "status": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.database\", its \"status\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.database\", its \"status\" argument has the wrong type (expected type \"string\")") } case "elasticPoolName": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.database\", its \"elasticPoolName\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.database\", its \"elasticPoolName\" argument has the wrong type (expected type \"string\")") } case "defaultSecondaryLocation": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.database\", its \"defaultSecondaryLocation\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.database\", its \"defaultSecondaryLocation\" argument has the wrong type (expected type \"string\")") } case "serviceTierAdvisors": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.database\", its \"serviceTierAdvisors\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.database\", its \"serviceTierAdvisors\" argument has the wrong type (expected type \"interface{}\")") } case "recommendedIndex": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.database\", its \"recommendedIndex\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.database\", its \"recommendedIndex\" argument has the wrong type (expected type \"interface{}\")") } case "failoverGroupId": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.database\", its \"failoverGroupId\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.database\", its \"failoverGroupId\" argument has the wrong type (expected type \"string\")") } case "readScale": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.database\", its \"readScale\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.database\", its \"readScale\" argument has the wrong type (expected type \"string\")") } case "sampleName": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.database\", its \"sampleName\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.database\", its \"sampleName\" argument has the wrong type (expected type \"string\")") } case "zoneRedundant": if _, ok := val.(bool); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.database\", its \"zoneRedundant\" argument has the wrong type (expected type \"bool\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.database\", its \"zoneRedundant\" argument has the wrong type (expected type \"bool\")") } case "transparentDataEncryption": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.database\", its \"transparentDataEncryption\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.database\", its \"transparentDataEncryption\" argument has the wrong type (expected type \"interface{}\")") } case "advisor": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.database\", its \"advisor\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.database\", its \"advisor\" argument has the wrong type (expected type \"[]interface{}\")") } case "threatDetectionPolicy": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.database\", its \"threatDetectionPolicy\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.database\", its \"threatDetectionPolicy\" argument has the wrong type (expected type \"interface{}\")") } case "connectionPolicy": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.database\", its \"connectionPolicy\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.database\", its \"connectionPolicy\" argument has the wrong type (expected type \"interface{}\")") } case "auditingPolicy": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.database\", its \"auditingPolicy\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.database\", its \"auditingPolicy\" argument has the wrong type (expected type \"interface{}\")") } case "usage": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.database\", its \"usage\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.database\", its \"usage\" argument has the wrong type (expected type \"[]interface{}\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.sql.database\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.database\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.sql.database with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.sqlService.database with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -11539,84 +12746,84 @@ func newAzureSqlDatabase(runtime *resources.Runtime, args *resources.Args) (inte return &res, nil } -func (s *mqlAzureSqlDatabase) Validate() error { +func (s *mqlAzureSubscriptionSqlServiceDatabase) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.sql.database\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.database\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("name"); !ok { - return errors.New("Initialized \"azure.sql.database\" resource without a \"name\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.database\" resource without a \"name\". This field is required.") } if _, ok := s.Cache.Load("type"); !ok { - return errors.New("Initialized \"azure.sql.database\" resource without a \"type\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.database\" resource without a \"type\". This field is required.") } if _, ok := s.Cache.Load("collation"); !ok { - return errors.New("Initialized \"azure.sql.database\" resource without a \"collation\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.database\" resource without a \"collation\". This field is required.") } if _, ok := s.Cache.Load("creationDate"); !ok { - return errors.New("Initialized \"azure.sql.database\" resource without a \"creationDate\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.database\" resource without a \"creationDate\". This field is required.") } if _, ok := s.Cache.Load("databaseId"); !ok { - return errors.New("Initialized \"azure.sql.database\" resource without a \"databaseId\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.database\" resource without a \"databaseId\". This field is required.") } if _, ok := s.Cache.Load("earliestRestoreDate"); !ok { - return errors.New("Initialized \"azure.sql.database\" resource without a \"earliestRestoreDate\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.database\" resource without a \"earliestRestoreDate\". This field is required.") } if _, ok := s.Cache.Load("createMode"); !ok { - return errors.New("Initialized \"azure.sql.database\" resource without a \"createMode\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.database\" resource without a \"createMode\". This field is required.") } if _, ok := s.Cache.Load("sourceDatabaseId"); !ok { - return errors.New("Initialized \"azure.sql.database\" resource without a \"sourceDatabaseId\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.database\" resource without a \"sourceDatabaseId\". This field is required.") } if _, ok := s.Cache.Load("sourceDatabaseDeletionDate"); !ok { - return errors.New("Initialized \"azure.sql.database\" resource without a \"sourceDatabaseDeletionDate\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.database\" resource without a \"sourceDatabaseDeletionDate\". This field is required.") } if _, ok := s.Cache.Load("restorePointInTime"); !ok { - return errors.New("Initialized \"azure.sql.database\" resource without a \"restorePointInTime\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.database\" resource without a \"restorePointInTime\". This field is required.") } if _, ok := s.Cache.Load("recoveryServicesRecoveryPointResourceId"); !ok { - return errors.New("Initialized \"azure.sql.database\" resource without a \"recoveryServicesRecoveryPointResourceId\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.database\" resource without a \"recoveryServicesRecoveryPointResourceId\". This field is required.") } if _, ok := s.Cache.Load("edition"); !ok { - return errors.New("Initialized \"azure.sql.database\" resource without a \"edition\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.database\" resource without a \"edition\". This field is required.") } if _, ok := s.Cache.Load("maxSizeBytes"); !ok { - return errors.New("Initialized \"azure.sql.database\" resource without a \"maxSizeBytes\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.database\" resource without a \"maxSizeBytes\". This field is required.") } if _, ok := s.Cache.Load("requestedServiceObjectiveName"); !ok { - return errors.New("Initialized \"azure.sql.database\" resource without a \"requestedServiceObjectiveName\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.database\" resource without a \"requestedServiceObjectiveName\". This field is required.") } if _, ok := s.Cache.Load("serviceLevelObjective"); !ok { - return errors.New("Initialized \"azure.sql.database\" resource without a \"serviceLevelObjective\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.database\" resource without a \"serviceLevelObjective\". This field is required.") } if _, ok := s.Cache.Load("status"); !ok { - return errors.New("Initialized \"azure.sql.database\" resource without a \"status\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.database\" resource without a \"status\". This field is required.") } if _, ok := s.Cache.Load("elasticPoolName"); !ok { - return errors.New("Initialized \"azure.sql.database\" resource without a \"elasticPoolName\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.database\" resource without a \"elasticPoolName\". This field is required.") } if _, ok := s.Cache.Load("defaultSecondaryLocation"); !ok { - return errors.New("Initialized \"azure.sql.database\" resource without a \"defaultSecondaryLocation\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.database\" resource without a \"defaultSecondaryLocation\". This field is required.") } if _, ok := s.Cache.Load("failoverGroupId"); !ok { - return errors.New("Initialized \"azure.sql.database\" resource without a \"failoverGroupId\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.database\" resource without a \"failoverGroupId\". This field is required.") } if _, ok := s.Cache.Load("readScale"); !ok { - return errors.New("Initialized \"azure.sql.database\" resource without a \"readScale\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.database\" resource without a \"readScale\". This field is required.") } if _, ok := s.Cache.Load("sampleName"); !ok { - return errors.New("Initialized \"azure.sql.database\" resource without a \"sampleName\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.database\" resource without a \"sampleName\". This field is required.") } if _, ok := s.Cache.Load("zoneRedundant"); !ok { - return errors.New("Initialized \"azure.sql.database\" resource without a \"zoneRedundant\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.database\" resource without a \"zoneRedundant\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureSqlDatabase) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.sql.database].Register") +func (s *mqlAzureSubscriptionSqlServiceDatabase) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.sqlService.database].Register") switch name { case "id": return nil @@ -11687,13 +12894,13 @@ func (s *mqlAzureSqlDatabase) Register(name string) error { case "usage": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.sql.database\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.sqlService.database\" resource") } } // Field accessor autogenerated -func (s *mqlAzureSqlDatabase) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.sql.database].Field") +func (s *mqlAzureSubscriptionSqlServiceDatabase) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.sqlService.database].Field") switch name { case "id": return s.Id() @@ -11764,92 +12971,92 @@ func (s *mqlAzureSqlDatabase) Field(name string) (interface{}, error) { case "usage": return s.Usage() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.sql.database\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.sqlService.database\" resource") } } // Id accessor autogenerated -func (s *mqlAzureSqlDatabase) Id() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabase) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.database\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.sqlService.database\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.database\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.database\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Name accessor autogenerated -func (s *mqlAzureSqlDatabase) Name() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabase) Name() (string, error) { res, ok := s.Cache.Load("name") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.database\" failed: no value provided for static field \"name\"") + return "", errors.New("\"azure.subscription.sqlService.database\" failed: no value provided for static field \"name\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.database\" failed to cast field \"name\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.database\" failed to cast field \"name\" to the right type (string): %#v", res) } return tres, nil } // Type accessor autogenerated -func (s *mqlAzureSqlDatabase) Type() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabase) Type() (string, error) { res, ok := s.Cache.Load("type") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.database\" failed: no value provided for static field \"type\"") + return "", errors.New("\"azure.subscription.sqlService.database\" failed: no value provided for static field \"type\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.database\" failed to cast field \"type\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.database\" failed to cast field \"type\" to the right type (string): %#v", res) } return tres, nil } // Collation accessor autogenerated -func (s *mqlAzureSqlDatabase) Collation() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabase) Collation() (string, error) { res, ok := s.Cache.Load("collation") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.database\" failed: no value provided for static field \"collation\"") + return "", errors.New("\"azure.subscription.sqlService.database\" failed: no value provided for static field \"collation\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.database\" failed to cast field \"collation\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.database\" failed to cast field \"collation\" to the right type (string): %#v", res) } return tres, nil } // CreationDate accessor autogenerated -func (s *mqlAzureSqlDatabase) CreationDate() (*time.Time, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabase) CreationDate() (*time.Time, error) { res, ok := s.Cache.Load("creationDate") if !ok || !res.Valid { - return nil, errors.New("\"azure.sql.database\" failed: no value provided for static field \"creationDate\"") + return nil, errors.New("\"azure.subscription.sqlService.database\" failed: no value provided for static field \"creationDate\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(*time.Time) if !ok { - return nil, fmt.Errorf("\"azure.sql.database\" failed to cast field \"creationDate\" to the right type (*time.Time): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.sqlService.database\" failed to cast field \"creationDate\" to the right type (*time.Time): %#v", res) } return tres, nil } // ContainmentState accessor autogenerated -func (s *mqlAzureSqlDatabase) ContainmentState() (int64, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabase) ContainmentState() (int64, error) { res, ok := s.Cache.Load("containmentState") if !ok || !res.Valid { if err := s.ComputeContainmentState(); err != nil { @@ -11857,7 +13064,7 @@ func (s *mqlAzureSqlDatabase) ContainmentState() (int64, error) { } res, ok = s.Cache.Load("containmentState") if !ok { - return 0, errors.New("\"azure.sql.database\" calculated \"containmentState\" but didn't find its value in cache.") + return 0, errors.New("\"azure.subscription.sqlService.database\" calculated \"containmentState\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "containmentState") } @@ -11866,13 +13073,13 @@ func (s *mqlAzureSqlDatabase) ContainmentState() (int64, error) { } tres, ok := res.Data.(int64) if !ok { - return 0, fmt.Errorf("\"azure.sql.database\" failed to cast field \"containmentState\" to the right type (int64): %#v", res) + return 0, fmt.Errorf("\"azure.subscription.sqlService.database\" failed to cast field \"containmentState\" to the right type (int64): %#v", res) } return tres, nil } // CurrentServiceObjectiveId accessor autogenerated -func (s *mqlAzureSqlDatabase) CurrentServiceObjectiveId() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabase) CurrentServiceObjectiveId() (string, error) { res, ok := s.Cache.Load("currentServiceObjectiveId") if !ok || !res.Valid { if err := s.ComputeCurrentServiceObjectiveId(); err != nil { @@ -11880,7 +13087,7 @@ func (s *mqlAzureSqlDatabase) CurrentServiceObjectiveId() (string, error) { } res, ok = s.Cache.Load("currentServiceObjectiveId") if !ok { - return "", errors.New("\"azure.sql.database\" calculated \"currentServiceObjectiveId\" but didn't find its value in cache.") + return "", errors.New("\"azure.subscription.sqlService.database\" calculated \"currentServiceObjectiveId\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "currentServiceObjectiveId") } @@ -11889,157 +13096,157 @@ func (s *mqlAzureSqlDatabase) CurrentServiceObjectiveId() (string, error) { } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.database\" failed to cast field \"currentServiceObjectiveId\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.database\" failed to cast field \"currentServiceObjectiveId\" to the right type (string): %#v", res) } return tres, nil } // DatabaseId accessor autogenerated -func (s *mqlAzureSqlDatabase) DatabaseId() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabase) DatabaseId() (string, error) { res, ok := s.Cache.Load("databaseId") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.database\" failed: no value provided for static field \"databaseId\"") + return "", errors.New("\"azure.subscription.sqlService.database\" failed: no value provided for static field \"databaseId\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.database\" failed to cast field \"databaseId\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.database\" failed to cast field \"databaseId\" to the right type (string): %#v", res) } return tres, nil } // EarliestRestoreDate accessor autogenerated -func (s *mqlAzureSqlDatabase) EarliestRestoreDate() (*time.Time, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabase) EarliestRestoreDate() (*time.Time, error) { res, ok := s.Cache.Load("earliestRestoreDate") if !ok || !res.Valid { - return nil, errors.New("\"azure.sql.database\" failed: no value provided for static field \"earliestRestoreDate\"") + return nil, errors.New("\"azure.subscription.sqlService.database\" failed: no value provided for static field \"earliestRestoreDate\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(*time.Time) if !ok { - return nil, fmt.Errorf("\"azure.sql.database\" failed to cast field \"earliestRestoreDate\" to the right type (*time.Time): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.sqlService.database\" failed to cast field \"earliestRestoreDate\" to the right type (*time.Time): %#v", res) } return tres, nil } // CreateMode accessor autogenerated -func (s *mqlAzureSqlDatabase) CreateMode() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabase) CreateMode() (string, error) { res, ok := s.Cache.Load("createMode") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.database\" failed: no value provided for static field \"createMode\"") + return "", errors.New("\"azure.subscription.sqlService.database\" failed: no value provided for static field \"createMode\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.database\" failed to cast field \"createMode\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.database\" failed to cast field \"createMode\" to the right type (string): %#v", res) } return tres, nil } // SourceDatabaseId accessor autogenerated -func (s *mqlAzureSqlDatabase) SourceDatabaseId() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabase) SourceDatabaseId() (string, error) { res, ok := s.Cache.Load("sourceDatabaseId") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.database\" failed: no value provided for static field \"sourceDatabaseId\"") + return "", errors.New("\"azure.subscription.sqlService.database\" failed: no value provided for static field \"sourceDatabaseId\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.database\" failed to cast field \"sourceDatabaseId\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.database\" failed to cast field \"sourceDatabaseId\" to the right type (string): %#v", res) } return tres, nil } // SourceDatabaseDeletionDate accessor autogenerated -func (s *mqlAzureSqlDatabase) SourceDatabaseDeletionDate() (*time.Time, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabase) SourceDatabaseDeletionDate() (*time.Time, error) { res, ok := s.Cache.Load("sourceDatabaseDeletionDate") if !ok || !res.Valid { - return nil, errors.New("\"azure.sql.database\" failed: no value provided for static field \"sourceDatabaseDeletionDate\"") + return nil, errors.New("\"azure.subscription.sqlService.database\" failed: no value provided for static field \"sourceDatabaseDeletionDate\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(*time.Time) if !ok { - return nil, fmt.Errorf("\"azure.sql.database\" failed to cast field \"sourceDatabaseDeletionDate\" to the right type (*time.Time): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.sqlService.database\" failed to cast field \"sourceDatabaseDeletionDate\" to the right type (*time.Time): %#v", res) } return tres, nil } // RestorePointInTime accessor autogenerated -func (s *mqlAzureSqlDatabase) RestorePointInTime() (*time.Time, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabase) RestorePointInTime() (*time.Time, error) { res, ok := s.Cache.Load("restorePointInTime") if !ok || !res.Valid { - return nil, errors.New("\"azure.sql.database\" failed: no value provided for static field \"restorePointInTime\"") + return nil, errors.New("\"azure.subscription.sqlService.database\" failed: no value provided for static field \"restorePointInTime\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(*time.Time) if !ok { - return nil, fmt.Errorf("\"azure.sql.database\" failed to cast field \"restorePointInTime\" to the right type (*time.Time): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.sqlService.database\" failed to cast field \"restorePointInTime\" to the right type (*time.Time): %#v", res) } return tres, nil } // RecoveryServicesRecoveryPointResourceId accessor autogenerated -func (s *mqlAzureSqlDatabase) RecoveryServicesRecoveryPointResourceId() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabase) RecoveryServicesRecoveryPointResourceId() (string, error) { res, ok := s.Cache.Load("recoveryServicesRecoveryPointResourceId") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.database\" failed: no value provided for static field \"recoveryServicesRecoveryPointResourceId\"") + return "", errors.New("\"azure.subscription.sqlService.database\" failed: no value provided for static field \"recoveryServicesRecoveryPointResourceId\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.database\" failed to cast field \"recoveryServicesRecoveryPointResourceId\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.database\" failed to cast field \"recoveryServicesRecoveryPointResourceId\" to the right type (string): %#v", res) } return tres, nil } // Edition accessor autogenerated -func (s *mqlAzureSqlDatabase) Edition() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabase) Edition() (string, error) { res, ok := s.Cache.Load("edition") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.database\" failed: no value provided for static field \"edition\"") + return "", errors.New("\"azure.subscription.sqlService.database\" failed: no value provided for static field \"edition\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.database\" failed to cast field \"edition\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.database\" failed to cast field \"edition\" to the right type (string): %#v", res) } return tres, nil } // MaxSizeBytes accessor autogenerated -func (s *mqlAzureSqlDatabase) MaxSizeBytes() (int64, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabase) MaxSizeBytes() (int64, error) { res, ok := s.Cache.Load("maxSizeBytes") if !ok || !res.Valid { - return 0, errors.New("\"azure.sql.database\" failed: no value provided for static field \"maxSizeBytes\"") + return 0, errors.New("\"azure.subscription.sqlService.database\" failed: no value provided for static field \"maxSizeBytes\"") } if res.Error != nil { return 0, res.Error } tres, ok := res.Data.(int64) if !ok { - return 0, fmt.Errorf("\"azure.sql.database\" failed to cast field \"maxSizeBytes\" to the right type (int64): %#v", res) + return 0, fmt.Errorf("\"azure.subscription.sqlService.database\" failed to cast field \"maxSizeBytes\" to the right type (int64): %#v", res) } return tres, nil } // RequestedServiceObjectiveId accessor autogenerated -func (s *mqlAzureSqlDatabase) RequestedServiceObjectiveId() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabase) RequestedServiceObjectiveId() (string, error) { res, ok := s.Cache.Load("requestedServiceObjectiveId") if !ok || !res.Valid { if err := s.ComputeRequestedServiceObjectiveId(); err != nil { @@ -12047,7 +13254,7 @@ func (s *mqlAzureSqlDatabase) RequestedServiceObjectiveId() (string, error) { } res, ok = s.Cache.Load("requestedServiceObjectiveId") if !ok { - return "", errors.New("\"azure.sql.database\" calculated \"requestedServiceObjectiveId\" but didn't find its value in cache.") + return "", errors.New("\"azure.subscription.sqlService.database\" calculated \"requestedServiceObjectiveId\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "requestedServiceObjectiveId") } @@ -12056,93 +13263,93 @@ func (s *mqlAzureSqlDatabase) RequestedServiceObjectiveId() (string, error) { } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.database\" failed to cast field \"requestedServiceObjectiveId\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.database\" failed to cast field \"requestedServiceObjectiveId\" to the right type (string): %#v", res) } return tres, nil } // RequestedServiceObjectiveName accessor autogenerated -func (s *mqlAzureSqlDatabase) RequestedServiceObjectiveName() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabase) RequestedServiceObjectiveName() (string, error) { res, ok := s.Cache.Load("requestedServiceObjectiveName") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.database\" failed: no value provided for static field \"requestedServiceObjectiveName\"") + return "", errors.New("\"azure.subscription.sqlService.database\" failed: no value provided for static field \"requestedServiceObjectiveName\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.database\" failed to cast field \"requestedServiceObjectiveName\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.database\" failed to cast field \"requestedServiceObjectiveName\" to the right type (string): %#v", res) } return tres, nil } // ServiceLevelObjective accessor autogenerated -func (s *mqlAzureSqlDatabase) ServiceLevelObjective() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabase) ServiceLevelObjective() (string, error) { res, ok := s.Cache.Load("serviceLevelObjective") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.database\" failed: no value provided for static field \"serviceLevelObjective\"") + return "", errors.New("\"azure.subscription.sqlService.database\" failed: no value provided for static field \"serviceLevelObjective\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.database\" failed to cast field \"serviceLevelObjective\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.database\" failed to cast field \"serviceLevelObjective\" to the right type (string): %#v", res) } return tres, nil } // Status accessor autogenerated -func (s *mqlAzureSqlDatabase) Status() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabase) Status() (string, error) { res, ok := s.Cache.Load("status") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.database\" failed: no value provided for static field \"status\"") + return "", errors.New("\"azure.subscription.sqlService.database\" failed: no value provided for static field \"status\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.database\" failed to cast field \"status\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.database\" failed to cast field \"status\" to the right type (string): %#v", res) } return tres, nil } // ElasticPoolName accessor autogenerated -func (s *mqlAzureSqlDatabase) ElasticPoolName() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabase) ElasticPoolName() (string, error) { res, ok := s.Cache.Load("elasticPoolName") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.database\" failed: no value provided for static field \"elasticPoolName\"") + return "", errors.New("\"azure.subscription.sqlService.database\" failed: no value provided for static field \"elasticPoolName\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.database\" failed to cast field \"elasticPoolName\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.database\" failed to cast field \"elasticPoolName\" to the right type (string): %#v", res) } return tres, nil } // DefaultSecondaryLocation accessor autogenerated -func (s *mqlAzureSqlDatabase) DefaultSecondaryLocation() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabase) DefaultSecondaryLocation() (string, error) { res, ok := s.Cache.Load("defaultSecondaryLocation") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.database\" failed: no value provided for static field \"defaultSecondaryLocation\"") + return "", errors.New("\"azure.subscription.sqlService.database\" failed: no value provided for static field \"defaultSecondaryLocation\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.database\" failed to cast field \"defaultSecondaryLocation\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.database\" failed to cast field \"defaultSecondaryLocation\" to the right type (string): %#v", res) } return tres, nil } // ServiceTierAdvisors accessor autogenerated -func (s *mqlAzureSqlDatabase) ServiceTierAdvisors() (interface{}, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabase) ServiceTierAdvisors() (interface{}, error) { res, ok := s.Cache.Load("serviceTierAdvisors") if !ok || !res.Valid { if err := s.ComputeServiceTierAdvisors(); err != nil { @@ -12150,7 +13357,7 @@ func (s *mqlAzureSqlDatabase) ServiceTierAdvisors() (interface{}, error) { } res, ok = s.Cache.Load("serviceTierAdvisors") if !ok { - return nil, errors.New("\"azure.sql.database\" calculated \"serviceTierAdvisors\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.sqlService.database\" calculated \"serviceTierAdvisors\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "serviceTierAdvisors") } @@ -12159,13 +13366,13 @@ func (s *mqlAzureSqlDatabase) ServiceTierAdvisors() (interface{}, error) { } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.sql.database\" failed to cast field \"serviceTierAdvisors\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.sqlService.database\" failed to cast field \"serviceTierAdvisors\" to the right type (interface{}): %#v", res) } return tres, nil } // RecommendedIndex accessor autogenerated -func (s *mqlAzureSqlDatabase) RecommendedIndex() (interface{}, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabase) RecommendedIndex() (interface{}, error) { res, ok := s.Cache.Load("recommendedIndex") if !ok || !res.Valid { if err := s.ComputeRecommendedIndex(); err != nil { @@ -12173,7 +13380,7 @@ func (s *mqlAzureSqlDatabase) RecommendedIndex() (interface{}, error) { } res, ok = s.Cache.Load("recommendedIndex") if !ok { - return nil, errors.New("\"azure.sql.database\" calculated \"recommendedIndex\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.sqlService.database\" calculated \"recommendedIndex\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "recommendedIndex") } @@ -12182,77 +13389,77 @@ func (s *mqlAzureSqlDatabase) RecommendedIndex() (interface{}, error) { } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.sql.database\" failed to cast field \"recommendedIndex\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.sqlService.database\" failed to cast field \"recommendedIndex\" to the right type (interface{}): %#v", res) } return tres, nil } // FailoverGroupId accessor autogenerated -func (s *mqlAzureSqlDatabase) FailoverGroupId() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabase) FailoverGroupId() (string, error) { res, ok := s.Cache.Load("failoverGroupId") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.database\" failed: no value provided for static field \"failoverGroupId\"") + return "", errors.New("\"azure.subscription.sqlService.database\" failed: no value provided for static field \"failoverGroupId\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.database\" failed to cast field \"failoverGroupId\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.database\" failed to cast field \"failoverGroupId\" to the right type (string): %#v", res) } return tres, nil } // ReadScale accessor autogenerated -func (s *mqlAzureSqlDatabase) ReadScale() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabase) ReadScale() (string, error) { res, ok := s.Cache.Load("readScale") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.database\" failed: no value provided for static field \"readScale\"") + return "", errors.New("\"azure.subscription.sqlService.database\" failed: no value provided for static field \"readScale\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.database\" failed to cast field \"readScale\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.database\" failed to cast field \"readScale\" to the right type (string): %#v", res) } return tres, nil } // SampleName accessor autogenerated -func (s *mqlAzureSqlDatabase) SampleName() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabase) SampleName() (string, error) { res, ok := s.Cache.Load("sampleName") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.database\" failed: no value provided for static field \"sampleName\"") + return "", errors.New("\"azure.subscription.sqlService.database\" failed: no value provided for static field \"sampleName\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.database\" failed to cast field \"sampleName\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.database\" failed to cast field \"sampleName\" to the right type (string): %#v", res) } return tres, nil } // ZoneRedundant accessor autogenerated -func (s *mqlAzureSqlDatabase) ZoneRedundant() (bool, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabase) ZoneRedundant() (bool, error) { res, ok := s.Cache.Load("zoneRedundant") if !ok || !res.Valid { - return false, errors.New("\"azure.sql.database\" failed: no value provided for static field \"zoneRedundant\"") + return false, errors.New("\"azure.subscription.sqlService.database\" failed: no value provided for static field \"zoneRedundant\"") } if res.Error != nil { return false, res.Error } tres, ok := res.Data.(bool) if !ok { - return false, fmt.Errorf("\"azure.sql.database\" failed to cast field \"zoneRedundant\" to the right type (bool): %#v", res) + return false, fmt.Errorf("\"azure.subscription.sqlService.database\" failed to cast field \"zoneRedundant\" to the right type (bool): %#v", res) } return tres, nil } // TransparentDataEncryption accessor autogenerated -func (s *mqlAzureSqlDatabase) TransparentDataEncryption() (interface{}, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabase) TransparentDataEncryption() (interface{}, error) { res, ok := s.Cache.Load("transparentDataEncryption") if !ok || !res.Valid { if err := s.ComputeTransparentDataEncryption(); err != nil { @@ -12260,7 +13467,7 @@ func (s *mqlAzureSqlDatabase) TransparentDataEncryption() (interface{}, error) { } res, ok = s.Cache.Load("transparentDataEncryption") if !ok { - return nil, errors.New("\"azure.sql.database\" calculated \"transparentDataEncryption\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.sqlService.database\" calculated \"transparentDataEncryption\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "transparentDataEncryption") } @@ -12269,13 +13476,13 @@ func (s *mqlAzureSqlDatabase) TransparentDataEncryption() (interface{}, error) { } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.sql.database\" failed to cast field \"transparentDataEncryption\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.sqlService.database\" failed to cast field \"transparentDataEncryption\" to the right type (interface{}): %#v", res) } return tres, nil } // Advisor accessor autogenerated -func (s *mqlAzureSqlDatabase) Advisor() ([]interface{}, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabase) Advisor() ([]interface{}, error) { res, ok := s.Cache.Load("advisor") if !ok || !res.Valid { if err := s.ComputeAdvisor(); err != nil { @@ -12283,7 +13490,7 @@ func (s *mqlAzureSqlDatabase) Advisor() ([]interface{}, error) { } res, ok = s.Cache.Load("advisor") if !ok { - return nil, errors.New("\"azure.sql.database\" calculated \"advisor\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.sqlService.database\" calculated \"advisor\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "advisor") } @@ -12292,13 +13499,13 @@ func (s *mqlAzureSqlDatabase) Advisor() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.sql.database\" failed to cast field \"advisor\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.sqlService.database\" failed to cast field \"advisor\" to the right type ([]interface{}): %#v", res) } return tres, nil } // ThreatDetectionPolicy accessor autogenerated -func (s *mqlAzureSqlDatabase) ThreatDetectionPolicy() (interface{}, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabase) ThreatDetectionPolicy() (interface{}, error) { res, ok := s.Cache.Load("threatDetectionPolicy") if !ok || !res.Valid { if err := s.ComputeThreatDetectionPolicy(); err != nil { @@ -12306,7 +13513,7 @@ func (s *mqlAzureSqlDatabase) ThreatDetectionPolicy() (interface{}, error) { } res, ok = s.Cache.Load("threatDetectionPolicy") if !ok { - return nil, errors.New("\"azure.sql.database\" calculated \"threatDetectionPolicy\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.sqlService.database\" calculated \"threatDetectionPolicy\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "threatDetectionPolicy") } @@ -12315,13 +13522,13 @@ func (s *mqlAzureSqlDatabase) ThreatDetectionPolicy() (interface{}, error) { } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.sql.database\" failed to cast field \"threatDetectionPolicy\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.sqlService.database\" failed to cast field \"threatDetectionPolicy\" to the right type (interface{}): %#v", res) } return tres, nil } // ConnectionPolicy accessor autogenerated -func (s *mqlAzureSqlDatabase) ConnectionPolicy() (interface{}, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabase) ConnectionPolicy() (interface{}, error) { res, ok := s.Cache.Load("connectionPolicy") if !ok || !res.Valid { if err := s.ComputeConnectionPolicy(); err != nil { @@ -12329,7 +13536,7 @@ func (s *mqlAzureSqlDatabase) ConnectionPolicy() (interface{}, error) { } res, ok = s.Cache.Load("connectionPolicy") if !ok { - return nil, errors.New("\"azure.sql.database\" calculated \"connectionPolicy\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.sqlService.database\" calculated \"connectionPolicy\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "connectionPolicy") } @@ -12338,13 +13545,13 @@ func (s *mqlAzureSqlDatabase) ConnectionPolicy() (interface{}, error) { } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.sql.database\" failed to cast field \"connectionPolicy\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.sqlService.database\" failed to cast field \"connectionPolicy\" to the right type (interface{}): %#v", res) } return tres, nil } // AuditingPolicy accessor autogenerated -func (s *mqlAzureSqlDatabase) AuditingPolicy() (interface{}, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabase) AuditingPolicy() (interface{}, error) { res, ok := s.Cache.Load("auditingPolicy") if !ok || !res.Valid { if err := s.ComputeAuditingPolicy(); err != nil { @@ -12352,7 +13559,7 @@ func (s *mqlAzureSqlDatabase) AuditingPolicy() (interface{}, error) { } res, ok = s.Cache.Load("auditingPolicy") if !ok { - return nil, errors.New("\"azure.sql.database\" calculated \"auditingPolicy\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.sqlService.database\" calculated \"auditingPolicy\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "auditingPolicy") } @@ -12361,13 +13568,13 @@ func (s *mqlAzureSqlDatabase) AuditingPolicy() (interface{}, error) { } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.sql.database\" failed to cast field \"auditingPolicy\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.sqlService.database\" failed to cast field \"auditingPolicy\" to the right type (interface{}): %#v", res) } return tres, nil } // Usage accessor autogenerated -func (s *mqlAzureSqlDatabase) Usage() ([]interface{}, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabase) Usage() ([]interface{}, error) { res, ok := s.Cache.Load("usage") if !ok || !res.Valid { if err := s.ComputeUsage(); err != nil { @@ -12375,7 +13582,7 @@ func (s *mqlAzureSqlDatabase) Usage() ([]interface{}, error) { } res, ok = s.Cache.Load("usage") if !ok { - return nil, errors.New("\"azure.sql.database\" calculated \"usage\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.sqlService.database\" calculated \"usage\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "usage") } @@ -12384,14 +13591,14 @@ func (s *mqlAzureSqlDatabase) Usage() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.sql.database\" failed to cast field \"usage\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.sqlService.database\" failed to cast field \"usage\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureSqlDatabase) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.sql.database].MqlCompute") +func (s *mqlAzureSubscriptionSqlServiceDatabase) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.sqlService.database].MqlCompute") switch name { case "id": return nil @@ -12462,12 +13669,12 @@ func (s *mqlAzureSqlDatabase) MqlCompute(name string) error { case "usage": return s.ComputeUsage() default: - return errors.New("Cannot find field '" + name + "' in \"azure.sql.database\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.sqlService.database\" resource") } } // ComputeContainmentState computer autogenerated -func (s *mqlAzureSqlDatabase) ComputeContainmentState() error { +func (s *mqlAzureSubscriptionSqlServiceDatabase) ComputeContainmentState() error { var err error if _, ok := s.Cache.Load("containmentState"); ok { return nil @@ -12481,7 +13688,7 @@ func (s *mqlAzureSqlDatabase) ComputeContainmentState() error { } // ComputeCurrentServiceObjectiveId computer autogenerated -func (s *mqlAzureSqlDatabase) ComputeCurrentServiceObjectiveId() error { +func (s *mqlAzureSubscriptionSqlServiceDatabase) ComputeCurrentServiceObjectiveId() error { var err error if _, ok := s.Cache.Load("currentServiceObjectiveId"); ok { return nil @@ -12495,7 +13702,7 @@ func (s *mqlAzureSqlDatabase) ComputeCurrentServiceObjectiveId() error { } // ComputeRequestedServiceObjectiveId computer autogenerated -func (s *mqlAzureSqlDatabase) ComputeRequestedServiceObjectiveId() error { +func (s *mqlAzureSubscriptionSqlServiceDatabase) ComputeRequestedServiceObjectiveId() error { var err error if _, ok := s.Cache.Load("requestedServiceObjectiveId"); ok { return nil @@ -12509,7 +13716,7 @@ func (s *mqlAzureSqlDatabase) ComputeRequestedServiceObjectiveId() error { } // ComputeServiceTierAdvisors computer autogenerated -func (s *mqlAzureSqlDatabase) ComputeServiceTierAdvisors() error { +func (s *mqlAzureSubscriptionSqlServiceDatabase) ComputeServiceTierAdvisors() error { var err error if _, ok := s.Cache.Load("serviceTierAdvisors"); ok { return nil @@ -12523,7 +13730,7 @@ func (s *mqlAzureSqlDatabase) ComputeServiceTierAdvisors() error { } // ComputeRecommendedIndex computer autogenerated -func (s *mqlAzureSqlDatabase) ComputeRecommendedIndex() error { +func (s *mqlAzureSubscriptionSqlServiceDatabase) ComputeRecommendedIndex() error { var err error if _, ok := s.Cache.Load("recommendedIndex"); ok { return nil @@ -12537,7 +13744,7 @@ func (s *mqlAzureSqlDatabase) ComputeRecommendedIndex() error { } // ComputeTransparentDataEncryption computer autogenerated -func (s *mqlAzureSqlDatabase) ComputeTransparentDataEncryption() error { +func (s *mqlAzureSubscriptionSqlServiceDatabase) ComputeTransparentDataEncryption() error { var err error if _, ok := s.Cache.Load("transparentDataEncryption"); ok { return nil @@ -12551,7 +13758,7 @@ func (s *mqlAzureSqlDatabase) ComputeTransparentDataEncryption() error { } // ComputeAdvisor computer autogenerated -func (s *mqlAzureSqlDatabase) ComputeAdvisor() error { +func (s *mqlAzureSubscriptionSqlServiceDatabase) ComputeAdvisor() error { var err error if _, ok := s.Cache.Load("advisor"); ok { return nil @@ -12565,7 +13772,7 @@ func (s *mqlAzureSqlDatabase) ComputeAdvisor() error { } // ComputeThreatDetectionPolicy computer autogenerated -func (s *mqlAzureSqlDatabase) ComputeThreatDetectionPolicy() error { +func (s *mqlAzureSubscriptionSqlServiceDatabase) ComputeThreatDetectionPolicy() error { var err error if _, ok := s.Cache.Load("threatDetectionPolicy"); ok { return nil @@ -12579,7 +13786,7 @@ func (s *mqlAzureSqlDatabase) ComputeThreatDetectionPolicy() error { } // ComputeConnectionPolicy computer autogenerated -func (s *mqlAzureSqlDatabase) ComputeConnectionPolicy() error { +func (s *mqlAzureSubscriptionSqlServiceDatabase) ComputeConnectionPolicy() error { var err error if _, ok := s.Cache.Load("connectionPolicy"); ok { return nil @@ -12593,7 +13800,7 @@ func (s *mqlAzureSqlDatabase) ComputeConnectionPolicy() error { } // ComputeAuditingPolicy computer autogenerated -func (s *mqlAzureSqlDatabase) ComputeAuditingPolicy() error { +func (s *mqlAzureSubscriptionSqlServiceDatabase) ComputeAuditingPolicy() error { var err error if _, ok := s.Cache.Load("auditingPolicy"); ok { return nil @@ -12607,7 +13814,7 @@ func (s *mqlAzureSqlDatabase) ComputeAuditingPolicy() error { } // ComputeUsage computer autogenerated -func (s *mqlAzureSqlDatabase) ComputeUsage() error { +func (s *mqlAzureSubscriptionSqlServiceDatabase) ComputeUsage() error { var err error if _, ok := s.Cache.Load("usage"); ok { return nil @@ -12620,8 +13827,8 @@ func (s *mqlAzureSqlDatabase) ComputeUsage() error { return nil } -// AzureSqlDatabaseusage resource interface -type AzureSqlDatabaseusage interface { +// AzureSubscriptionSqlServiceDatabaseusage resource interface +type AzureSubscriptionSqlServiceDatabaseusage interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -12637,21 +13844,21 @@ type AzureSqlDatabaseusage interface { NextResetTime() (*time.Time, error) } -// mqlAzureSqlDatabaseusage for the azure.sql.databaseusage resource -type mqlAzureSqlDatabaseusage struct { +// mqlAzureSubscriptionSqlServiceDatabaseusage for the azure.subscription.sqlService.databaseusage resource +type mqlAzureSubscriptionSqlServiceDatabaseusage struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureSqlDatabaseusage) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionSqlServiceDatabaseusage) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.sql.databaseusage resource -func newAzureSqlDatabaseusage(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.sqlService.databaseusage resource +func newAzureSubscriptionSqlServiceDatabaseusage(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureSqlDatabaseusage{runtime.NewResource("azure.sql.databaseusage")} + res := mqlAzureSubscriptionSqlServiceDatabaseusage{runtime.NewResource("azure.subscription.sqlService.databaseusage")} // assign all named fields var id string @@ -12665,44 +13872,44 @@ func newAzureSqlDatabaseusage(runtime *resources.Runtime, args *resources.Args) switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.databaseusage\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.databaseusage\", its \"id\" argument has the wrong type (expected type \"string\")") } case "name": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.databaseusage\", its \"name\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.databaseusage\", its \"name\" argument has the wrong type (expected type \"string\")") } case "resourceName": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.databaseusage\", its \"resourceName\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.databaseusage\", its \"resourceName\" argument has the wrong type (expected type \"string\")") } case "displayName": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.databaseusage\", its \"displayName\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.databaseusage\", its \"displayName\" argument has the wrong type (expected type \"string\")") } case "currentValue": if _, ok := val.(float64); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.databaseusage\", its \"currentValue\" argument has the wrong type (expected type \"float64\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.databaseusage\", its \"currentValue\" argument has the wrong type (expected type \"float64\")") } case "limit": if _, ok := val.(float64); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.databaseusage\", its \"limit\" argument has the wrong type (expected type \"float64\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.databaseusage\", its \"limit\" argument has the wrong type (expected type \"float64\")") } case "unit": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.databaseusage\", its \"unit\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.databaseusage\", its \"unit\" argument has the wrong type (expected type \"string\")") } case "nextResetTime": if _, ok := val.(*time.Time); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.databaseusage\", its \"nextResetTime\" argument has the wrong type (expected type \"*time.Time\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.databaseusage\", its \"nextResetTime\" argument has the wrong type (expected type \"*time.Time\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.sql.databaseusage\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.databaseusage\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.sql.databaseusage with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.sqlService.databaseusage with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -12720,36 +13927,36 @@ func newAzureSqlDatabaseusage(runtime *resources.Runtime, args *resources.Args) return &res, nil } -func (s *mqlAzureSqlDatabaseusage) Validate() error { +func (s *mqlAzureSubscriptionSqlServiceDatabaseusage) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.sql.databaseusage\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.databaseusage\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("name"); !ok { - return errors.New("Initialized \"azure.sql.databaseusage\" resource without a \"name\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.databaseusage\" resource without a \"name\". This field is required.") } if _, ok := s.Cache.Load("resourceName"); !ok { - return errors.New("Initialized \"azure.sql.databaseusage\" resource without a \"resourceName\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.databaseusage\" resource without a \"resourceName\". This field is required.") } if _, ok := s.Cache.Load("displayName"); !ok { - return errors.New("Initialized \"azure.sql.databaseusage\" resource without a \"displayName\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.databaseusage\" resource without a \"displayName\". This field is required.") } if _, ok := s.Cache.Load("currentValue"); !ok { - return errors.New("Initialized \"azure.sql.databaseusage\" resource without a \"currentValue\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.databaseusage\" resource without a \"currentValue\". This field is required.") } if _, ok := s.Cache.Load("limit"); !ok { - return errors.New("Initialized \"azure.sql.databaseusage\" resource without a \"limit\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.databaseusage\" resource without a \"limit\". This field is required.") } if _, ok := s.Cache.Load("unit"); !ok { - return errors.New("Initialized \"azure.sql.databaseusage\" resource without a \"unit\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.databaseusage\" resource without a \"unit\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureSqlDatabaseusage) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.sql.databaseusage].Register") +func (s *mqlAzureSubscriptionSqlServiceDatabaseusage) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.sqlService.databaseusage].Register") switch name { case "id": return nil @@ -12768,13 +13975,13 @@ func (s *mqlAzureSqlDatabaseusage) Register(name string) error { case "nextResetTime": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.sql.databaseusage\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.sqlService.databaseusage\" resource") } } // Field accessor autogenerated -func (s *mqlAzureSqlDatabaseusage) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.sql.databaseusage].Field") +func (s *mqlAzureSubscriptionSqlServiceDatabaseusage) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.sqlService.databaseusage].Field") switch name { case "id": return s.Id() @@ -12793,124 +14000,124 @@ func (s *mqlAzureSqlDatabaseusage) Field(name string) (interface{}, error) { case "nextResetTime": return s.NextResetTime() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.sql.databaseusage\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.sqlService.databaseusage\" resource") } } // Id accessor autogenerated -func (s *mqlAzureSqlDatabaseusage) Id() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabaseusage) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.databaseusage\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.sqlService.databaseusage\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.databaseusage\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.databaseusage\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Name accessor autogenerated -func (s *mqlAzureSqlDatabaseusage) Name() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabaseusage) Name() (string, error) { res, ok := s.Cache.Load("name") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.databaseusage\" failed: no value provided for static field \"name\"") + return "", errors.New("\"azure.subscription.sqlService.databaseusage\" failed: no value provided for static field \"name\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.databaseusage\" failed to cast field \"name\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.databaseusage\" failed to cast field \"name\" to the right type (string): %#v", res) } return tres, nil } // ResourceName accessor autogenerated -func (s *mqlAzureSqlDatabaseusage) ResourceName() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabaseusage) ResourceName() (string, error) { res, ok := s.Cache.Load("resourceName") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.databaseusage\" failed: no value provided for static field \"resourceName\"") + return "", errors.New("\"azure.subscription.sqlService.databaseusage\" failed: no value provided for static field \"resourceName\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.databaseusage\" failed to cast field \"resourceName\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.databaseusage\" failed to cast field \"resourceName\" to the right type (string): %#v", res) } return tres, nil } // DisplayName accessor autogenerated -func (s *mqlAzureSqlDatabaseusage) DisplayName() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabaseusage) DisplayName() (string, error) { res, ok := s.Cache.Load("displayName") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.databaseusage\" failed: no value provided for static field \"displayName\"") + return "", errors.New("\"azure.subscription.sqlService.databaseusage\" failed: no value provided for static field \"displayName\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.databaseusage\" failed to cast field \"displayName\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.databaseusage\" failed to cast field \"displayName\" to the right type (string): %#v", res) } return tres, nil } // CurrentValue accessor autogenerated -func (s *mqlAzureSqlDatabaseusage) CurrentValue() (float64, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabaseusage) CurrentValue() (float64, error) { res, ok := s.Cache.Load("currentValue") if !ok || !res.Valid { - return 0.0, errors.New("\"azure.sql.databaseusage\" failed: no value provided for static field \"currentValue\"") + return 0.0, errors.New("\"azure.subscription.sqlService.databaseusage\" failed: no value provided for static field \"currentValue\"") } if res.Error != nil { return 0.0, res.Error } tres, ok := res.Data.(float64) if !ok { - return 0.0, fmt.Errorf("\"azure.sql.databaseusage\" failed to cast field \"currentValue\" to the right type (float64): %#v", res) + return 0.0, fmt.Errorf("\"azure.subscription.sqlService.databaseusage\" failed to cast field \"currentValue\" to the right type (float64): %#v", res) } return tres, nil } // Limit accessor autogenerated -func (s *mqlAzureSqlDatabaseusage) Limit() (float64, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabaseusage) Limit() (float64, error) { res, ok := s.Cache.Load("limit") if !ok || !res.Valid { - return 0.0, errors.New("\"azure.sql.databaseusage\" failed: no value provided for static field \"limit\"") + return 0.0, errors.New("\"azure.subscription.sqlService.databaseusage\" failed: no value provided for static field \"limit\"") } if res.Error != nil { return 0.0, res.Error } tres, ok := res.Data.(float64) if !ok { - return 0.0, fmt.Errorf("\"azure.sql.databaseusage\" failed to cast field \"limit\" to the right type (float64): %#v", res) + return 0.0, fmt.Errorf("\"azure.subscription.sqlService.databaseusage\" failed to cast field \"limit\" to the right type (float64): %#v", res) } return tres, nil } // Unit accessor autogenerated -func (s *mqlAzureSqlDatabaseusage) Unit() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabaseusage) Unit() (string, error) { res, ok := s.Cache.Load("unit") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.databaseusage\" failed: no value provided for static field \"unit\"") + return "", errors.New("\"azure.subscription.sqlService.databaseusage\" failed: no value provided for static field \"unit\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.databaseusage\" failed to cast field \"unit\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.databaseusage\" failed to cast field \"unit\" to the right type (string): %#v", res) } return tres, nil } // NextResetTime accessor autogenerated -func (s *mqlAzureSqlDatabaseusage) NextResetTime() (*time.Time, error) { +func (s *mqlAzureSubscriptionSqlServiceDatabaseusage) NextResetTime() (*time.Time, error) { res, ok := s.Cache.Load("nextResetTime") if !ok || !res.Valid { if err := s.ComputeNextResetTime(); err != nil { @@ -12918,7 +14125,7 @@ func (s *mqlAzureSqlDatabaseusage) NextResetTime() (*time.Time, error) { } res, ok = s.Cache.Load("nextResetTime") if !ok { - return nil, errors.New("\"azure.sql.databaseusage\" calculated \"nextResetTime\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.sqlService.databaseusage\" calculated \"nextResetTime\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "nextResetTime") } @@ -12927,14 +14134,14 @@ func (s *mqlAzureSqlDatabaseusage) NextResetTime() (*time.Time, error) { } tres, ok := res.Data.(*time.Time) if !ok { - return nil, fmt.Errorf("\"azure.sql.databaseusage\" failed to cast field \"nextResetTime\" to the right type (*time.Time): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.sqlService.databaseusage\" failed to cast field \"nextResetTime\" to the right type (*time.Time): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureSqlDatabaseusage) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.sql.databaseusage].MqlCompute") +func (s *mqlAzureSubscriptionSqlServiceDatabaseusage) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.sqlService.databaseusage].MqlCompute") switch name { case "id": return nil @@ -12953,12 +14160,12 @@ func (s *mqlAzureSqlDatabaseusage) MqlCompute(name string) error { case "nextResetTime": return s.ComputeNextResetTime() default: - return errors.New("Cannot find field '" + name + "' in \"azure.sql.databaseusage\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.sqlService.databaseusage\" resource") } } // ComputeNextResetTime computer autogenerated -func (s *mqlAzureSqlDatabaseusage) ComputeNextResetTime() error { +func (s *mqlAzureSubscriptionSqlServiceDatabaseusage) ComputeNextResetTime() error { var err error if _, ok := s.Cache.Load("nextResetTime"); ok { return nil @@ -12971,31 +14178,41 @@ func (s *mqlAzureSqlDatabaseusage) ComputeNextResetTime() error { return nil } -// AzurePostgresql resource interface -type AzurePostgresql interface { +// AzureSubscriptionPostgresqlService resource interface +type AzureSubscriptionPostgresqlService interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) Register(string) error Validate() error + SubscriptionId() (string, error) Servers() ([]interface{}, error) } -// mqlAzurePostgresql for the azure.postgresql resource -type mqlAzurePostgresql struct { +// mqlAzureSubscriptionPostgresqlService for the azure.subscription.postgresqlService resource +type mqlAzureSubscriptionPostgresqlService struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzurePostgresql) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionPostgresqlService) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.postgresql resource -func newAzurePostgresql(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.postgresqlService resource +func newAzureSubscriptionPostgresqlService(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzurePostgresql{runtime.NewResource("azure.postgresql")} + res := mqlAzureSubscriptionPostgresqlService{runtime.NewResource("azure.subscription.postgresqlService")} + var existing AzureSubscriptionPostgresqlService + args, existing, err = res.init(args) + if err != nil { + return nil, err + } + if existing != nil { + return existing, nil + } + // assign all named fields var id string @@ -13007,18 +14224,22 @@ func newAzurePostgresql(runtime *resources.Runtime, args *resources.Args) (inter } switch name { + case "subscriptionId": + if _, ok := val.(string); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription.postgresqlService\", its \"subscriptionId\" argument has the wrong type (expected type \"string\")") + } case "servers": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.postgresql\", its \"servers\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.postgresqlService\", its \"servers\" argument has the wrong type (expected type \"[]interface{}\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.postgresql\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.postgresqlService\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.postgresql with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.postgresqlService with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -13036,37 +14257,59 @@ func newAzurePostgresql(runtime *resources.Runtime, args *resources.Args) (inter return &res, nil } -func (s *mqlAzurePostgresql) Validate() error { +func (s *mqlAzureSubscriptionPostgresqlService) Validate() error { // required arguments - // no required fields found + if _, ok := s.Cache.Load("subscriptionId"); !ok { + return errors.New("Initialized \"azure.subscription.postgresqlService\" resource without a \"subscriptionId\". This field is required.") + } return nil } // Register accessor autogenerated -func (s *mqlAzurePostgresql) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.postgresql].Register") +func (s *mqlAzureSubscriptionPostgresqlService) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.postgresqlService].Register") switch name { + case "subscriptionId": + return nil case "servers": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.postgresql\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.postgresqlService\" resource") } } // Field accessor autogenerated -func (s *mqlAzurePostgresql) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.postgresql].Field") +func (s *mqlAzureSubscriptionPostgresqlService) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.postgresqlService].Field") switch name { + case "subscriptionId": + return s.SubscriptionId() case "servers": return s.Servers() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.postgresql\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.postgresqlService\" resource") + } +} + +// SubscriptionId accessor autogenerated +func (s *mqlAzureSubscriptionPostgresqlService) SubscriptionId() (string, error) { + res, ok := s.Cache.Load("subscriptionId") + if !ok || !res.Valid { + return "", errors.New("\"azure.subscription.postgresqlService\" failed: no value provided for static field \"subscriptionId\"") + } + if res.Error != nil { + return "", res.Error + } + tres, ok := res.Data.(string) + if !ok { + return "", fmt.Errorf("\"azure.subscription.postgresqlService\" failed to cast field \"subscriptionId\" to the right type (string): %#v", res) } + return tres, nil } // Servers accessor autogenerated -func (s *mqlAzurePostgresql) Servers() ([]interface{}, error) { +func (s *mqlAzureSubscriptionPostgresqlService) Servers() ([]interface{}, error) { res, ok := s.Cache.Load("servers") if !ok || !res.Valid { if err := s.ComputeServers(); err != nil { @@ -13074,7 +14317,7 @@ func (s *mqlAzurePostgresql) Servers() ([]interface{}, error) { } res, ok = s.Cache.Load("servers") if !ok { - return nil, errors.New("\"azure.postgresql\" calculated \"servers\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.postgresqlService\" calculated \"servers\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "servers") } @@ -13083,24 +14326,26 @@ func (s *mqlAzurePostgresql) Servers() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.postgresql\" failed to cast field \"servers\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.postgresqlService\" failed to cast field \"servers\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzurePostgresql) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.postgresql].MqlCompute") +func (s *mqlAzureSubscriptionPostgresqlService) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.postgresqlService].MqlCompute") switch name { + case "subscriptionId": + return nil case "servers": return s.ComputeServers() default: - return errors.New("Cannot find field '" + name + "' in \"azure.postgresql\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.postgresqlService\" resource") } } // ComputeServers computer autogenerated -func (s *mqlAzurePostgresql) ComputeServers() error { +func (s *mqlAzureSubscriptionPostgresqlService) ComputeServers() error { var err error if _, ok := s.Cache.Load("servers"); ok { return nil @@ -13113,8 +14358,8 @@ func (s *mqlAzurePostgresql) ComputeServers() error { return nil } -// AzurePostgresqlServer resource interface -type AzurePostgresqlServer interface { +// AzureSubscriptionPostgresqlServiceServer resource interface +type AzureSubscriptionPostgresqlServiceServer interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -13131,21 +14376,21 @@ type AzurePostgresqlServer interface { FirewallRules() ([]interface{}, error) } -// mqlAzurePostgresqlServer for the azure.postgresql.server resource -type mqlAzurePostgresqlServer struct { +// mqlAzureSubscriptionPostgresqlServiceServer for the azure.subscription.postgresqlService.server resource +type mqlAzureSubscriptionPostgresqlServiceServer struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzurePostgresqlServer) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionPostgresqlServiceServer) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.postgresql.server resource -func newAzurePostgresqlServer(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.postgresqlService.server resource +func newAzureSubscriptionPostgresqlServiceServer(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzurePostgresqlServer{runtime.NewResource("azure.postgresql.server")} + res := mqlAzureSubscriptionPostgresqlServiceServer{runtime.NewResource("azure.subscription.postgresqlService.server")} // assign all named fields var id string @@ -13159,48 +14404,48 @@ func newAzurePostgresqlServer(runtime *resources.Runtime, args *resources.Args) switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.postgresql.server\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.postgresqlService.server\", its \"id\" argument has the wrong type (expected type \"string\")") } case "name": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.postgresql.server\", its \"name\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.postgresqlService.server\", its \"name\" argument has the wrong type (expected type \"string\")") } case "location": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.postgresql.server\", its \"location\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.postgresqlService.server\", its \"location\" argument has the wrong type (expected type \"string\")") } case "tags": if _, ok := val.(map[string]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.postgresql.server\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.postgresqlService.server\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") } case "type": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.postgresql.server\", its \"type\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.postgresqlService.server\", its \"type\" argument has the wrong type (expected type \"string\")") } case "properties": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.postgresql.server\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.postgresqlService.server\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") } case "configuration": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.postgresql.server\", its \"configuration\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.postgresqlService.server\", its \"configuration\" argument has the wrong type (expected type \"[]interface{}\")") } case "databases": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.postgresql.server\", its \"databases\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.postgresqlService.server\", its \"databases\" argument has the wrong type (expected type \"[]interface{}\")") } case "firewallRules": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.postgresql.server\", its \"firewallRules\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.postgresqlService.server\", its \"firewallRules\" argument has the wrong type (expected type \"[]interface{}\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.postgresql.server\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.postgresqlService.server\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.postgresql.server with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.postgresqlService.server with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -13218,33 +14463,33 @@ func newAzurePostgresqlServer(runtime *resources.Runtime, args *resources.Args) return &res, nil } -func (s *mqlAzurePostgresqlServer) Validate() error { +func (s *mqlAzureSubscriptionPostgresqlServiceServer) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.postgresql.server\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.postgresqlService.server\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("name"); !ok { - return errors.New("Initialized \"azure.postgresql.server\" resource without a \"name\". This field is required.") + return errors.New("Initialized \"azure.subscription.postgresqlService.server\" resource without a \"name\". This field is required.") } if _, ok := s.Cache.Load("location"); !ok { - return errors.New("Initialized \"azure.postgresql.server\" resource without a \"location\". This field is required.") + return errors.New("Initialized \"azure.subscription.postgresqlService.server\" resource without a \"location\". This field is required.") } if _, ok := s.Cache.Load("tags"); !ok { - return errors.New("Initialized \"azure.postgresql.server\" resource without a \"tags\". This field is required.") + return errors.New("Initialized \"azure.subscription.postgresqlService.server\" resource without a \"tags\". This field is required.") } if _, ok := s.Cache.Load("type"); !ok { - return errors.New("Initialized \"azure.postgresql.server\" resource without a \"type\". This field is required.") + return errors.New("Initialized \"azure.subscription.postgresqlService.server\" resource without a \"type\". This field is required.") } if _, ok := s.Cache.Load("properties"); !ok { - return errors.New("Initialized \"azure.postgresql.server\" resource without a \"properties\". This field is required.") + return errors.New("Initialized \"azure.subscription.postgresqlService.server\" resource without a \"properties\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzurePostgresqlServer) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.postgresql.server].Register") +func (s *mqlAzureSubscriptionPostgresqlServiceServer) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.postgresqlService.server].Register") switch name { case "id": return nil @@ -13265,13 +14510,13 @@ func (s *mqlAzurePostgresqlServer) Register(name string) error { case "firewallRules": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.postgresql.server\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.postgresqlService.server\" resource") } } // Field accessor autogenerated -func (s *mqlAzurePostgresqlServer) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.postgresql.server].Field") +func (s *mqlAzureSubscriptionPostgresqlServiceServer) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.postgresqlService.server].Field") switch name { case "id": return s.Id() @@ -13292,108 +14537,108 @@ func (s *mqlAzurePostgresqlServer) Field(name string) (interface{}, error) { case "firewallRules": return s.FirewallRules() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.postgresql.server\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.postgresqlService.server\" resource") } } // Id accessor autogenerated -func (s *mqlAzurePostgresqlServer) Id() (string, error) { +func (s *mqlAzureSubscriptionPostgresqlServiceServer) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.postgresql.server\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.postgresqlService.server\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.postgresql.server\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.postgresqlService.server\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Name accessor autogenerated -func (s *mqlAzurePostgresqlServer) Name() (string, error) { +func (s *mqlAzureSubscriptionPostgresqlServiceServer) Name() (string, error) { res, ok := s.Cache.Load("name") if !ok || !res.Valid { - return "", errors.New("\"azure.postgresql.server\" failed: no value provided for static field \"name\"") + return "", errors.New("\"azure.subscription.postgresqlService.server\" failed: no value provided for static field \"name\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.postgresql.server\" failed to cast field \"name\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.postgresqlService.server\" failed to cast field \"name\" to the right type (string): %#v", res) } return tres, nil } // Location accessor autogenerated -func (s *mqlAzurePostgresqlServer) Location() (string, error) { +func (s *mqlAzureSubscriptionPostgresqlServiceServer) Location() (string, error) { res, ok := s.Cache.Load("location") if !ok || !res.Valid { - return "", errors.New("\"azure.postgresql.server\" failed: no value provided for static field \"location\"") + return "", errors.New("\"azure.subscription.postgresqlService.server\" failed: no value provided for static field \"location\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.postgresql.server\" failed to cast field \"location\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.postgresqlService.server\" failed to cast field \"location\" to the right type (string): %#v", res) } return tres, nil } // Tags accessor autogenerated -func (s *mqlAzurePostgresqlServer) Tags() (map[string]interface{}, error) { +func (s *mqlAzureSubscriptionPostgresqlServiceServer) Tags() (map[string]interface{}, error) { res, ok := s.Cache.Load("tags") if !ok || !res.Valid { - return nil, errors.New("\"azure.postgresql.server\" failed: no value provided for static field \"tags\"") + return nil, errors.New("\"azure.subscription.postgresqlService.server\" failed: no value provided for static field \"tags\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(map[string]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.postgresql.server\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.postgresqlService.server\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) } return tres, nil } // Type accessor autogenerated -func (s *mqlAzurePostgresqlServer) Type() (string, error) { +func (s *mqlAzureSubscriptionPostgresqlServiceServer) Type() (string, error) { res, ok := s.Cache.Load("type") if !ok || !res.Valid { - return "", errors.New("\"azure.postgresql.server\" failed: no value provided for static field \"type\"") + return "", errors.New("\"azure.subscription.postgresqlService.server\" failed: no value provided for static field \"type\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.postgresql.server\" failed to cast field \"type\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.postgresqlService.server\" failed to cast field \"type\" to the right type (string): %#v", res) } return tres, nil } // Properties accessor autogenerated -func (s *mqlAzurePostgresqlServer) Properties() (interface{}, error) { +func (s *mqlAzureSubscriptionPostgresqlServiceServer) Properties() (interface{}, error) { res, ok := s.Cache.Load("properties") if !ok || !res.Valid { - return nil, errors.New("\"azure.postgresql.server\" failed: no value provided for static field \"properties\"") + return nil, errors.New("\"azure.subscription.postgresqlService.server\" failed: no value provided for static field \"properties\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.postgresql.server\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.postgresqlService.server\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) } return tres, nil } // Configuration accessor autogenerated -func (s *mqlAzurePostgresqlServer) Configuration() ([]interface{}, error) { +func (s *mqlAzureSubscriptionPostgresqlServiceServer) Configuration() ([]interface{}, error) { res, ok := s.Cache.Load("configuration") if !ok || !res.Valid { if err := s.ComputeConfiguration(); err != nil { @@ -13401,7 +14646,7 @@ func (s *mqlAzurePostgresqlServer) Configuration() ([]interface{}, error) { } res, ok = s.Cache.Load("configuration") if !ok { - return nil, errors.New("\"azure.postgresql.server\" calculated \"configuration\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.postgresqlService.server\" calculated \"configuration\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "configuration") } @@ -13410,13 +14655,13 @@ func (s *mqlAzurePostgresqlServer) Configuration() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.postgresql.server\" failed to cast field \"configuration\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.postgresqlService.server\" failed to cast field \"configuration\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Databases accessor autogenerated -func (s *mqlAzurePostgresqlServer) Databases() ([]interface{}, error) { +func (s *mqlAzureSubscriptionPostgresqlServiceServer) Databases() ([]interface{}, error) { res, ok := s.Cache.Load("databases") if !ok || !res.Valid { if err := s.ComputeDatabases(); err != nil { @@ -13424,7 +14669,7 @@ func (s *mqlAzurePostgresqlServer) Databases() ([]interface{}, error) { } res, ok = s.Cache.Load("databases") if !ok { - return nil, errors.New("\"azure.postgresql.server\" calculated \"databases\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.postgresqlService.server\" calculated \"databases\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "databases") } @@ -13433,13 +14678,13 @@ func (s *mqlAzurePostgresqlServer) Databases() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.postgresql.server\" failed to cast field \"databases\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.postgresqlService.server\" failed to cast field \"databases\" to the right type ([]interface{}): %#v", res) } return tres, nil } // FirewallRules accessor autogenerated -func (s *mqlAzurePostgresqlServer) FirewallRules() ([]interface{}, error) { +func (s *mqlAzureSubscriptionPostgresqlServiceServer) FirewallRules() ([]interface{}, error) { res, ok := s.Cache.Load("firewallRules") if !ok || !res.Valid { if err := s.ComputeFirewallRules(); err != nil { @@ -13447,7 +14692,7 @@ func (s *mqlAzurePostgresqlServer) FirewallRules() ([]interface{}, error) { } res, ok = s.Cache.Load("firewallRules") if !ok { - return nil, errors.New("\"azure.postgresql.server\" calculated \"firewallRules\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.postgresqlService.server\" calculated \"firewallRules\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "firewallRules") } @@ -13456,14 +14701,14 @@ func (s *mqlAzurePostgresqlServer) FirewallRules() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.postgresql.server\" failed to cast field \"firewallRules\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.postgresqlService.server\" failed to cast field \"firewallRules\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzurePostgresqlServer) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.postgresql.server].MqlCompute") +func (s *mqlAzureSubscriptionPostgresqlServiceServer) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.postgresqlService.server].MqlCompute") switch name { case "id": return nil @@ -13484,12 +14729,12 @@ func (s *mqlAzurePostgresqlServer) MqlCompute(name string) error { case "firewallRules": return s.ComputeFirewallRules() default: - return errors.New("Cannot find field '" + name + "' in \"azure.postgresql.server\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.postgresqlService.server\" resource") } } // ComputeConfiguration computer autogenerated -func (s *mqlAzurePostgresqlServer) ComputeConfiguration() error { +func (s *mqlAzureSubscriptionPostgresqlServiceServer) ComputeConfiguration() error { var err error if _, ok := s.Cache.Load("configuration"); ok { return nil @@ -13503,7 +14748,7 @@ func (s *mqlAzurePostgresqlServer) ComputeConfiguration() error { } // ComputeDatabases computer autogenerated -func (s *mqlAzurePostgresqlServer) ComputeDatabases() error { +func (s *mqlAzureSubscriptionPostgresqlServiceServer) ComputeDatabases() error { var err error if _, ok := s.Cache.Load("databases"); ok { return nil @@ -13517,7 +14762,7 @@ func (s *mqlAzurePostgresqlServer) ComputeDatabases() error { } // ComputeFirewallRules computer autogenerated -func (s *mqlAzurePostgresqlServer) ComputeFirewallRules() error { +func (s *mqlAzureSubscriptionPostgresqlServiceServer) ComputeFirewallRules() error { var err error if _, ok := s.Cache.Load("firewallRules"); ok { return nil @@ -13530,8 +14775,8 @@ func (s *mqlAzurePostgresqlServer) ComputeFirewallRules() error { return nil } -// AzurePostgresqlDatabase resource interface -type AzurePostgresqlDatabase interface { +// AzureSubscriptionPostgresqlServiceDatabase resource interface +type AzureSubscriptionPostgresqlServiceDatabase interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -13544,21 +14789,21 @@ type AzurePostgresqlDatabase interface { Collation() (string, error) } -// mqlAzurePostgresqlDatabase for the azure.postgresql.database resource -type mqlAzurePostgresqlDatabase struct { +// mqlAzureSubscriptionPostgresqlServiceDatabase for the azure.subscription.postgresqlService.database resource +type mqlAzureSubscriptionPostgresqlServiceDatabase struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzurePostgresqlDatabase) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionPostgresqlServiceDatabase) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.postgresql.database resource -func newAzurePostgresqlDatabase(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.postgresqlService.database resource +func newAzureSubscriptionPostgresqlServiceDatabase(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzurePostgresqlDatabase{runtime.NewResource("azure.postgresql.database")} + res := mqlAzureSubscriptionPostgresqlServiceDatabase{runtime.NewResource("azure.subscription.postgresqlService.database")} // assign all named fields var id string @@ -13572,32 +14817,32 @@ func newAzurePostgresqlDatabase(runtime *resources.Runtime, args *resources.Args switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.postgresql.database\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.postgresqlService.database\", its \"id\" argument has the wrong type (expected type \"string\")") } case "name": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.postgresql.database\", its \"name\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.postgresqlService.database\", its \"name\" argument has the wrong type (expected type \"string\")") } case "type": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.postgresql.database\", its \"type\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.postgresqlService.database\", its \"type\" argument has the wrong type (expected type \"string\")") } case "charset": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.postgresql.database\", its \"charset\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.postgresqlService.database\", its \"charset\" argument has the wrong type (expected type \"string\")") } case "collation": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.postgresql.database\", its \"collation\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.postgresqlService.database\", its \"collation\" argument has the wrong type (expected type \"string\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.postgresql.database\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.postgresqlService.database\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.postgresql.database with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.postgresqlService.database with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -13615,30 +14860,30 @@ func newAzurePostgresqlDatabase(runtime *resources.Runtime, args *resources.Args return &res, nil } -func (s *mqlAzurePostgresqlDatabase) Validate() error { +func (s *mqlAzureSubscriptionPostgresqlServiceDatabase) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.postgresql.database\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.postgresqlService.database\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("name"); !ok { - return errors.New("Initialized \"azure.postgresql.database\" resource without a \"name\". This field is required.") + return errors.New("Initialized \"azure.subscription.postgresqlService.database\" resource without a \"name\". This field is required.") } if _, ok := s.Cache.Load("type"); !ok { - return errors.New("Initialized \"azure.postgresql.database\" resource without a \"type\". This field is required.") + return errors.New("Initialized \"azure.subscription.postgresqlService.database\" resource without a \"type\". This field is required.") } if _, ok := s.Cache.Load("charset"); !ok { - return errors.New("Initialized \"azure.postgresql.database\" resource without a \"charset\". This field is required.") + return errors.New("Initialized \"azure.subscription.postgresqlService.database\" resource without a \"charset\". This field is required.") } if _, ok := s.Cache.Load("collation"); !ok { - return errors.New("Initialized \"azure.postgresql.database\" resource without a \"collation\". This field is required.") + return errors.New("Initialized \"azure.subscription.postgresqlService.database\" resource without a \"collation\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzurePostgresqlDatabase) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.postgresql.database].Register") +func (s *mqlAzureSubscriptionPostgresqlServiceDatabase) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.postgresqlService.database].Register") switch name { case "id": return nil @@ -13651,13 +14896,13 @@ func (s *mqlAzurePostgresqlDatabase) Register(name string) error { case "collation": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.postgresql.database\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.postgresqlService.database\" resource") } } // Field accessor autogenerated -func (s *mqlAzurePostgresqlDatabase) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.postgresql.database].Field") +func (s *mqlAzureSubscriptionPostgresqlServiceDatabase) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.postgresqlService.database].Field") switch name { case "id": return s.Id() @@ -13670,93 +14915,93 @@ func (s *mqlAzurePostgresqlDatabase) Field(name string) (interface{}, error) { case "collation": return s.Collation() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.postgresql.database\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.postgresqlService.database\" resource") } } // Id accessor autogenerated -func (s *mqlAzurePostgresqlDatabase) Id() (string, error) { +func (s *mqlAzureSubscriptionPostgresqlServiceDatabase) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.postgresql.database\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.postgresqlService.database\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.postgresql.database\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.postgresqlService.database\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Name accessor autogenerated -func (s *mqlAzurePostgresqlDatabase) Name() (string, error) { +func (s *mqlAzureSubscriptionPostgresqlServiceDatabase) Name() (string, error) { res, ok := s.Cache.Load("name") if !ok || !res.Valid { - return "", errors.New("\"azure.postgresql.database\" failed: no value provided for static field \"name\"") + return "", errors.New("\"azure.subscription.postgresqlService.database\" failed: no value provided for static field \"name\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.postgresql.database\" failed to cast field \"name\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.postgresqlService.database\" failed to cast field \"name\" to the right type (string): %#v", res) } return tres, nil } // Type accessor autogenerated -func (s *mqlAzurePostgresqlDatabase) Type() (string, error) { +func (s *mqlAzureSubscriptionPostgresqlServiceDatabase) Type() (string, error) { res, ok := s.Cache.Load("type") if !ok || !res.Valid { - return "", errors.New("\"azure.postgresql.database\" failed: no value provided for static field \"type\"") + return "", errors.New("\"azure.subscription.postgresqlService.database\" failed: no value provided for static field \"type\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.postgresql.database\" failed to cast field \"type\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.postgresqlService.database\" failed to cast field \"type\" to the right type (string): %#v", res) } return tres, nil } // Charset accessor autogenerated -func (s *mqlAzurePostgresqlDatabase) Charset() (string, error) { +func (s *mqlAzureSubscriptionPostgresqlServiceDatabase) Charset() (string, error) { res, ok := s.Cache.Load("charset") if !ok || !res.Valid { - return "", errors.New("\"azure.postgresql.database\" failed: no value provided for static field \"charset\"") + return "", errors.New("\"azure.subscription.postgresqlService.database\" failed: no value provided for static field \"charset\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.postgresql.database\" failed to cast field \"charset\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.postgresqlService.database\" failed to cast field \"charset\" to the right type (string): %#v", res) } return tres, nil } // Collation accessor autogenerated -func (s *mqlAzurePostgresqlDatabase) Collation() (string, error) { +func (s *mqlAzureSubscriptionPostgresqlServiceDatabase) Collation() (string, error) { res, ok := s.Cache.Load("collation") if !ok || !res.Valid { - return "", errors.New("\"azure.postgresql.database\" failed: no value provided for static field \"collation\"") + return "", errors.New("\"azure.subscription.postgresqlService.database\" failed: no value provided for static field \"collation\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.postgresql.database\" failed to cast field \"collation\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.postgresqlService.database\" failed to cast field \"collation\" to the right type (string): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzurePostgresqlDatabase) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.postgresql.database].MqlCompute") +func (s *mqlAzureSubscriptionPostgresqlServiceDatabase) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.postgresqlService.database].MqlCompute") switch name { case "id": return nil @@ -13769,36 +15014,46 @@ func (s *mqlAzurePostgresqlDatabase) MqlCompute(name string) error { case "collation": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.postgresql.database\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.postgresqlService.database\" resource") } } -// AzureMysql resource interface -type AzureMysql interface { +// AzureSubscriptionMysqlService resource interface +type AzureSubscriptionMysqlService interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) Register(string) error Validate() error + SubscriptionId() (string, error) Servers() ([]interface{}, error) FlexibleServers() ([]interface{}, error) } -// mqlAzureMysql for the azure.mysql resource -type mqlAzureMysql struct { +// mqlAzureSubscriptionMysqlService for the azure.subscription.mysqlService resource +type mqlAzureSubscriptionMysqlService struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureMysql) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionMysqlService) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.mysql resource -func newAzureMysql(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.mysqlService resource +func newAzureSubscriptionMysqlService(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureMysql{runtime.NewResource("azure.mysql")} + res := mqlAzureSubscriptionMysqlService{runtime.NewResource("azure.subscription.mysqlService")} + var existing AzureSubscriptionMysqlService + args, existing, err = res.init(args) + if err != nil { + return nil, err + } + if existing != nil { + return existing, nil + } + // assign all named fields var id string @@ -13810,22 +15065,26 @@ func newAzureMysql(runtime *resources.Runtime, args *resources.Args) (interface{ } switch name { + case "subscriptionId": + if _, ok := val.(string); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription.mysqlService\", its \"subscriptionId\" argument has the wrong type (expected type \"string\")") + } case "servers": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.mysql\", its \"servers\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mysqlService\", its \"servers\" argument has the wrong type (expected type \"[]interface{}\")") } case "flexibleServers": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.mysql\", its \"flexibleServers\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mysqlService\", its \"flexibleServers\" argument has the wrong type (expected type \"[]interface{}\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.mysql\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mysqlService\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.mysql with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.mysqlService with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -13843,41 +15102,63 @@ func newAzureMysql(runtime *resources.Runtime, args *resources.Args) (interface{ return &res, nil } -func (s *mqlAzureMysql) Validate() error { +func (s *mqlAzureSubscriptionMysqlService) Validate() error { // required arguments - // no required fields found + if _, ok := s.Cache.Load("subscriptionId"); !ok { + return errors.New("Initialized \"azure.subscription.mysqlService\" resource without a \"subscriptionId\". This field is required.") + } return nil } // Register accessor autogenerated -func (s *mqlAzureMysql) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.mysql].Register") +func (s *mqlAzureSubscriptionMysqlService) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.mysqlService].Register") switch name { + case "subscriptionId": + return nil case "servers": return nil case "flexibleServers": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.mysql\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.mysqlService\" resource") } } // Field accessor autogenerated -func (s *mqlAzureMysql) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.mysql].Field") +func (s *mqlAzureSubscriptionMysqlService) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.mysqlService].Field") switch name { + case "subscriptionId": + return s.SubscriptionId() case "servers": return s.Servers() case "flexibleServers": return s.FlexibleServers() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.mysql\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.mysqlService\" resource") + } +} + +// SubscriptionId accessor autogenerated +func (s *mqlAzureSubscriptionMysqlService) SubscriptionId() (string, error) { + res, ok := s.Cache.Load("subscriptionId") + if !ok || !res.Valid { + return "", errors.New("\"azure.subscription.mysqlService\" failed: no value provided for static field \"subscriptionId\"") + } + if res.Error != nil { + return "", res.Error + } + tres, ok := res.Data.(string) + if !ok { + return "", fmt.Errorf("\"azure.subscription.mysqlService\" failed to cast field \"subscriptionId\" to the right type (string): %#v", res) } + return tres, nil } // Servers accessor autogenerated -func (s *mqlAzureMysql) Servers() ([]interface{}, error) { +func (s *mqlAzureSubscriptionMysqlService) Servers() ([]interface{}, error) { res, ok := s.Cache.Load("servers") if !ok || !res.Valid { if err := s.ComputeServers(); err != nil { @@ -13885,7 +15166,7 @@ func (s *mqlAzureMysql) Servers() ([]interface{}, error) { } res, ok = s.Cache.Load("servers") if !ok { - return nil, errors.New("\"azure.mysql\" calculated \"servers\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.mysqlService\" calculated \"servers\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "servers") } @@ -13894,13 +15175,13 @@ func (s *mqlAzureMysql) Servers() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.mysql\" failed to cast field \"servers\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.mysqlService\" failed to cast field \"servers\" to the right type ([]interface{}): %#v", res) } return tres, nil } // FlexibleServers accessor autogenerated -func (s *mqlAzureMysql) FlexibleServers() ([]interface{}, error) { +func (s *mqlAzureSubscriptionMysqlService) FlexibleServers() ([]interface{}, error) { res, ok := s.Cache.Load("flexibleServers") if !ok || !res.Valid { if err := s.ComputeFlexibleServers(); err != nil { @@ -13908,7 +15189,7 @@ func (s *mqlAzureMysql) FlexibleServers() ([]interface{}, error) { } res, ok = s.Cache.Load("flexibleServers") if !ok { - return nil, errors.New("\"azure.mysql\" calculated \"flexibleServers\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.mysqlService\" calculated \"flexibleServers\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "flexibleServers") } @@ -13917,26 +15198,28 @@ func (s *mqlAzureMysql) FlexibleServers() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.mysql\" failed to cast field \"flexibleServers\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.mysqlService\" failed to cast field \"flexibleServers\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureMysql) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.mysql].MqlCompute") +func (s *mqlAzureSubscriptionMysqlService) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.mysqlService].MqlCompute") switch name { + case "subscriptionId": + return nil case "servers": return s.ComputeServers() case "flexibleServers": return s.ComputeFlexibleServers() default: - return errors.New("Cannot find field '" + name + "' in \"azure.mysql\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.mysqlService\" resource") } } // ComputeServers computer autogenerated -func (s *mqlAzureMysql) ComputeServers() error { +func (s *mqlAzureSubscriptionMysqlService) ComputeServers() error { var err error if _, ok := s.Cache.Load("servers"); ok { return nil @@ -13950,7 +15233,7 @@ func (s *mqlAzureMysql) ComputeServers() error { } // ComputeFlexibleServers computer autogenerated -func (s *mqlAzureMysql) ComputeFlexibleServers() error { +func (s *mqlAzureSubscriptionMysqlService) ComputeFlexibleServers() error { var err error if _, ok := s.Cache.Load("flexibleServers"); ok { return nil @@ -13963,8 +15246,8 @@ func (s *mqlAzureMysql) ComputeFlexibleServers() error { return nil } -// AzureMysqlServer resource interface -type AzureMysqlServer interface { +// AzureSubscriptionMysqlServiceServer resource interface +type AzureSubscriptionMysqlServiceServer interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -13981,21 +15264,21 @@ type AzureMysqlServer interface { FirewallRules() ([]interface{}, error) } -// mqlAzureMysqlServer for the azure.mysql.server resource -type mqlAzureMysqlServer struct { +// mqlAzureSubscriptionMysqlServiceServer for the azure.subscription.mysqlService.server resource +type mqlAzureSubscriptionMysqlServiceServer struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureMysqlServer) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionMysqlServiceServer) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.mysql.server resource -func newAzureMysqlServer(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.mysqlService.server resource +func newAzureSubscriptionMysqlServiceServer(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureMysqlServer{runtime.NewResource("azure.mysql.server")} + res := mqlAzureSubscriptionMysqlServiceServer{runtime.NewResource("azure.subscription.mysqlService.server")} // assign all named fields var id string @@ -14009,48 +15292,48 @@ func newAzureMysqlServer(runtime *resources.Runtime, args *resources.Args) (inte switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.mysql.server\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mysqlService.server\", its \"id\" argument has the wrong type (expected type \"string\")") } case "name": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.mysql.server\", its \"name\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mysqlService.server\", its \"name\" argument has the wrong type (expected type \"string\")") } case "location": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.mysql.server\", its \"location\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mysqlService.server\", its \"location\" argument has the wrong type (expected type \"string\")") } case "tags": if _, ok := val.(map[string]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.mysql.server\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mysqlService.server\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") } case "type": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.mysql.server\", its \"type\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mysqlService.server\", its \"type\" argument has the wrong type (expected type \"string\")") } case "properties": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.mysql.server\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mysqlService.server\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") } case "configuration": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.mysql.server\", its \"configuration\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mysqlService.server\", its \"configuration\" argument has the wrong type (expected type \"[]interface{}\")") } case "databases": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.mysql.server\", its \"databases\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mysqlService.server\", its \"databases\" argument has the wrong type (expected type \"[]interface{}\")") } case "firewallRules": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.mysql.server\", its \"firewallRules\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mysqlService.server\", its \"firewallRules\" argument has the wrong type (expected type \"[]interface{}\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.mysql.server\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mysqlService.server\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.mysql.server with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.mysqlService.server with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -14068,33 +15351,33 @@ func newAzureMysqlServer(runtime *resources.Runtime, args *resources.Args) (inte return &res, nil } -func (s *mqlAzureMysqlServer) Validate() error { +func (s *mqlAzureSubscriptionMysqlServiceServer) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.mysql.server\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.mysqlService.server\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("name"); !ok { - return errors.New("Initialized \"azure.mysql.server\" resource without a \"name\". This field is required.") + return errors.New("Initialized \"azure.subscription.mysqlService.server\" resource without a \"name\". This field is required.") } if _, ok := s.Cache.Load("location"); !ok { - return errors.New("Initialized \"azure.mysql.server\" resource without a \"location\". This field is required.") + return errors.New("Initialized \"azure.subscription.mysqlService.server\" resource without a \"location\". This field is required.") } if _, ok := s.Cache.Load("tags"); !ok { - return errors.New("Initialized \"azure.mysql.server\" resource without a \"tags\". This field is required.") + return errors.New("Initialized \"azure.subscription.mysqlService.server\" resource without a \"tags\". This field is required.") } if _, ok := s.Cache.Load("type"); !ok { - return errors.New("Initialized \"azure.mysql.server\" resource without a \"type\". This field is required.") + return errors.New("Initialized \"azure.subscription.mysqlService.server\" resource without a \"type\". This field is required.") } if _, ok := s.Cache.Load("properties"); !ok { - return errors.New("Initialized \"azure.mysql.server\" resource without a \"properties\". This field is required.") + return errors.New("Initialized \"azure.subscription.mysqlService.server\" resource without a \"properties\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureMysqlServer) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.mysql.server].Register") +func (s *mqlAzureSubscriptionMysqlServiceServer) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.mysqlService.server].Register") switch name { case "id": return nil @@ -14115,13 +15398,13 @@ func (s *mqlAzureMysqlServer) Register(name string) error { case "firewallRules": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.mysql.server\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.mysqlService.server\" resource") } } // Field accessor autogenerated -func (s *mqlAzureMysqlServer) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.mysql.server].Field") +func (s *mqlAzureSubscriptionMysqlServiceServer) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.mysqlService.server].Field") switch name { case "id": return s.Id() @@ -14142,108 +15425,108 @@ func (s *mqlAzureMysqlServer) Field(name string) (interface{}, error) { case "firewallRules": return s.FirewallRules() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.mysql.server\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.mysqlService.server\" resource") } } // Id accessor autogenerated -func (s *mqlAzureMysqlServer) Id() (string, error) { +func (s *mqlAzureSubscriptionMysqlServiceServer) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.mysql.server\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.mysqlService.server\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.mysql.server\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.mysqlService.server\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Name accessor autogenerated -func (s *mqlAzureMysqlServer) Name() (string, error) { +func (s *mqlAzureSubscriptionMysqlServiceServer) Name() (string, error) { res, ok := s.Cache.Load("name") if !ok || !res.Valid { - return "", errors.New("\"azure.mysql.server\" failed: no value provided for static field \"name\"") + return "", errors.New("\"azure.subscription.mysqlService.server\" failed: no value provided for static field \"name\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.mysql.server\" failed to cast field \"name\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.mysqlService.server\" failed to cast field \"name\" to the right type (string): %#v", res) } return tres, nil } // Location accessor autogenerated -func (s *mqlAzureMysqlServer) Location() (string, error) { +func (s *mqlAzureSubscriptionMysqlServiceServer) Location() (string, error) { res, ok := s.Cache.Load("location") if !ok || !res.Valid { - return "", errors.New("\"azure.mysql.server\" failed: no value provided for static field \"location\"") + return "", errors.New("\"azure.subscription.mysqlService.server\" failed: no value provided for static field \"location\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.mysql.server\" failed to cast field \"location\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.mysqlService.server\" failed to cast field \"location\" to the right type (string): %#v", res) } return tres, nil } // Tags accessor autogenerated -func (s *mqlAzureMysqlServer) Tags() (map[string]interface{}, error) { +func (s *mqlAzureSubscriptionMysqlServiceServer) Tags() (map[string]interface{}, error) { res, ok := s.Cache.Load("tags") if !ok || !res.Valid { - return nil, errors.New("\"azure.mysql.server\" failed: no value provided for static field \"tags\"") + return nil, errors.New("\"azure.subscription.mysqlService.server\" failed: no value provided for static field \"tags\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(map[string]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.mysql.server\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.mysqlService.server\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) } return tres, nil } // Type accessor autogenerated -func (s *mqlAzureMysqlServer) Type() (string, error) { +func (s *mqlAzureSubscriptionMysqlServiceServer) Type() (string, error) { res, ok := s.Cache.Load("type") if !ok || !res.Valid { - return "", errors.New("\"azure.mysql.server\" failed: no value provided for static field \"type\"") + return "", errors.New("\"azure.subscription.mysqlService.server\" failed: no value provided for static field \"type\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.mysql.server\" failed to cast field \"type\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.mysqlService.server\" failed to cast field \"type\" to the right type (string): %#v", res) } return tres, nil } // Properties accessor autogenerated -func (s *mqlAzureMysqlServer) Properties() (interface{}, error) { +func (s *mqlAzureSubscriptionMysqlServiceServer) Properties() (interface{}, error) { res, ok := s.Cache.Load("properties") if !ok || !res.Valid { - return nil, errors.New("\"azure.mysql.server\" failed: no value provided for static field \"properties\"") + return nil, errors.New("\"azure.subscription.mysqlService.server\" failed: no value provided for static field \"properties\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.mysql.server\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.mysqlService.server\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) } return tres, nil } // Configuration accessor autogenerated -func (s *mqlAzureMysqlServer) Configuration() ([]interface{}, error) { +func (s *mqlAzureSubscriptionMysqlServiceServer) Configuration() ([]interface{}, error) { res, ok := s.Cache.Load("configuration") if !ok || !res.Valid { if err := s.ComputeConfiguration(); err != nil { @@ -14251,7 +15534,7 @@ func (s *mqlAzureMysqlServer) Configuration() ([]interface{}, error) { } res, ok = s.Cache.Load("configuration") if !ok { - return nil, errors.New("\"azure.mysql.server\" calculated \"configuration\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.mysqlService.server\" calculated \"configuration\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "configuration") } @@ -14260,13 +15543,13 @@ func (s *mqlAzureMysqlServer) Configuration() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.mysql.server\" failed to cast field \"configuration\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.mysqlService.server\" failed to cast field \"configuration\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Databases accessor autogenerated -func (s *mqlAzureMysqlServer) Databases() ([]interface{}, error) { +func (s *mqlAzureSubscriptionMysqlServiceServer) Databases() ([]interface{}, error) { res, ok := s.Cache.Load("databases") if !ok || !res.Valid { if err := s.ComputeDatabases(); err != nil { @@ -14274,7 +15557,7 @@ func (s *mqlAzureMysqlServer) Databases() ([]interface{}, error) { } res, ok = s.Cache.Load("databases") if !ok { - return nil, errors.New("\"azure.mysql.server\" calculated \"databases\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.mysqlService.server\" calculated \"databases\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "databases") } @@ -14283,13 +15566,13 @@ func (s *mqlAzureMysqlServer) Databases() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.mysql.server\" failed to cast field \"databases\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.mysqlService.server\" failed to cast field \"databases\" to the right type ([]interface{}): %#v", res) } return tres, nil } // FirewallRules accessor autogenerated -func (s *mqlAzureMysqlServer) FirewallRules() ([]interface{}, error) { +func (s *mqlAzureSubscriptionMysqlServiceServer) FirewallRules() ([]interface{}, error) { res, ok := s.Cache.Load("firewallRules") if !ok || !res.Valid { if err := s.ComputeFirewallRules(); err != nil { @@ -14297,7 +15580,7 @@ func (s *mqlAzureMysqlServer) FirewallRules() ([]interface{}, error) { } res, ok = s.Cache.Load("firewallRules") if !ok { - return nil, errors.New("\"azure.mysql.server\" calculated \"firewallRules\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.mysqlService.server\" calculated \"firewallRules\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "firewallRules") } @@ -14306,14 +15589,14 @@ func (s *mqlAzureMysqlServer) FirewallRules() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.mysql.server\" failed to cast field \"firewallRules\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.mysqlService.server\" failed to cast field \"firewallRules\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureMysqlServer) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.mysql.server].MqlCompute") +func (s *mqlAzureSubscriptionMysqlServiceServer) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.mysqlService.server].MqlCompute") switch name { case "id": return nil @@ -14334,12 +15617,12 @@ func (s *mqlAzureMysqlServer) MqlCompute(name string) error { case "firewallRules": return s.ComputeFirewallRules() default: - return errors.New("Cannot find field '" + name + "' in \"azure.mysql.server\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.mysqlService.server\" resource") } } // ComputeConfiguration computer autogenerated -func (s *mqlAzureMysqlServer) ComputeConfiguration() error { +func (s *mqlAzureSubscriptionMysqlServiceServer) ComputeConfiguration() error { var err error if _, ok := s.Cache.Load("configuration"); ok { return nil @@ -14353,7 +15636,7 @@ func (s *mqlAzureMysqlServer) ComputeConfiguration() error { } // ComputeDatabases computer autogenerated -func (s *mqlAzureMysqlServer) ComputeDatabases() error { +func (s *mqlAzureSubscriptionMysqlServiceServer) ComputeDatabases() error { var err error if _, ok := s.Cache.Load("databases"); ok { return nil @@ -14367,7 +15650,7 @@ func (s *mqlAzureMysqlServer) ComputeDatabases() error { } // ComputeFirewallRules computer autogenerated -func (s *mqlAzureMysqlServer) ComputeFirewallRules() error { +func (s *mqlAzureSubscriptionMysqlServiceServer) ComputeFirewallRules() error { var err error if _, ok := s.Cache.Load("firewallRules"); ok { return nil @@ -14380,8 +15663,8 @@ func (s *mqlAzureMysqlServer) ComputeFirewallRules() error { return nil } -// AzureMysqlDatabase resource interface -type AzureMysqlDatabase interface { +// AzureSubscriptionMysqlServiceDatabase resource interface +type AzureSubscriptionMysqlServiceDatabase interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -14394,21 +15677,21 @@ type AzureMysqlDatabase interface { Collation() (string, error) } -// mqlAzureMysqlDatabase for the azure.mysql.database resource -type mqlAzureMysqlDatabase struct { +// mqlAzureSubscriptionMysqlServiceDatabase for the azure.subscription.mysqlService.database resource +type mqlAzureSubscriptionMysqlServiceDatabase struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureMysqlDatabase) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionMysqlServiceDatabase) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.mysql.database resource -func newAzureMysqlDatabase(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.mysqlService.database resource +func newAzureSubscriptionMysqlServiceDatabase(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureMysqlDatabase{runtime.NewResource("azure.mysql.database")} + res := mqlAzureSubscriptionMysqlServiceDatabase{runtime.NewResource("azure.subscription.mysqlService.database")} // assign all named fields var id string @@ -14422,32 +15705,32 @@ func newAzureMysqlDatabase(runtime *resources.Runtime, args *resources.Args) (in switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.mysql.database\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mysqlService.database\", its \"id\" argument has the wrong type (expected type \"string\")") } case "name": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.mysql.database\", its \"name\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mysqlService.database\", its \"name\" argument has the wrong type (expected type \"string\")") } case "type": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.mysql.database\", its \"type\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mysqlService.database\", its \"type\" argument has the wrong type (expected type \"string\")") } case "charset": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.mysql.database\", its \"charset\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mysqlService.database\", its \"charset\" argument has the wrong type (expected type \"string\")") } case "collation": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.mysql.database\", its \"collation\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mysqlService.database\", its \"collation\" argument has the wrong type (expected type \"string\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.mysql.database\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mysqlService.database\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.mysql.database with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.mysqlService.database with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -14465,30 +15748,30 @@ func newAzureMysqlDatabase(runtime *resources.Runtime, args *resources.Args) (in return &res, nil } -func (s *mqlAzureMysqlDatabase) Validate() error { +func (s *mqlAzureSubscriptionMysqlServiceDatabase) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.mysql.database\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.mysqlService.database\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("name"); !ok { - return errors.New("Initialized \"azure.mysql.database\" resource without a \"name\". This field is required.") + return errors.New("Initialized \"azure.subscription.mysqlService.database\" resource without a \"name\". This field is required.") } if _, ok := s.Cache.Load("type"); !ok { - return errors.New("Initialized \"azure.mysql.database\" resource without a \"type\". This field is required.") + return errors.New("Initialized \"azure.subscription.mysqlService.database\" resource without a \"type\". This field is required.") } if _, ok := s.Cache.Load("charset"); !ok { - return errors.New("Initialized \"azure.mysql.database\" resource without a \"charset\". This field is required.") + return errors.New("Initialized \"azure.subscription.mysqlService.database\" resource without a \"charset\". This field is required.") } if _, ok := s.Cache.Load("collation"); !ok { - return errors.New("Initialized \"azure.mysql.database\" resource without a \"collation\". This field is required.") + return errors.New("Initialized \"azure.subscription.mysqlService.database\" resource without a \"collation\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureMysqlDatabase) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.mysql.database].Register") +func (s *mqlAzureSubscriptionMysqlServiceDatabase) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.mysqlService.database].Register") switch name { case "id": return nil @@ -14501,13 +15784,13 @@ func (s *mqlAzureMysqlDatabase) Register(name string) error { case "collation": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.mysql.database\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.mysqlService.database\" resource") } } // Field accessor autogenerated -func (s *mqlAzureMysqlDatabase) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.mysql.database].Field") +func (s *mqlAzureSubscriptionMysqlServiceDatabase) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.mysqlService.database].Field") switch name { case "id": return s.Id() @@ -14520,93 +15803,93 @@ func (s *mqlAzureMysqlDatabase) Field(name string) (interface{}, error) { case "collation": return s.Collation() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.mysql.database\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.mysqlService.database\" resource") } } // Id accessor autogenerated -func (s *mqlAzureMysqlDatabase) Id() (string, error) { +func (s *mqlAzureSubscriptionMysqlServiceDatabase) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.mysql.database\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.mysqlService.database\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.mysql.database\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.mysqlService.database\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Name accessor autogenerated -func (s *mqlAzureMysqlDatabase) Name() (string, error) { +func (s *mqlAzureSubscriptionMysqlServiceDatabase) Name() (string, error) { res, ok := s.Cache.Load("name") if !ok || !res.Valid { - return "", errors.New("\"azure.mysql.database\" failed: no value provided for static field \"name\"") + return "", errors.New("\"azure.subscription.mysqlService.database\" failed: no value provided for static field \"name\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.mysql.database\" failed to cast field \"name\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.mysqlService.database\" failed to cast field \"name\" to the right type (string): %#v", res) } return tres, nil } // Type accessor autogenerated -func (s *mqlAzureMysqlDatabase) Type() (string, error) { +func (s *mqlAzureSubscriptionMysqlServiceDatabase) Type() (string, error) { res, ok := s.Cache.Load("type") if !ok || !res.Valid { - return "", errors.New("\"azure.mysql.database\" failed: no value provided for static field \"type\"") + return "", errors.New("\"azure.subscription.mysqlService.database\" failed: no value provided for static field \"type\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.mysql.database\" failed to cast field \"type\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.mysqlService.database\" failed to cast field \"type\" to the right type (string): %#v", res) } return tres, nil } // Charset accessor autogenerated -func (s *mqlAzureMysqlDatabase) Charset() (string, error) { +func (s *mqlAzureSubscriptionMysqlServiceDatabase) Charset() (string, error) { res, ok := s.Cache.Load("charset") if !ok || !res.Valid { - return "", errors.New("\"azure.mysql.database\" failed: no value provided for static field \"charset\"") + return "", errors.New("\"azure.subscription.mysqlService.database\" failed: no value provided for static field \"charset\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.mysql.database\" failed to cast field \"charset\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.mysqlService.database\" failed to cast field \"charset\" to the right type (string): %#v", res) } return tres, nil } // Collation accessor autogenerated -func (s *mqlAzureMysqlDatabase) Collation() (string, error) { +func (s *mqlAzureSubscriptionMysqlServiceDatabase) Collation() (string, error) { res, ok := s.Cache.Load("collation") if !ok || !res.Valid { - return "", errors.New("\"azure.mysql.database\" failed: no value provided for static field \"collation\"") + return "", errors.New("\"azure.subscription.mysqlService.database\" failed: no value provided for static field \"collation\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.mysql.database\" failed to cast field \"collation\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.mysqlService.database\" failed to cast field \"collation\" to the right type (string): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureMysqlDatabase) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.mysql.database].MqlCompute") +func (s *mqlAzureSubscriptionMysqlServiceDatabase) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.mysqlService.database].MqlCompute") switch name { case "id": return nil @@ -14619,12 +15902,12 @@ func (s *mqlAzureMysqlDatabase) MqlCompute(name string) error { case "collation": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.mysql.database\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.mysqlService.database\" resource") } } -// AzureMysqlFlexibleServer resource interface -type AzureMysqlFlexibleServer interface { +// AzureSubscriptionMysqlServiceFlexibleServer resource interface +type AzureSubscriptionMysqlServiceFlexibleServer interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -14641,21 +15924,21 @@ type AzureMysqlFlexibleServer interface { FirewallRules() ([]interface{}, error) } -// mqlAzureMysqlFlexibleServer for the azure.mysql.flexibleServer resource -type mqlAzureMysqlFlexibleServer struct { +// mqlAzureSubscriptionMysqlServiceFlexibleServer for the azure.subscription.mysqlService.flexibleServer resource +type mqlAzureSubscriptionMysqlServiceFlexibleServer struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureMysqlFlexibleServer) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionMysqlServiceFlexibleServer) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.mysql.flexibleServer resource -func newAzureMysqlFlexibleServer(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.mysqlService.flexibleServer resource +func newAzureSubscriptionMysqlServiceFlexibleServer(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureMysqlFlexibleServer{runtime.NewResource("azure.mysql.flexibleServer")} + res := mqlAzureSubscriptionMysqlServiceFlexibleServer{runtime.NewResource("azure.subscription.mysqlService.flexibleServer")} // assign all named fields var id string @@ -14669,48 +15952,48 @@ func newAzureMysqlFlexibleServer(runtime *resources.Runtime, args *resources.Arg switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.mysql.flexibleServer\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mysqlService.flexibleServer\", its \"id\" argument has the wrong type (expected type \"string\")") } case "name": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.mysql.flexibleServer\", its \"name\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mysqlService.flexibleServer\", its \"name\" argument has the wrong type (expected type \"string\")") } case "location": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.mysql.flexibleServer\", its \"location\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mysqlService.flexibleServer\", its \"location\" argument has the wrong type (expected type \"string\")") } case "tags": if _, ok := val.(map[string]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.mysql.flexibleServer\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mysqlService.flexibleServer\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") } case "type": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.mysql.flexibleServer\", its \"type\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mysqlService.flexibleServer\", its \"type\" argument has the wrong type (expected type \"string\")") } case "properties": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.mysql.flexibleServer\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mysqlService.flexibleServer\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") } case "configuration": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.mysql.flexibleServer\", its \"configuration\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mysqlService.flexibleServer\", its \"configuration\" argument has the wrong type (expected type \"[]interface{}\")") } case "databases": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.mysql.flexibleServer\", its \"databases\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mysqlService.flexibleServer\", its \"databases\" argument has the wrong type (expected type \"[]interface{}\")") } case "firewallRules": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.mysql.flexibleServer\", its \"firewallRules\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mysqlService.flexibleServer\", its \"firewallRules\" argument has the wrong type (expected type \"[]interface{}\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.mysql.flexibleServer\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mysqlService.flexibleServer\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.mysql.flexibleServer with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.mysqlService.flexibleServer with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -14728,33 +16011,33 @@ func newAzureMysqlFlexibleServer(runtime *resources.Runtime, args *resources.Arg return &res, nil } -func (s *mqlAzureMysqlFlexibleServer) Validate() error { +func (s *mqlAzureSubscriptionMysqlServiceFlexibleServer) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.mysql.flexibleServer\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.mysqlService.flexibleServer\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("name"); !ok { - return errors.New("Initialized \"azure.mysql.flexibleServer\" resource without a \"name\". This field is required.") + return errors.New("Initialized \"azure.subscription.mysqlService.flexibleServer\" resource without a \"name\". This field is required.") } if _, ok := s.Cache.Load("location"); !ok { - return errors.New("Initialized \"azure.mysql.flexibleServer\" resource without a \"location\". This field is required.") + return errors.New("Initialized \"azure.subscription.mysqlService.flexibleServer\" resource without a \"location\". This field is required.") } if _, ok := s.Cache.Load("tags"); !ok { - return errors.New("Initialized \"azure.mysql.flexibleServer\" resource without a \"tags\". This field is required.") + return errors.New("Initialized \"azure.subscription.mysqlService.flexibleServer\" resource without a \"tags\". This field is required.") } if _, ok := s.Cache.Load("type"); !ok { - return errors.New("Initialized \"azure.mysql.flexibleServer\" resource without a \"type\". This field is required.") + return errors.New("Initialized \"azure.subscription.mysqlService.flexibleServer\" resource without a \"type\". This field is required.") } if _, ok := s.Cache.Load("properties"); !ok { - return errors.New("Initialized \"azure.mysql.flexibleServer\" resource without a \"properties\". This field is required.") + return errors.New("Initialized \"azure.subscription.mysqlService.flexibleServer\" resource without a \"properties\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureMysqlFlexibleServer) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.mysql.flexibleServer].Register") +func (s *mqlAzureSubscriptionMysqlServiceFlexibleServer) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.mysqlService.flexibleServer].Register") switch name { case "id": return nil @@ -14775,13 +16058,13 @@ func (s *mqlAzureMysqlFlexibleServer) Register(name string) error { case "firewallRules": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.mysql.flexibleServer\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.mysqlService.flexibleServer\" resource") } } // Field accessor autogenerated -func (s *mqlAzureMysqlFlexibleServer) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.mysql.flexibleServer].Field") +func (s *mqlAzureSubscriptionMysqlServiceFlexibleServer) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.mysqlService.flexibleServer].Field") switch name { case "id": return s.Id() @@ -14802,108 +16085,108 @@ func (s *mqlAzureMysqlFlexibleServer) Field(name string) (interface{}, error) { case "firewallRules": return s.FirewallRules() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.mysql.flexibleServer\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.mysqlService.flexibleServer\" resource") } } // Id accessor autogenerated -func (s *mqlAzureMysqlFlexibleServer) Id() (string, error) { +func (s *mqlAzureSubscriptionMysqlServiceFlexibleServer) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.mysql.flexibleServer\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.mysqlService.flexibleServer\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.mysql.flexibleServer\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.mysqlService.flexibleServer\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Name accessor autogenerated -func (s *mqlAzureMysqlFlexibleServer) Name() (string, error) { +func (s *mqlAzureSubscriptionMysqlServiceFlexibleServer) Name() (string, error) { res, ok := s.Cache.Load("name") if !ok || !res.Valid { - return "", errors.New("\"azure.mysql.flexibleServer\" failed: no value provided for static field \"name\"") + return "", errors.New("\"azure.subscription.mysqlService.flexibleServer\" failed: no value provided for static field \"name\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.mysql.flexibleServer\" failed to cast field \"name\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.mysqlService.flexibleServer\" failed to cast field \"name\" to the right type (string): %#v", res) } return tres, nil } // Location accessor autogenerated -func (s *mqlAzureMysqlFlexibleServer) Location() (string, error) { +func (s *mqlAzureSubscriptionMysqlServiceFlexibleServer) Location() (string, error) { res, ok := s.Cache.Load("location") if !ok || !res.Valid { - return "", errors.New("\"azure.mysql.flexibleServer\" failed: no value provided for static field \"location\"") + return "", errors.New("\"azure.subscription.mysqlService.flexibleServer\" failed: no value provided for static field \"location\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.mysql.flexibleServer\" failed to cast field \"location\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.mysqlService.flexibleServer\" failed to cast field \"location\" to the right type (string): %#v", res) } return tres, nil } // Tags accessor autogenerated -func (s *mqlAzureMysqlFlexibleServer) Tags() (map[string]interface{}, error) { +func (s *mqlAzureSubscriptionMysqlServiceFlexibleServer) Tags() (map[string]interface{}, error) { res, ok := s.Cache.Load("tags") if !ok || !res.Valid { - return nil, errors.New("\"azure.mysql.flexibleServer\" failed: no value provided for static field \"tags\"") + return nil, errors.New("\"azure.subscription.mysqlService.flexibleServer\" failed: no value provided for static field \"tags\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(map[string]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.mysql.flexibleServer\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.mysqlService.flexibleServer\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) } return tres, nil } // Type accessor autogenerated -func (s *mqlAzureMysqlFlexibleServer) Type() (string, error) { +func (s *mqlAzureSubscriptionMysqlServiceFlexibleServer) Type() (string, error) { res, ok := s.Cache.Load("type") if !ok || !res.Valid { - return "", errors.New("\"azure.mysql.flexibleServer\" failed: no value provided for static field \"type\"") + return "", errors.New("\"azure.subscription.mysqlService.flexibleServer\" failed: no value provided for static field \"type\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.mysql.flexibleServer\" failed to cast field \"type\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.mysqlService.flexibleServer\" failed to cast field \"type\" to the right type (string): %#v", res) } return tres, nil } // Properties accessor autogenerated -func (s *mqlAzureMysqlFlexibleServer) Properties() (interface{}, error) { +func (s *mqlAzureSubscriptionMysqlServiceFlexibleServer) Properties() (interface{}, error) { res, ok := s.Cache.Load("properties") if !ok || !res.Valid { - return nil, errors.New("\"azure.mysql.flexibleServer\" failed: no value provided for static field \"properties\"") + return nil, errors.New("\"azure.subscription.mysqlService.flexibleServer\" failed: no value provided for static field \"properties\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.mysql.flexibleServer\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.mysqlService.flexibleServer\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) } return tres, nil } // Configuration accessor autogenerated -func (s *mqlAzureMysqlFlexibleServer) Configuration() ([]interface{}, error) { +func (s *mqlAzureSubscriptionMysqlServiceFlexibleServer) Configuration() ([]interface{}, error) { res, ok := s.Cache.Load("configuration") if !ok || !res.Valid { if err := s.ComputeConfiguration(); err != nil { @@ -14911,7 +16194,7 @@ func (s *mqlAzureMysqlFlexibleServer) Configuration() ([]interface{}, error) { } res, ok = s.Cache.Load("configuration") if !ok { - return nil, errors.New("\"azure.mysql.flexibleServer\" calculated \"configuration\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.mysqlService.flexibleServer\" calculated \"configuration\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "configuration") } @@ -14920,13 +16203,13 @@ func (s *mqlAzureMysqlFlexibleServer) Configuration() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.mysql.flexibleServer\" failed to cast field \"configuration\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.mysqlService.flexibleServer\" failed to cast field \"configuration\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Databases accessor autogenerated -func (s *mqlAzureMysqlFlexibleServer) Databases() ([]interface{}, error) { +func (s *mqlAzureSubscriptionMysqlServiceFlexibleServer) Databases() ([]interface{}, error) { res, ok := s.Cache.Load("databases") if !ok || !res.Valid { if err := s.ComputeDatabases(); err != nil { @@ -14934,7 +16217,7 @@ func (s *mqlAzureMysqlFlexibleServer) Databases() ([]interface{}, error) { } res, ok = s.Cache.Load("databases") if !ok { - return nil, errors.New("\"azure.mysql.flexibleServer\" calculated \"databases\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.mysqlService.flexibleServer\" calculated \"databases\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "databases") } @@ -14943,13 +16226,13 @@ func (s *mqlAzureMysqlFlexibleServer) Databases() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.mysql.flexibleServer\" failed to cast field \"databases\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.mysqlService.flexibleServer\" failed to cast field \"databases\" to the right type ([]interface{}): %#v", res) } return tres, nil } // FirewallRules accessor autogenerated -func (s *mqlAzureMysqlFlexibleServer) FirewallRules() ([]interface{}, error) { +func (s *mqlAzureSubscriptionMysqlServiceFlexibleServer) FirewallRules() ([]interface{}, error) { res, ok := s.Cache.Load("firewallRules") if !ok || !res.Valid { if err := s.ComputeFirewallRules(); err != nil { @@ -14957,7 +16240,7 @@ func (s *mqlAzureMysqlFlexibleServer) FirewallRules() ([]interface{}, error) { } res, ok = s.Cache.Load("firewallRules") if !ok { - return nil, errors.New("\"azure.mysql.flexibleServer\" calculated \"firewallRules\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.mysqlService.flexibleServer\" calculated \"firewallRules\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "firewallRules") } @@ -14966,14 +16249,14 @@ func (s *mqlAzureMysqlFlexibleServer) FirewallRules() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.mysql.flexibleServer\" failed to cast field \"firewallRules\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.mysqlService.flexibleServer\" failed to cast field \"firewallRules\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureMysqlFlexibleServer) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.mysql.flexibleServer].MqlCompute") +func (s *mqlAzureSubscriptionMysqlServiceFlexibleServer) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.mysqlService.flexibleServer].MqlCompute") switch name { case "id": return nil @@ -14994,12 +16277,12 @@ func (s *mqlAzureMysqlFlexibleServer) MqlCompute(name string) error { case "firewallRules": return s.ComputeFirewallRules() default: - return errors.New("Cannot find field '" + name + "' in \"azure.mysql.flexibleServer\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.mysqlService.flexibleServer\" resource") } } // ComputeConfiguration computer autogenerated -func (s *mqlAzureMysqlFlexibleServer) ComputeConfiguration() error { +func (s *mqlAzureSubscriptionMysqlServiceFlexibleServer) ComputeConfiguration() error { var err error if _, ok := s.Cache.Load("configuration"); ok { return nil @@ -15013,7 +16296,7 @@ func (s *mqlAzureMysqlFlexibleServer) ComputeConfiguration() error { } // ComputeDatabases computer autogenerated -func (s *mqlAzureMysqlFlexibleServer) ComputeDatabases() error { +func (s *mqlAzureSubscriptionMysqlServiceFlexibleServer) ComputeDatabases() error { var err error if _, ok := s.Cache.Load("databases"); ok { return nil @@ -15027,7 +16310,7 @@ func (s *mqlAzureMysqlFlexibleServer) ComputeDatabases() error { } // ComputeFirewallRules computer autogenerated -func (s *mqlAzureMysqlFlexibleServer) ComputeFirewallRules() error { +func (s *mqlAzureSubscriptionMysqlServiceFlexibleServer) ComputeFirewallRules() error { var err error if _, ok := s.Cache.Load("firewallRules"); ok { return nil @@ -15040,31 +16323,41 @@ func (s *mqlAzureMysqlFlexibleServer) ComputeFirewallRules() error { return nil } -// AzureMariadb resource interface -type AzureMariadb interface { +// AzureSubscriptionMariadbService resource interface +type AzureSubscriptionMariadbService interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) Register(string) error Validate() error + SubscriptionId() (string, error) Servers() ([]interface{}, error) } -// mqlAzureMariadb for the azure.mariadb resource -type mqlAzureMariadb struct { +// mqlAzureSubscriptionMariadbService for the azure.subscription.mariadbService resource +type mqlAzureSubscriptionMariadbService struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureMariadb) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionMariadbService) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.mariadb resource -func newAzureMariadb(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.mariadbService resource +func newAzureSubscriptionMariadbService(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureMariadb{runtime.NewResource("azure.mariadb")} + res := mqlAzureSubscriptionMariadbService{runtime.NewResource("azure.subscription.mariadbService")} + var existing AzureSubscriptionMariadbService + args, existing, err = res.init(args) + if err != nil { + return nil, err + } + if existing != nil { + return existing, nil + } + // assign all named fields var id string @@ -15076,18 +16369,22 @@ func newAzureMariadb(runtime *resources.Runtime, args *resources.Args) (interfac } switch name { + case "subscriptionId": + if _, ok := val.(string); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription.mariadbService\", its \"subscriptionId\" argument has the wrong type (expected type \"string\")") + } case "servers": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.mariadb\", its \"servers\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mariadbService\", its \"servers\" argument has the wrong type (expected type \"[]interface{}\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.mariadb\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mariadbService\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.mariadb with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.mariadbService with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -15105,37 +16402,59 @@ func newAzureMariadb(runtime *resources.Runtime, args *resources.Args) (interfac return &res, nil } -func (s *mqlAzureMariadb) Validate() error { +func (s *mqlAzureSubscriptionMariadbService) Validate() error { // required arguments - // no required fields found + if _, ok := s.Cache.Load("subscriptionId"); !ok { + return errors.New("Initialized \"azure.subscription.mariadbService\" resource without a \"subscriptionId\". This field is required.") + } return nil } // Register accessor autogenerated -func (s *mqlAzureMariadb) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.mariadb].Register") +func (s *mqlAzureSubscriptionMariadbService) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.mariadbService].Register") switch name { + case "subscriptionId": + return nil case "servers": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.mariadb\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.mariadbService\" resource") } } // Field accessor autogenerated -func (s *mqlAzureMariadb) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.mariadb].Field") +func (s *mqlAzureSubscriptionMariadbService) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.mariadbService].Field") switch name { + case "subscriptionId": + return s.SubscriptionId() case "servers": return s.Servers() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.mariadb\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.mariadbService\" resource") } } +// SubscriptionId accessor autogenerated +func (s *mqlAzureSubscriptionMariadbService) SubscriptionId() (string, error) { + res, ok := s.Cache.Load("subscriptionId") + if !ok || !res.Valid { + return "", errors.New("\"azure.subscription.mariadbService\" failed: no value provided for static field \"subscriptionId\"") + } + if res.Error != nil { + return "", res.Error + } + tres, ok := res.Data.(string) + if !ok { + return "", fmt.Errorf("\"azure.subscription.mariadbService\" failed to cast field \"subscriptionId\" to the right type (string): %#v", res) + } + return tres, nil +} + // Servers accessor autogenerated -func (s *mqlAzureMariadb) Servers() ([]interface{}, error) { +func (s *mqlAzureSubscriptionMariadbService) Servers() ([]interface{}, error) { res, ok := s.Cache.Load("servers") if !ok || !res.Valid { if err := s.ComputeServers(); err != nil { @@ -15143,7 +16462,7 @@ func (s *mqlAzureMariadb) Servers() ([]interface{}, error) { } res, ok = s.Cache.Load("servers") if !ok { - return nil, errors.New("\"azure.mariadb\" calculated \"servers\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.mariadbService\" calculated \"servers\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "servers") } @@ -15152,24 +16471,26 @@ func (s *mqlAzureMariadb) Servers() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.mariadb\" failed to cast field \"servers\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.mariadbService\" failed to cast field \"servers\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureMariadb) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.mariadb].MqlCompute") +func (s *mqlAzureSubscriptionMariadbService) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.mariadbService].MqlCompute") switch name { + case "subscriptionId": + return nil case "servers": return s.ComputeServers() default: - return errors.New("Cannot find field '" + name + "' in \"azure.mariadb\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.mariadbService\" resource") } } // ComputeServers computer autogenerated -func (s *mqlAzureMariadb) ComputeServers() error { +func (s *mqlAzureSubscriptionMariadbService) ComputeServers() error { var err error if _, ok := s.Cache.Load("servers"); ok { return nil @@ -15182,8 +16503,8 @@ func (s *mqlAzureMariadb) ComputeServers() error { return nil } -// AzureMariadbServer resource interface -type AzureMariadbServer interface { +// AzureSubscriptionMariadbServiceServer resource interface +type AzureSubscriptionMariadbServiceServer interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -15200,21 +16521,21 @@ type AzureMariadbServer interface { FirewallRules() ([]interface{}, error) } -// mqlAzureMariadbServer for the azure.mariadb.server resource -type mqlAzureMariadbServer struct { +// mqlAzureSubscriptionMariadbServiceServer for the azure.subscription.mariadbService.server resource +type mqlAzureSubscriptionMariadbServiceServer struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureMariadbServer) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionMariadbServiceServer) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.mariadb.server resource -func newAzureMariadbServer(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.mariadbService.server resource +func newAzureSubscriptionMariadbServiceServer(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureMariadbServer{runtime.NewResource("azure.mariadb.server")} + res := mqlAzureSubscriptionMariadbServiceServer{runtime.NewResource("azure.subscription.mariadbService.server")} // assign all named fields var id string @@ -15228,48 +16549,48 @@ func newAzureMariadbServer(runtime *resources.Runtime, args *resources.Args) (in switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.mariadb.server\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mariadbService.server\", its \"id\" argument has the wrong type (expected type \"string\")") } case "name": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.mariadb.server\", its \"name\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mariadbService.server\", its \"name\" argument has the wrong type (expected type \"string\")") } case "location": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.mariadb.server\", its \"location\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mariadbService.server\", its \"location\" argument has the wrong type (expected type \"string\")") } case "tags": if _, ok := val.(map[string]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.mariadb.server\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mariadbService.server\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") } case "type": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.mariadb.server\", its \"type\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mariadbService.server\", its \"type\" argument has the wrong type (expected type \"string\")") } case "properties": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.mariadb.server\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mariadbService.server\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") } case "configuration": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.mariadb.server\", its \"configuration\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mariadbService.server\", its \"configuration\" argument has the wrong type (expected type \"[]interface{}\")") } case "databases": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.mariadb.server\", its \"databases\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mariadbService.server\", its \"databases\" argument has the wrong type (expected type \"[]interface{}\")") } case "firewallRules": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.mariadb.server\", its \"firewallRules\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mariadbService.server\", its \"firewallRules\" argument has the wrong type (expected type \"[]interface{}\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.mariadb.server\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mariadbService.server\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.mariadb.server with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.mariadbService.server with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -15287,33 +16608,33 @@ func newAzureMariadbServer(runtime *resources.Runtime, args *resources.Args) (in return &res, nil } -func (s *mqlAzureMariadbServer) Validate() error { +func (s *mqlAzureSubscriptionMariadbServiceServer) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.mariadb.server\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.mariadbService.server\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("name"); !ok { - return errors.New("Initialized \"azure.mariadb.server\" resource without a \"name\". This field is required.") + return errors.New("Initialized \"azure.subscription.mariadbService.server\" resource without a \"name\". This field is required.") } if _, ok := s.Cache.Load("location"); !ok { - return errors.New("Initialized \"azure.mariadb.server\" resource without a \"location\". This field is required.") + return errors.New("Initialized \"azure.subscription.mariadbService.server\" resource without a \"location\". This field is required.") } if _, ok := s.Cache.Load("tags"); !ok { - return errors.New("Initialized \"azure.mariadb.server\" resource without a \"tags\". This field is required.") + return errors.New("Initialized \"azure.subscription.mariadbService.server\" resource without a \"tags\". This field is required.") } if _, ok := s.Cache.Load("type"); !ok { - return errors.New("Initialized \"azure.mariadb.server\" resource without a \"type\". This field is required.") + return errors.New("Initialized \"azure.subscription.mariadbService.server\" resource without a \"type\". This field is required.") } if _, ok := s.Cache.Load("properties"); !ok { - return errors.New("Initialized \"azure.mariadb.server\" resource without a \"properties\". This field is required.") + return errors.New("Initialized \"azure.subscription.mariadbService.server\" resource without a \"properties\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureMariadbServer) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.mariadb.server].Register") +func (s *mqlAzureSubscriptionMariadbServiceServer) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.mariadbService.server].Register") switch name { case "id": return nil @@ -15334,13 +16655,13 @@ func (s *mqlAzureMariadbServer) Register(name string) error { case "firewallRules": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.mariadb.server\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.mariadbService.server\" resource") } } // Field accessor autogenerated -func (s *mqlAzureMariadbServer) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.mariadb.server].Field") +func (s *mqlAzureSubscriptionMariadbServiceServer) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.mariadbService.server].Field") switch name { case "id": return s.Id() @@ -15361,108 +16682,108 @@ func (s *mqlAzureMariadbServer) Field(name string) (interface{}, error) { case "firewallRules": return s.FirewallRules() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.mariadb.server\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.mariadbService.server\" resource") } } // Id accessor autogenerated -func (s *mqlAzureMariadbServer) Id() (string, error) { +func (s *mqlAzureSubscriptionMariadbServiceServer) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.mariadb.server\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.mariadbService.server\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.mariadb.server\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.mariadbService.server\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Name accessor autogenerated -func (s *mqlAzureMariadbServer) Name() (string, error) { +func (s *mqlAzureSubscriptionMariadbServiceServer) Name() (string, error) { res, ok := s.Cache.Load("name") if !ok || !res.Valid { - return "", errors.New("\"azure.mariadb.server\" failed: no value provided for static field \"name\"") + return "", errors.New("\"azure.subscription.mariadbService.server\" failed: no value provided for static field \"name\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.mariadb.server\" failed to cast field \"name\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.mariadbService.server\" failed to cast field \"name\" to the right type (string): %#v", res) } return tres, nil } // Location accessor autogenerated -func (s *mqlAzureMariadbServer) Location() (string, error) { +func (s *mqlAzureSubscriptionMariadbServiceServer) Location() (string, error) { res, ok := s.Cache.Load("location") if !ok || !res.Valid { - return "", errors.New("\"azure.mariadb.server\" failed: no value provided for static field \"location\"") + return "", errors.New("\"azure.subscription.mariadbService.server\" failed: no value provided for static field \"location\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.mariadb.server\" failed to cast field \"location\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.mariadbService.server\" failed to cast field \"location\" to the right type (string): %#v", res) } return tres, nil } // Tags accessor autogenerated -func (s *mqlAzureMariadbServer) Tags() (map[string]interface{}, error) { +func (s *mqlAzureSubscriptionMariadbServiceServer) Tags() (map[string]interface{}, error) { res, ok := s.Cache.Load("tags") if !ok || !res.Valid { - return nil, errors.New("\"azure.mariadb.server\" failed: no value provided for static field \"tags\"") + return nil, errors.New("\"azure.subscription.mariadbService.server\" failed: no value provided for static field \"tags\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(map[string]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.mariadb.server\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.mariadbService.server\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) } return tres, nil } // Type accessor autogenerated -func (s *mqlAzureMariadbServer) Type() (string, error) { +func (s *mqlAzureSubscriptionMariadbServiceServer) Type() (string, error) { res, ok := s.Cache.Load("type") if !ok || !res.Valid { - return "", errors.New("\"azure.mariadb.server\" failed: no value provided for static field \"type\"") + return "", errors.New("\"azure.subscription.mariadbService.server\" failed: no value provided for static field \"type\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.mariadb.server\" failed to cast field \"type\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.mariadbService.server\" failed to cast field \"type\" to the right type (string): %#v", res) } return tres, nil } // Properties accessor autogenerated -func (s *mqlAzureMariadbServer) Properties() (interface{}, error) { +func (s *mqlAzureSubscriptionMariadbServiceServer) Properties() (interface{}, error) { res, ok := s.Cache.Load("properties") if !ok || !res.Valid { - return nil, errors.New("\"azure.mariadb.server\" failed: no value provided for static field \"properties\"") + return nil, errors.New("\"azure.subscription.mariadbService.server\" failed: no value provided for static field \"properties\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.mariadb.server\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.mariadbService.server\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) } return tres, nil } // Configuration accessor autogenerated -func (s *mqlAzureMariadbServer) Configuration() ([]interface{}, error) { +func (s *mqlAzureSubscriptionMariadbServiceServer) Configuration() ([]interface{}, error) { res, ok := s.Cache.Load("configuration") if !ok || !res.Valid { if err := s.ComputeConfiguration(); err != nil { @@ -15470,7 +16791,7 @@ func (s *mqlAzureMariadbServer) Configuration() ([]interface{}, error) { } res, ok = s.Cache.Load("configuration") if !ok { - return nil, errors.New("\"azure.mariadb.server\" calculated \"configuration\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.mariadbService.server\" calculated \"configuration\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "configuration") } @@ -15479,13 +16800,13 @@ func (s *mqlAzureMariadbServer) Configuration() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.mariadb.server\" failed to cast field \"configuration\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.mariadbService.server\" failed to cast field \"configuration\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Databases accessor autogenerated -func (s *mqlAzureMariadbServer) Databases() ([]interface{}, error) { +func (s *mqlAzureSubscriptionMariadbServiceServer) Databases() ([]interface{}, error) { res, ok := s.Cache.Load("databases") if !ok || !res.Valid { if err := s.ComputeDatabases(); err != nil { @@ -15493,7 +16814,7 @@ func (s *mqlAzureMariadbServer) Databases() ([]interface{}, error) { } res, ok = s.Cache.Load("databases") if !ok { - return nil, errors.New("\"azure.mariadb.server\" calculated \"databases\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.mariadbService.server\" calculated \"databases\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "databases") } @@ -15502,13 +16823,13 @@ func (s *mqlAzureMariadbServer) Databases() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.mariadb.server\" failed to cast field \"databases\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.mariadbService.server\" failed to cast field \"databases\" to the right type ([]interface{}): %#v", res) } return tres, nil } // FirewallRules accessor autogenerated -func (s *mqlAzureMariadbServer) FirewallRules() ([]interface{}, error) { +func (s *mqlAzureSubscriptionMariadbServiceServer) FirewallRules() ([]interface{}, error) { res, ok := s.Cache.Load("firewallRules") if !ok || !res.Valid { if err := s.ComputeFirewallRules(); err != nil { @@ -15516,7 +16837,7 @@ func (s *mqlAzureMariadbServer) FirewallRules() ([]interface{}, error) { } res, ok = s.Cache.Load("firewallRules") if !ok { - return nil, errors.New("\"azure.mariadb.server\" calculated \"firewallRules\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.mariadbService.server\" calculated \"firewallRules\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "firewallRules") } @@ -15525,14 +16846,14 @@ func (s *mqlAzureMariadbServer) FirewallRules() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.mariadb.server\" failed to cast field \"firewallRules\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.mariadbService.server\" failed to cast field \"firewallRules\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureMariadbServer) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.mariadb.server].MqlCompute") +func (s *mqlAzureSubscriptionMariadbServiceServer) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.mariadbService.server].MqlCompute") switch name { case "id": return nil @@ -15553,12 +16874,12 @@ func (s *mqlAzureMariadbServer) MqlCompute(name string) error { case "firewallRules": return s.ComputeFirewallRules() default: - return errors.New("Cannot find field '" + name + "' in \"azure.mariadb.server\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.mariadbService.server\" resource") } } // ComputeConfiguration computer autogenerated -func (s *mqlAzureMariadbServer) ComputeConfiguration() error { +func (s *mqlAzureSubscriptionMariadbServiceServer) ComputeConfiguration() error { var err error if _, ok := s.Cache.Load("configuration"); ok { return nil @@ -15572,7 +16893,7 @@ func (s *mqlAzureMariadbServer) ComputeConfiguration() error { } // ComputeDatabases computer autogenerated -func (s *mqlAzureMariadbServer) ComputeDatabases() error { +func (s *mqlAzureSubscriptionMariadbServiceServer) ComputeDatabases() error { var err error if _, ok := s.Cache.Load("databases"); ok { return nil @@ -15586,7 +16907,7 @@ func (s *mqlAzureMariadbServer) ComputeDatabases() error { } // ComputeFirewallRules computer autogenerated -func (s *mqlAzureMariadbServer) ComputeFirewallRules() error { +func (s *mqlAzureSubscriptionMariadbServiceServer) ComputeFirewallRules() error { var err error if _, ok := s.Cache.Load("firewallRules"); ok { return nil @@ -15599,8 +16920,8 @@ func (s *mqlAzureMariadbServer) ComputeFirewallRules() error { return nil } -// AzureMariadbDatabase resource interface -type AzureMariadbDatabase interface { +// AzureSubscriptionMariadbServiceDatabase resource interface +type AzureSubscriptionMariadbServiceDatabase interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -15613,21 +16934,21 @@ type AzureMariadbDatabase interface { Collation() (string, error) } -// mqlAzureMariadbDatabase for the azure.mariadb.database resource -type mqlAzureMariadbDatabase struct { +// mqlAzureSubscriptionMariadbServiceDatabase for the azure.subscription.mariadbService.database resource +type mqlAzureSubscriptionMariadbServiceDatabase struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureMariadbDatabase) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionMariadbServiceDatabase) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.mariadb.database resource -func newAzureMariadbDatabase(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.mariadbService.database resource +func newAzureSubscriptionMariadbServiceDatabase(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureMariadbDatabase{runtime.NewResource("azure.mariadb.database")} + res := mqlAzureSubscriptionMariadbServiceDatabase{runtime.NewResource("azure.subscription.mariadbService.database")} // assign all named fields var id string @@ -15641,32 +16962,32 @@ func newAzureMariadbDatabase(runtime *resources.Runtime, args *resources.Args) ( switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.mariadb.database\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mariadbService.database\", its \"id\" argument has the wrong type (expected type \"string\")") } case "name": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.mariadb.database\", its \"name\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mariadbService.database\", its \"name\" argument has the wrong type (expected type \"string\")") } case "type": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.mariadb.database\", its \"type\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mariadbService.database\", its \"type\" argument has the wrong type (expected type \"string\")") } case "charset": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.mariadb.database\", its \"charset\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mariadbService.database\", its \"charset\" argument has the wrong type (expected type \"string\")") } case "collation": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.mariadb.database\", its \"collation\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mariadbService.database\", its \"collation\" argument has the wrong type (expected type \"string\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.mariadb.database\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.mariadbService.database\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.mariadb.database with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.mariadbService.database with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -15684,30 +17005,30 @@ func newAzureMariadbDatabase(runtime *resources.Runtime, args *resources.Args) ( return &res, nil } -func (s *mqlAzureMariadbDatabase) Validate() error { +func (s *mqlAzureSubscriptionMariadbServiceDatabase) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.mariadb.database\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.mariadbService.database\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("name"); !ok { - return errors.New("Initialized \"azure.mariadb.database\" resource without a \"name\". This field is required.") + return errors.New("Initialized \"azure.subscription.mariadbService.database\" resource without a \"name\". This field is required.") } if _, ok := s.Cache.Load("type"); !ok { - return errors.New("Initialized \"azure.mariadb.database\" resource without a \"type\". This field is required.") + return errors.New("Initialized \"azure.subscription.mariadbService.database\" resource without a \"type\". This field is required.") } if _, ok := s.Cache.Load("charset"); !ok { - return errors.New("Initialized \"azure.mariadb.database\" resource without a \"charset\". This field is required.") + return errors.New("Initialized \"azure.subscription.mariadbService.database\" resource without a \"charset\". This field is required.") } if _, ok := s.Cache.Load("collation"); !ok { - return errors.New("Initialized \"azure.mariadb.database\" resource without a \"collation\". This field is required.") + return errors.New("Initialized \"azure.subscription.mariadbService.database\" resource without a \"collation\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureMariadbDatabase) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.mariadb.database].Register") +func (s *mqlAzureSubscriptionMariadbServiceDatabase) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.mariadbService.database].Register") switch name { case "id": return nil @@ -15720,13 +17041,13 @@ func (s *mqlAzureMariadbDatabase) Register(name string) error { case "collation": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.mariadb.database\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.mariadbService.database\" resource") } } // Field accessor autogenerated -func (s *mqlAzureMariadbDatabase) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.mariadb.database].Field") +func (s *mqlAzureSubscriptionMariadbServiceDatabase) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.mariadbService.database].Field") switch name { case "id": return s.Id() @@ -15739,93 +17060,93 @@ func (s *mqlAzureMariadbDatabase) Field(name string) (interface{}, error) { case "collation": return s.Collation() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.mariadb.database\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.mariadbService.database\" resource") } } // Id accessor autogenerated -func (s *mqlAzureMariadbDatabase) Id() (string, error) { +func (s *mqlAzureSubscriptionMariadbServiceDatabase) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.mariadb.database\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.mariadbService.database\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.mariadb.database\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.mariadbService.database\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Name accessor autogenerated -func (s *mqlAzureMariadbDatabase) Name() (string, error) { +func (s *mqlAzureSubscriptionMariadbServiceDatabase) Name() (string, error) { res, ok := s.Cache.Load("name") if !ok || !res.Valid { - return "", errors.New("\"azure.mariadb.database\" failed: no value provided for static field \"name\"") + return "", errors.New("\"azure.subscription.mariadbService.database\" failed: no value provided for static field \"name\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.mariadb.database\" failed to cast field \"name\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.mariadbService.database\" failed to cast field \"name\" to the right type (string): %#v", res) } return tres, nil } // Type accessor autogenerated -func (s *mqlAzureMariadbDatabase) Type() (string, error) { +func (s *mqlAzureSubscriptionMariadbServiceDatabase) Type() (string, error) { res, ok := s.Cache.Load("type") if !ok || !res.Valid { - return "", errors.New("\"azure.mariadb.database\" failed: no value provided for static field \"type\"") + return "", errors.New("\"azure.subscription.mariadbService.database\" failed: no value provided for static field \"type\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.mariadb.database\" failed to cast field \"type\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.mariadbService.database\" failed to cast field \"type\" to the right type (string): %#v", res) } return tres, nil } // Charset accessor autogenerated -func (s *mqlAzureMariadbDatabase) Charset() (string, error) { +func (s *mqlAzureSubscriptionMariadbServiceDatabase) Charset() (string, error) { res, ok := s.Cache.Load("charset") if !ok || !res.Valid { - return "", errors.New("\"azure.mariadb.database\" failed: no value provided for static field \"charset\"") + return "", errors.New("\"azure.subscription.mariadbService.database\" failed: no value provided for static field \"charset\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.mariadb.database\" failed to cast field \"charset\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.mariadbService.database\" failed to cast field \"charset\" to the right type (string): %#v", res) } return tres, nil } // Collation accessor autogenerated -func (s *mqlAzureMariadbDatabase) Collation() (string, error) { +func (s *mqlAzureSubscriptionMariadbServiceDatabase) Collation() (string, error) { res, ok := s.Cache.Load("collation") if !ok || !res.Valid { - return "", errors.New("\"azure.mariadb.database\" failed: no value provided for static field \"collation\"") + return "", errors.New("\"azure.subscription.mariadbService.database\" failed: no value provided for static field \"collation\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.mariadb.database\" failed to cast field \"collation\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.mariadbService.database\" failed to cast field \"collation\" to the right type (string): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureMariadbDatabase) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.mariadb.database].MqlCompute") +func (s *mqlAzureSubscriptionMariadbServiceDatabase) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.mariadbService.database].MqlCompute") switch name { case "id": return nil @@ -15838,12 +17159,12 @@ func (s *mqlAzureMariadbDatabase) MqlCompute(name string) error { case "collation": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.mariadb.database\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.mariadbService.database\" resource") } } -// AzureSqlConfiguration resource interface -type AzureSqlConfiguration interface { +// AzureSubscriptionSqlServiceConfiguration resource interface +type AzureSubscriptionSqlServiceConfiguration interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -15860,21 +17181,21 @@ type AzureSqlConfiguration interface { Source() (string, error) } -// mqlAzureSqlConfiguration for the azure.sql.configuration resource -type mqlAzureSqlConfiguration struct { +// mqlAzureSubscriptionSqlServiceConfiguration for the azure.subscription.sqlService.configuration resource +type mqlAzureSubscriptionSqlServiceConfiguration struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureSqlConfiguration) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionSqlServiceConfiguration) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.sql.configuration resource -func newAzureSqlConfiguration(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.sqlService.configuration resource +func newAzureSubscriptionSqlServiceConfiguration(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureSqlConfiguration{runtime.NewResource("azure.sql.configuration")} + res := mqlAzureSubscriptionSqlServiceConfiguration{runtime.NewResource("azure.subscription.sqlService.configuration")} // assign all named fields var id string @@ -15888,48 +17209,48 @@ func newAzureSqlConfiguration(runtime *resources.Runtime, args *resources.Args) switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.configuration\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.configuration\", its \"id\" argument has the wrong type (expected type \"string\")") } case "name": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.configuration\", its \"name\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.configuration\", its \"name\" argument has the wrong type (expected type \"string\")") } case "type": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.configuration\", its \"type\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.configuration\", its \"type\" argument has the wrong type (expected type \"string\")") } case "value": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.configuration\", its \"value\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.configuration\", its \"value\" argument has the wrong type (expected type \"string\")") } case "description": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.configuration\", its \"description\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.configuration\", its \"description\" argument has the wrong type (expected type \"string\")") } case "defaultValue": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.configuration\", its \"defaultValue\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.configuration\", its \"defaultValue\" argument has the wrong type (expected type \"string\")") } case "dataType": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.configuration\", its \"dataType\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.configuration\", its \"dataType\" argument has the wrong type (expected type \"string\")") } case "allowedValues": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.configuration\", its \"allowedValues\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.configuration\", its \"allowedValues\" argument has the wrong type (expected type \"string\")") } case "source": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.configuration\", its \"source\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.configuration\", its \"source\" argument has the wrong type (expected type \"string\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.sql.configuration\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.configuration\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.sql.configuration with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.sqlService.configuration with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -15947,42 +17268,42 @@ func newAzureSqlConfiguration(runtime *resources.Runtime, args *resources.Args) return &res, nil } -func (s *mqlAzureSqlConfiguration) Validate() error { +func (s *mqlAzureSubscriptionSqlServiceConfiguration) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.sql.configuration\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.configuration\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("name"); !ok { - return errors.New("Initialized \"azure.sql.configuration\" resource without a \"name\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.configuration\" resource without a \"name\". This field is required.") } if _, ok := s.Cache.Load("type"); !ok { - return errors.New("Initialized \"azure.sql.configuration\" resource without a \"type\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.configuration\" resource without a \"type\". This field is required.") } if _, ok := s.Cache.Load("value"); !ok { - return errors.New("Initialized \"azure.sql.configuration\" resource without a \"value\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.configuration\" resource without a \"value\". This field is required.") } if _, ok := s.Cache.Load("description"); !ok { - return errors.New("Initialized \"azure.sql.configuration\" resource without a \"description\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.configuration\" resource without a \"description\". This field is required.") } if _, ok := s.Cache.Load("defaultValue"); !ok { - return errors.New("Initialized \"azure.sql.configuration\" resource without a \"defaultValue\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.configuration\" resource without a \"defaultValue\". This field is required.") } if _, ok := s.Cache.Load("dataType"); !ok { - return errors.New("Initialized \"azure.sql.configuration\" resource without a \"dataType\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.configuration\" resource without a \"dataType\". This field is required.") } if _, ok := s.Cache.Load("allowedValues"); !ok { - return errors.New("Initialized \"azure.sql.configuration\" resource without a \"allowedValues\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.configuration\" resource without a \"allowedValues\". This field is required.") } if _, ok := s.Cache.Load("source"); !ok { - return errors.New("Initialized \"azure.sql.configuration\" resource without a \"source\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.configuration\" resource without a \"source\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureSqlConfiguration) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.sql.configuration].Register") +func (s *mqlAzureSubscriptionSqlServiceConfiguration) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.sqlService.configuration].Register") switch name { case "id": return nil @@ -16003,13 +17324,13 @@ func (s *mqlAzureSqlConfiguration) Register(name string) error { case "source": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.sql.configuration\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.sqlService.configuration\" resource") } } // Field accessor autogenerated -func (s *mqlAzureSqlConfiguration) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.sql.configuration].Field") +func (s *mqlAzureSubscriptionSqlServiceConfiguration) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.sqlService.configuration].Field") switch name { case "id": return s.Id() @@ -16030,157 +17351,157 @@ func (s *mqlAzureSqlConfiguration) Field(name string) (interface{}, error) { case "source": return s.Source() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.sql.configuration\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.sqlService.configuration\" resource") } } // Id accessor autogenerated -func (s *mqlAzureSqlConfiguration) Id() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceConfiguration) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.configuration\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.sqlService.configuration\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.configuration\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.configuration\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Name accessor autogenerated -func (s *mqlAzureSqlConfiguration) Name() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceConfiguration) Name() (string, error) { res, ok := s.Cache.Load("name") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.configuration\" failed: no value provided for static field \"name\"") + return "", errors.New("\"azure.subscription.sqlService.configuration\" failed: no value provided for static field \"name\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.configuration\" failed to cast field \"name\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.configuration\" failed to cast field \"name\" to the right type (string): %#v", res) } return tres, nil } // Type accessor autogenerated -func (s *mqlAzureSqlConfiguration) Type() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceConfiguration) Type() (string, error) { res, ok := s.Cache.Load("type") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.configuration\" failed: no value provided for static field \"type\"") + return "", errors.New("\"azure.subscription.sqlService.configuration\" failed: no value provided for static field \"type\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.configuration\" failed to cast field \"type\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.configuration\" failed to cast field \"type\" to the right type (string): %#v", res) } return tres, nil } // Value accessor autogenerated -func (s *mqlAzureSqlConfiguration) Value() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceConfiguration) Value() (string, error) { res, ok := s.Cache.Load("value") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.configuration\" failed: no value provided for static field \"value\"") + return "", errors.New("\"azure.subscription.sqlService.configuration\" failed: no value provided for static field \"value\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.configuration\" failed to cast field \"value\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.configuration\" failed to cast field \"value\" to the right type (string): %#v", res) } return tres, nil } // Description accessor autogenerated -func (s *mqlAzureSqlConfiguration) Description() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceConfiguration) Description() (string, error) { res, ok := s.Cache.Load("description") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.configuration\" failed: no value provided for static field \"description\"") + return "", errors.New("\"azure.subscription.sqlService.configuration\" failed: no value provided for static field \"description\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.configuration\" failed to cast field \"description\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.configuration\" failed to cast field \"description\" to the right type (string): %#v", res) } return tres, nil } // DefaultValue accessor autogenerated -func (s *mqlAzureSqlConfiguration) DefaultValue() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceConfiguration) DefaultValue() (string, error) { res, ok := s.Cache.Load("defaultValue") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.configuration\" failed: no value provided for static field \"defaultValue\"") + return "", errors.New("\"azure.subscription.sqlService.configuration\" failed: no value provided for static field \"defaultValue\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.configuration\" failed to cast field \"defaultValue\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.configuration\" failed to cast field \"defaultValue\" to the right type (string): %#v", res) } return tres, nil } // DataType accessor autogenerated -func (s *mqlAzureSqlConfiguration) DataType() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceConfiguration) DataType() (string, error) { res, ok := s.Cache.Load("dataType") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.configuration\" failed: no value provided for static field \"dataType\"") + return "", errors.New("\"azure.subscription.sqlService.configuration\" failed: no value provided for static field \"dataType\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.configuration\" failed to cast field \"dataType\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.configuration\" failed to cast field \"dataType\" to the right type (string): %#v", res) } return tres, nil } // AllowedValues accessor autogenerated -func (s *mqlAzureSqlConfiguration) AllowedValues() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceConfiguration) AllowedValues() (string, error) { res, ok := s.Cache.Load("allowedValues") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.configuration\" failed: no value provided for static field \"allowedValues\"") + return "", errors.New("\"azure.subscription.sqlService.configuration\" failed: no value provided for static field \"allowedValues\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.configuration\" failed to cast field \"allowedValues\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.configuration\" failed to cast field \"allowedValues\" to the right type (string): %#v", res) } return tres, nil } // Source accessor autogenerated -func (s *mqlAzureSqlConfiguration) Source() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceConfiguration) Source() (string, error) { res, ok := s.Cache.Load("source") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.configuration\" failed: no value provided for static field \"source\"") + return "", errors.New("\"azure.subscription.sqlService.configuration\" failed: no value provided for static field \"source\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.configuration\" failed to cast field \"source\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.configuration\" failed to cast field \"source\" to the right type (string): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureSqlConfiguration) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.sql.configuration].MqlCompute") +func (s *mqlAzureSubscriptionSqlServiceConfiguration) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.sqlService.configuration].MqlCompute") switch name { case "id": return nil @@ -16201,12 +17522,12 @@ func (s *mqlAzureSqlConfiguration) MqlCompute(name string) error { case "source": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.sql.configuration\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.sqlService.configuration\" resource") } } -// AzureSqlFirewallrule resource interface -type AzureSqlFirewallrule interface { +// AzureSubscriptionSqlServiceFirewallrule resource interface +type AzureSubscriptionSqlServiceFirewallrule interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -16219,21 +17540,21 @@ type AzureSqlFirewallrule interface { EndIpAddress() (string, error) } -// mqlAzureSqlFirewallrule for the azure.sql.firewallrule resource -type mqlAzureSqlFirewallrule struct { +// mqlAzureSubscriptionSqlServiceFirewallrule for the azure.subscription.sqlService.firewallrule resource +type mqlAzureSubscriptionSqlServiceFirewallrule struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureSqlFirewallrule) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionSqlServiceFirewallrule) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.sql.firewallrule resource -func newAzureSqlFirewallrule(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.sqlService.firewallrule resource +func newAzureSubscriptionSqlServiceFirewallrule(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureSqlFirewallrule{runtime.NewResource("azure.sql.firewallrule")} + res := mqlAzureSubscriptionSqlServiceFirewallrule{runtime.NewResource("azure.subscription.sqlService.firewallrule")} // assign all named fields var id string @@ -16247,32 +17568,32 @@ func newAzureSqlFirewallrule(runtime *resources.Runtime, args *resources.Args) ( switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.firewallrule\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.firewallrule\", its \"id\" argument has the wrong type (expected type \"string\")") } case "name": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.firewallrule\", its \"name\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.firewallrule\", its \"name\" argument has the wrong type (expected type \"string\")") } case "type": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.firewallrule\", its \"type\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.firewallrule\", its \"type\" argument has the wrong type (expected type \"string\")") } case "startIpAddress": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.firewallrule\", its \"startIpAddress\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.firewallrule\", its \"startIpAddress\" argument has the wrong type (expected type \"string\")") } case "endIpAddress": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.sql.firewallrule\", its \"endIpAddress\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.firewallrule\", its \"endIpAddress\" argument has the wrong type (expected type \"string\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.sql.firewallrule\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.sqlService.firewallrule\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.sql.firewallrule with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.sqlService.firewallrule with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -16290,30 +17611,30 @@ func newAzureSqlFirewallrule(runtime *resources.Runtime, args *resources.Args) ( return &res, nil } -func (s *mqlAzureSqlFirewallrule) Validate() error { +func (s *mqlAzureSubscriptionSqlServiceFirewallrule) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.sql.firewallrule\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.firewallrule\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("name"); !ok { - return errors.New("Initialized \"azure.sql.firewallrule\" resource without a \"name\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.firewallrule\" resource without a \"name\". This field is required.") } if _, ok := s.Cache.Load("type"); !ok { - return errors.New("Initialized \"azure.sql.firewallrule\" resource without a \"type\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.firewallrule\" resource without a \"type\". This field is required.") } if _, ok := s.Cache.Load("startIpAddress"); !ok { - return errors.New("Initialized \"azure.sql.firewallrule\" resource without a \"startIpAddress\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.firewallrule\" resource without a \"startIpAddress\". This field is required.") } if _, ok := s.Cache.Load("endIpAddress"); !ok { - return errors.New("Initialized \"azure.sql.firewallrule\" resource without a \"endIpAddress\". This field is required.") + return errors.New("Initialized \"azure.subscription.sqlService.firewallrule\" resource without a \"endIpAddress\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureSqlFirewallrule) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.sql.firewallrule].Register") +func (s *mqlAzureSubscriptionSqlServiceFirewallrule) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.sqlService.firewallrule].Register") switch name { case "id": return nil @@ -16326,13 +17647,13 @@ func (s *mqlAzureSqlFirewallrule) Register(name string) error { case "endIpAddress": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.sql.firewallrule\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.sqlService.firewallrule\" resource") } } // Field accessor autogenerated -func (s *mqlAzureSqlFirewallrule) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.sql.firewallrule].Field") +func (s *mqlAzureSubscriptionSqlServiceFirewallrule) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.sqlService.firewallrule].Field") switch name { case "id": return s.Id() @@ -16345,93 +17666,93 @@ func (s *mqlAzureSqlFirewallrule) Field(name string) (interface{}, error) { case "endIpAddress": return s.EndIpAddress() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.sql.firewallrule\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.sqlService.firewallrule\" resource") } } // Id accessor autogenerated -func (s *mqlAzureSqlFirewallrule) Id() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceFirewallrule) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.firewallrule\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.sqlService.firewallrule\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.firewallrule\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.firewallrule\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Name accessor autogenerated -func (s *mqlAzureSqlFirewallrule) Name() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceFirewallrule) Name() (string, error) { res, ok := s.Cache.Load("name") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.firewallrule\" failed: no value provided for static field \"name\"") + return "", errors.New("\"azure.subscription.sqlService.firewallrule\" failed: no value provided for static field \"name\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.firewallrule\" failed to cast field \"name\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.firewallrule\" failed to cast field \"name\" to the right type (string): %#v", res) } return tres, nil } // Type accessor autogenerated -func (s *mqlAzureSqlFirewallrule) Type() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceFirewallrule) Type() (string, error) { res, ok := s.Cache.Load("type") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.firewallrule\" failed: no value provided for static field \"type\"") + return "", errors.New("\"azure.subscription.sqlService.firewallrule\" failed: no value provided for static field \"type\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.firewallrule\" failed to cast field \"type\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.firewallrule\" failed to cast field \"type\" to the right type (string): %#v", res) } return tres, nil } // StartIpAddress accessor autogenerated -func (s *mqlAzureSqlFirewallrule) StartIpAddress() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceFirewallrule) StartIpAddress() (string, error) { res, ok := s.Cache.Load("startIpAddress") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.firewallrule\" failed: no value provided for static field \"startIpAddress\"") + return "", errors.New("\"azure.subscription.sqlService.firewallrule\" failed: no value provided for static field \"startIpAddress\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.firewallrule\" failed to cast field \"startIpAddress\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.firewallrule\" failed to cast field \"startIpAddress\" to the right type (string): %#v", res) } return tres, nil } // EndIpAddress accessor autogenerated -func (s *mqlAzureSqlFirewallrule) EndIpAddress() (string, error) { +func (s *mqlAzureSubscriptionSqlServiceFirewallrule) EndIpAddress() (string, error) { res, ok := s.Cache.Load("endIpAddress") if !ok || !res.Valid { - return "", errors.New("\"azure.sql.firewallrule\" failed: no value provided for static field \"endIpAddress\"") + return "", errors.New("\"azure.subscription.sqlService.firewallrule\" failed: no value provided for static field \"endIpAddress\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.sql.firewallrule\" failed to cast field \"endIpAddress\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.sqlService.firewallrule\" failed to cast field \"endIpAddress\" to the right type (string): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureSqlFirewallrule) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.sql.firewallrule].MqlCompute") +func (s *mqlAzureSubscriptionSqlServiceFirewallrule) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.sqlService.firewallrule].MqlCompute") switch name { case "id": return nil @@ -16444,35 +17765,45 @@ func (s *mqlAzureSqlFirewallrule) MqlCompute(name string) error { case "endIpAddress": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.sql.firewallrule\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.sqlService.firewallrule\" resource") } } -// AzureKeyvault resource interface -type AzureKeyvault interface { +// AzureSubscriptionKeyvaultService resource interface +type AzureSubscriptionKeyvaultService interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) Register(string) error Validate() error + SubscriptionId() (string, error) Vaults() ([]interface{}, error) } -// mqlAzureKeyvault for the azure.keyvault resource -type mqlAzureKeyvault struct { +// mqlAzureSubscriptionKeyvaultService for the azure.subscription.keyvaultService resource +type mqlAzureSubscriptionKeyvaultService struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureKeyvault) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionKeyvaultService) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.keyvault resource -func newAzureKeyvault(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.keyvaultService resource +func newAzureSubscriptionKeyvaultService(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureKeyvault{runtime.NewResource("azure.keyvault")} + res := mqlAzureSubscriptionKeyvaultService{runtime.NewResource("azure.subscription.keyvaultService")} + var existing AzureSubscriptionKeyvaultService + args, existing, err = res.init(args) + if err != nil { + return nil, err + } + if existing != nil { + return existing, nil + } + // assign all named fields var id string @@ -16484,18 +17815,22 @@ func newAzureKeyvault(runtime *resources.Runtime, args *resources.Args) (interfa } switch name { + case "subscriptionId": + if _, ok := val.(string); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService\", its \"subscriptionId\" argument has the wrong type (expected type \"string\")") + } case "vaults": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault\", its \"vaults\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService\", its \"vaults\" argument has the wrong type (expected type \"[]interface{}\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.keyvault with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.keyvaultService with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -16513,37 +17848,59 @@ func newAzureKeyvault(runtime *resources.Runtime, args *resources.Args) (interfa return &res, nil } -func (s *mqlAzureKeyvault) Validate() error { +func (s *mqlAzureSubscriptionKeyvaultService) Validate() error { // required arguments - // no required fields found + if _, ok := s.Cache.Load("subscriptionId"); !ok { + return errors.New("Initialized \"azure.subscription.keyvaultService\" resource without a \"subscriptionId\". This field is required.") + } return nil } // Register accessor autogenerated -func (s *mqlAzureKeyvault) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.keyvault].Register") +func (s *mqlAzureSubscriptionKeyvaultService) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.keyvaultService].Register") switch name { + case "subscriptionId": + return nil case "vaults": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.keyvault\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.keyvaultService\" resource") } } // Field accessor autogenerated -func (s *mqlAzureKeyvault) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.keyvault].Field") +func (s *mqlAzureSubscriptionKeyvaultService) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.keyvaultService].Field") switch name { + case "subscriptionId": + return s.SubscriptionId() case "vaults": return s.Vaults() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.keyvault\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.keyvaultService\" resource") + } +} + +// SubscriptionId accessor autogenerated +func (s *mqlAzureSubscriptionKeyvaultService) SubscriptionId() (string, error) { + res, ok := s.Cache.Load("subscriptionId") + if !ok || !res.Valid { + return "", errors.New("\"azure.subscription.keyvaultService\" failed: no value provided for static field \"subscriptionId\"") + } + if res.Error != nil { + return "", res.Error } + tres, ok := res.Data.(string) + if !ok { + return "", fmt.Errorf("\"azure.subscription.keyvaultService\" failed to cast field \"subscriptionId\" to the right type (string): %#v", res) + } + return tres, nil } // Vaults accessor autogenerated -func (s *mqlAzureKeyvault) Vaults() ([]interface{}, error) { +func (s *mqlAzureSubscriptionKeyvaultService) Vaults() ([]interface{}, error) { res, ok := s.Cache.Load("vaults") if !ok || !res.Valid { if err := s.ComputeVaults(); err != nil { @@ -16551,7 +17908,7 @@ func (s *mqlAzureKeyvault) Vaults() ([]interface{}, error) { } res, ok = s.Cache.Load("vaults") if !ok { - return nil, errors.New("\"azure.keyvault\" calculated \"vaults\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.keyvaultService\" calculated \"vaults\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "vaults") } @@ -16560,24 +17917,26 @@ func (s *mqlAzureKeyvault) Vaults() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.keyvault\" failed to cast field \"vaults\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.keyvaultService\" failed to cast field \"vaults\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureKeyvault) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.keyvault].MqlCompute") +func (s *mqlAzureSubscriptionKeyvaultService) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.keyvaultService].MqlCompute") switch name { + case "subscriptionId": + return nil case "vaults": return s.ComputeVaults() default: - return errors.New("Cannot find field '" + name + "' in \"azure.keyvault\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.keyvaultService\" resource") } } // ComputeVaults computer autogenerated -func (s *mqlAzureKeyvault) ComputeVaults() error { +func (s *mqlAzureSubscriptionKeyvaultService) ComputeVaults() error { var err error if _, ok := s.Cache.Load("vaults"); ok { return nil @@ -16590,8 +17949,8 @@ func (s *mqlAzureKeyvault) ComputeVaults() error { return nil } -// AzureKeyvaultVault resource interface -type AzureKeyvaultVault interface { +// AzureSubscriptionKeyvaultServiceVault resource interface +type AzureSubscriptionKeyvaultServiceVault interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -16610,21 +17969,21 @@ type AzureKeyvaultVault interface { DiagnosticSettings() ([]interface{}, error) } -// mqlAzureKeyvaultVault for the azure.keyvault.vault resource -type mqlAzureKeyvaultVault struct { +// mqlAzureSubscriptionKeyvaultServiceVault for the azure.subscription.keyvaultService.vault resource +type mqlAzureSubscriptionKeyvaultServiceVault struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureKeyvaultVault) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionKeyvaultServiceVault) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.keyvault.vault resource -func newAzureKeyvaultVault(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.keyvaultService.vault resource +func newAzureSubscriptionKeyvaultServiceVault(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureKeyvaultVault{runtime.NewResource("azure.keyvault.vault")} + res := mqlAzureSubscriptionKeyvaultServiceVault{runtime.NewResource("azure.subscription.keyvaultService.vault")} // assign all named fields var id string @@ -16638,56 +17997,56 @@ func newAzureKeyvaultVault(runtime *resources.Runtime, args *resources.Args) (in switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.vault\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.vault\", its \"id\" argument has the wrong type (expected type \"string\")") } case "vaultName": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.vault\", its \"vaultName\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.vault\", its \"vaultName\" argument has the wrong type (expected type \"string\")") } case "type": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.vault\", its \"type\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.vault\", its \"type\" argument has the wrong type (expected type \"string\")") } case "location": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.vault\", its \"location\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.vault\", its \"location\" argument has the wrong type (expected type \"string\")") } case "tags": if _, ok := val.(map[string]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.vault\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.vault\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") } case "vaultUri": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.vault\", its \"vaultUri\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.vault\", its \"vaultUri\" argument has the wrong type (expected type \"string\")") } case "properties": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.vault\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.vault\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") } case "keys": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.vault\", its \"keys\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.vault\", its \"keys\" argument has the wrong type (expected type \"[]interface{}\")") } case "certificates": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.vault\", its \"certificates\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.vault\", its \"certificates\" argument has the wrong type (expected type \"[]interface{}\")") } case "secrets": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.vault\", its \"secrets\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.vault\", its \"secrets\" argument has the wrong type (expected type \"[]interface{}\")") } case "diagnosticSettings": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.vault\", its \"diagnosticSettings\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.vault\", its \"diagnosticSettings\" argument has the wrong type (expected type \"[]interface{}\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.vault\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.vault\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.keyvault.vault with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.keyvaultService.vault with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -16705,30 +18064,30 @@ func newAzureKeyvaultVault(runtime *resources.Runtime, args *resources.Args) (in return &res, nil } -func (s *mqlAzureKeyvaultVault) Validate() error { +func (s *mqlAzureSubscriptionKeyvaultServiceVault) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.keyvault.vault\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.keyvaultService.vault\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("vaultName"); !ok { - return errors.New("Initialized \"azure.keyvault.vault\" resource without a \"vaultName\". This field is required.") + return errors.New("Initialized \"azure.subscription.keyvaultService.vault\" resource without a \"vaultName\". This field is required.") } if _, ok := s.Cache.Load("type"); !ok { - return errors.New("Initialized \"azure.keyvault.vault\" resource without a \"type\". This field is required.") + return errors.New("Initialized \"azure.subscription.keyvaultService.vault\" resource without a \"type\". This field is required.") } if _, ok := s.Cache.Load("location"); !ok { - return errors.New("Initialized \"azure.keyvault.vault\" resource without a \"location\". This field is required.") + return errors.New("Initialized \"azure.subscription.keyvaultService.vault\" resource without a \"location\". This field is required.") } if _, ok := s.Cache.Load("tags"); !ok { - return errors.New("Initialized \"azure.keyvault.vault\" resource without a \"tags\". This field is required.") + return errors.New("Initialized \"azure.subscription.keyvaultService.vault\" resource without a \"tags\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureKeyvaultVault) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.keyvault.vault].Register") +func (s *mqlAzureSubscriptionKeyvaultServiceVault) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.keyvaultService.vault].Register") switch name { case "id": return nil @@ -16753,13 +18112,13 @@ func (s *mqlAzureKeyvaultVault) Register(name string) error { case "diagnosticSettings": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.keyvault.vault\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.keyvaultService.vault\" resource") } } // Field accessor autogenerated -func (s *mqlAzureKeyvaultVault) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.keyvault.vault].Field") +func (s *mqlAzureSubscriptionKeyvaultServiceVault) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.keyvaultService.vault].Field") switch name { case "id": return s.Id() @@ -16784,92 +18143,92 @@ func (s *mqlAzureKeyvaultVault) Field(name string) (interface{}, error) { case "diagnosticSettings": return s.DiagnosticSettings() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.keyvault.vault\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.keyvaultService.vault\" resource") } } // Id accessor autogenerated -func (s *mqlAzureKeyvaultVault) Id() (string, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceVault) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.keyvault.vault\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.keyvaultService.vault\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.keyvault.vault\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.keyvaultService.vault\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // VaultName accessor autogenerated -func (s *mqlAzureKeyvaultVault) VaultName() (string, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceVault) VaultName() (string, error) { res, ok := s.Cache.Load("vaultName") if !ok || !res.Valid { - return "", errors.New("\"azure.keyvault.vault\" failed: no value provided for static field \"vaultName\"") + return "", errors.New("\"azure.subscription.keyvaultService.vault\" failed: no value provided for static field \"vaultName\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.keyvault.vault\" failed to cast field \"vaultName\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.keyvaultService.vault\" failed to cast field \"vaultName\" to the right type (string): %#v", res) } return tres, nil } // Type accessor autogenerated -func (s *mqlAzureKeyvaultVault) Type() (string, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceVault) Type() (string, error) { res, ok := s.Cache.Load("type") if !ok || !res.Valid { - return "", errors.New("\"azure.keyvault.vault\" failed: no value provided for static field \"type\"") + return "", errors.New("\"azure.subscription.keyvaultService.vault\" failed: no value provided for static field \"type\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.keyvault.vault\" failed to cast field \"type\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.keyvaultService.vault\" failed to cast field \"type\" to the right type (string): %#v", res) } return tres, nil } // Location accessor autogenerated -func (s *mqlAzureKeyvaultVault) Location() (string, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceVault) Location() (string, error) { res, ok := s.Cache.Load("location") if !ok || !res.Valid { - return "", errors.New("\"azure.keyvault.vault\" failed: no value provided for static field \"location\"") + return "", errors.New("\"azure.subscription.keyvaultService.vault\" failed: no value provided for static field \"location\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.keyvault.vault\" failed to cast field \"location\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.keyvaultService.vault\" failed to cast field \"location\" to the right type (string): %#v", res) } return tres, nil } // Tags accessor autogenerated -func (s *mqlAzureKeyvaultVault) Tags() (map[string]interface{}, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceVault) Tags() (map[string]interface{}, error) { res, ok := s.Cache.Load("tags") if !ok || !res.Valid { - return nil, errors.New("\"azure.keyvault.vault\" failed: no value provided for static field \"tags\"") + return nil, errors.New("\"azure.subscription.keyvaultService.vault\" failed: no value provided for static field \"tags\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(map[string]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.keyvault.vault\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.keyvaultService.vault\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) } return tres, nil } // VaultUri accessor autogenerated -func (s *mqlAzureKeyvaultVault) VaultUri() (string, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceVault) VaultUri() (string, error) { res, ok := s.Cache.Load("vaultUri") if !ok || !res.Valid { if err := s.ComputeVaultUri(); err != nil { @@ -16877,7 +18236,7 @@ func (s *mqlAzureKeyvaultVault) VaultUri() (string, error) { } res, ok = s.Cache.Load("vaultUri") if !ok { - return "", errors.New("\"azure.keyvault.vault\" calculated \"vaultUri\" but didn't find its value in cache.") + return "", errors.New("\"azure.subscription.keyvaultService.vault\" calculated \"vaultUri\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "vaultUri") } @@ -16886,13 +18245,13 @@ func (s *mqlAzureKeyvaultVault) VaultUri() (string, error) { } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.keyvault.vault\" failed to cast field \"vaultUri\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.keyvaultService.vault\" failed to cast field \"vaultUri\" to the right type (string): %#v", res) } return tres, nil } // Properties accessor autogenerated -func (s *mqlAzureKeyvaultVault) Properties() (interface{}, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceVault) Properties() (interface{}, error) { res, ok := s.Cache.Load("properties") if !ok || !res.Valid { if err := s.ComputeProperties(); err != nil { @@ -16900,7 +18259,7 @@ func (s *mqlAzureKeyvaultVault) Properties() (interface{}, error) { } res, ok = s.Cache.Load("properties") if !ok { - return nil, errors.New("\"azure.keyvault.vault\" calculated \"properties\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.keyvaultService.vault\" calculated \"properties\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "properties") } @@ -16909,13 +18268,13 @@ func (s *mqlAzureKeyvaultVault) Properties() (interface{}, error) { } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.keyvault.vault\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.keyvaultService.vault\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) } return tres, nil } // Keys accessor autogenerated -func (s *mqlAzureKeyvaultVault) Keys() ([]interface{}, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceVault) Keys() ([]interface{}, error) { res, ok := s.Cache.Load("keys") if !ok || !res.Valid { if err := s.ComputeKeys(); err != nil { @@ -16923,7 +18282,7 @@ func (s *mqlAzureKeyvaultVault) Keys() ([]interface{}, error) { } res, ok = s.Cache.Load("keys") if !ok { - return nil, errors.New("\"azure.keyvault.vault\" calculated \"keys\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.keyvaultService.vault\" calculated \"keys\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "keys") } @@ -16932,13 +18291,13 @@ func (s *mqlAzureKeyvaultVault) Keys() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.keyvault.vault\" failed to cast field \"keys\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.keyvaultService.vault\" failed to cast field \"keys\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Certificates accessor autogenerated -func (s *mqlAzureKeyvaultVault) Certificates() ([]interface{}, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceVault) Certificates() ([]interface{}, error) { res, ok := s.Cache.Load("certificates") if !ok || !res.Valid { if err := s.ComputeCertificates(); err != nil { @@ -16946,7 +18305,7 @@ func (s *mqlAzureKeyvaultVault) Certificates() ([]interface{}, error) { } res, ok = s.Cache.Load("certificates") if !ok { - return nil, errors.New("\"azure.keyvault.vault\" calculated \"certificates\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.keyvaultService.vault\" calculated \"certificates\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "certificates") } @@ -16955,13 +18314,13 @@ func (s *mqlAzureKeyvaultVault) Certificates() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.keyvault.vault\" failed to cast field \"certificates\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.keyvaultService.vault\" failed to cast field \"certificates\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Secrets accessor autogenerated -func (s *mqlAzureKeyvaultVault) Secrets() ([]interface{}, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceVault) Secrets() ([]interface{}, error) { res, ok := s.Cache.Load("secrets") if !ok || !res.Valid { if err := s.ComputeSecrets(); err != nil { @@ -16969,7 +18328,7 @@ func (s *mqlAzureKeyvaultVault) Secrets() ([]interface{}, error) { } res, ok = s.Cache.Load("secrets") if !ok { - return nil, errors.New("\"azure.keyvault.vault\" calculated \"secrets\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.keyvaultService.vault\" calculated \"secrets\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "secrets") } @@ -16978,13 +18337,13 @@ func (s *mqlAzureKeyvaultVault) Secrets() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.keyvault.vault\" failed to cast field \"secrets\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.keyvaultService.vault\" failed to cast field \"secrets\" to the right type ([]interface{}): %#v", res) } return tres, nil } // DiagnosticSettings accessor autogenerated -func (s *mqlAzureKeyvaultVault) DiagnosticSettings() ([]interface{}, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceVault) DiagnosticSettings() ([]interface{}, error) { res, ok := s.Cache.Load("diagnosticSettings") if !ok || !res.Valid { if err := s.ComputeDiagnosticSettings(); err != nil { @@ -16992,7 +18351,7 @@ func (s *mqlAzureKeyvaultVault) DiagnosticSettings() ([]interface{}, error) { } res, ok = s.Cache.Load("diagnosticSettings") if !ok { - return nil, errors.New("\"azure.keyvault.vault\" calculated \"diagnosticSettings\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.keyvaultService.vault\" calculated \"diagnosticSettings\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "diagnosticSettings") } @@ -17001,14 +18360,14 @@ func (s *mqlAzureKeyvaultVault) DiagnosticSettings() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.keyvault.vault\" failed to cast field \"diagnosticSettings\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.keyvaultService.vault\" failed to cast field \"diagnosticSettings\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureKeyvaultVault) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.keyvault.vault].MqlCompute") +func (s *mqlAzureSubscriptionKeyvaultServiceVault) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.keyvaultService.vault].MqlCompute") switch name { case "id": return nil @@ -17033,12 +18392,12 @@ func (s *mqlAzureKeyvaultVault) MqlCompute(name string) error { case "diagnosticSettings": return s.ComputeDiagnosticSettings() default: - return errors.New("Cannot find field '" + name + "' in \"azure.keyvault.vault\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.keyvaultService.vault\" resource") } } // ComputeVaultUri computer autogenerated -func (s *mqlAzureKeyvaultVault) ComputeVaultUri() error { +func (s *mqlAzureSubscriptionKeyvaultServiceVault) ComputeVaultUri() error { var err error if _, ok := s.Cache.Load("vaultUri"); ok { return nil @@ -17052,7 +18411,7 @@ func (s *mqlAzureKeyvaultVault) ComputeVaultUri() error { } // ComputeProperties computer autogenerated -func (s *mqlAzureKeyvaultVault) ComputeProperties() error { +func (s *mqlAzureSubscriptionKeyvaultServiceVault) ComputeProperties() error { var err error if _, ok := s.Cache.Load("properties"); ok { return nil @@ -17066,7 +18425,7 @@ func (s *mqlAzureKeyvaultVault) ComputeProperties() error { } // ComputeKeys computer autogenerated -func (s *mqlAzureKeyvaultVault) ComputeKeys() error { +func (s *mqlAzureSubscriptionKeyvaultServiceVault) ComputeKeys() error { var err error if _, ok := s.Cache.Load("keys"); ok { return nil @@ -17080,7 +18439,7 @@ func (s *mqlAzureKeyvaultVault) ComputeKeys() error { } // ComputeCertificates computer autogenerated -func (s *mqlAzureKeyvaultVault) ComputeCertificates() error { +func (s *mqlAzureSubscriptionKeyvaultServiceVault) ComputeCertificates() error { var err error if _, ok := s.Cache.Load("certificates"); ok { return nil @@ -17094,7 +18453,7 @@ func (s *mqlAzureKeyvaultVault) ComputeCertificates() error { } // ComputeSecrets computer autogenerated -func (s *mqlAzureKeyvaultVault) ComputeSecrets() error { +func (s *mqlAzureSubscriptionKeyvaultServiceVault) ComputeSecrets() error { var err error if _, ok := s.Cache.Load("secrets"); ok { return nil @@ -17108,7 +18467,7 @@ func (s *mqlAzureKeyvaultVault) ComputeSecrets() error { } // ComputeDiagnosticSettings computer autogenerated -func (s *mqlAzureKeyvaultVault) ComputeDiagnosticSettings() error { +func (s *mqlAzureSubscriptionKeyvaultServiceVault) ComputeDiagnosticSettings() error { var err error if _, ok := s.Cache.Load("diagnosticSettings"); ok { return nil @@ -17121,8 +18480,8 @@ func (s *mqlAzureKeyvaultVault) ComputeDiagnosticSettings() error { return nil } -// AzureKeyvaultKey resource interface -type AzureKeyvaultKey interface { +// AzureSubscriptionKeyvaultServiceKey resource interface +type AzureSubscriptionKeyvaultServiceKey interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -17142,21 +18501,21 @@ type AzureKeyvaultKey interface { Versions() ([]interface{}, error) } -// mqlAzureKeyvaultKey for the azure.keyvault.key resource -type mqlAzureKeyvaultKey struct { +// mqlAzureSubscriptionKeyvaultServiceKey for the azure.subscription.keyvaultService.key resource +type mqlAzureSubscriptionKeyvaultServiceKey struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureKeyvaultKey) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionKeyvaultServiceKey) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.keyvault.key resource -func newAzureKeyvaultKey(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.keyvaultService.key resource +func newAzureSubscriptionKeyvaultServiceKey(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureKeyvaultKey{runtime.NewResource("azure.keyvault.key")} + res := mqlAzureSubscriptionKeyvaultServiceKey{runtime.NewResource("azure.subscription.keyvaultService.key")} // assign all named fields var id string @@ -17170,60 +18529,60 @@ func newAzureKeyvaultKey(runtime *resources.Runtime, args *resources.Args) (inte switch name { case "kid": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.key\", its \"kid\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.key\", its \"kid\" argument has the wrong type (expected type \"string\")") } case "tags": if _, ok := val.(map[string]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.key\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.key\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") } case "managed": if _, ok := val.(bool); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.key\", its \"managed\" argument has the wrong type (expected type \"bool\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.key\", its \"managed\" argument has the wrong type (expected type \"bool\")") } case "enabled": if _, ok := val.(bool); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.key\", its \"enabled\" argument has the wrong type (expected type \"bool\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.key\", its \"enabled\" argument has the wrong type (expected type \"bool\")") } case "notBefore": if _, ok := val.(*time.Time); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.key\", its \"notBefore\" argument has the wrong type (expected type \"*time.Time\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.key\", its \"notBefore\" argument has the wrong type (expected type \"*time.Time\")") } case "expires": if _, ok := val.(*time.Time); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.key\", its \"expires\" argument has the wrong type (expected type \"*time.Time\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.key\", its \"expires\" argument has the wrong type (expected type \"*time.Time\")") } case "created": if _, ok := val.(*time.Time); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.key\", its \"created\" argument has the wrong type (expected type \"*time.Time\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.key\", its \"created\" argument has the wrong type (expected type \"*time.Time\")") } case "updated": if _, ok := val.(*time.Time); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.key\", its \"updated\" argument has the wrong type (expected type \"*time.Time\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.key\", its \"updated\" argument has the wrong type (expected type \"*time.Time\")") } case "recoveryLevel": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.key\", its \"recoveryLevel\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.key\", its \"recoveryLevel\" argument has the wrong type (expected type \"string\")") } case "keyName": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.key\", its \"keyName\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.key\", its \"keyName\" argument has the wrong type (expected type \"string\")") } case "version": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.key\", its \"version\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.key\", its \"version\" argument has the wrong type (expected type \"string\")") } case "versions": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.key\", its \"versions\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.key\", its \"versions\" argument has the wrong type (expected type \"[]interface{}\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.key\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.key\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.keyvault.key with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.keyvaultService.key with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -17241,42 +18600,42 @@ func newAzureKeyvaultKey(runtime *resources.Runtime, args *resources.Args) (inte return &res, nil } -func (s *mqlAzureKeyvaultKey) Validate() error { +func (s *mqlAzureSubscriptionKeyvaultServiceKey) Validate() error { // required arguments if _, ok := s.Cache.Load("kid"); !ok { - return errors.New("Initialized \"azure.keyvault.key\" resource without a \"kid\". This field is required.") + return errors.New("Initialized \"azure.subscription.keyvaultService.key\" resource without a \"kid\". This field is required.") } if _, ok := s.Cache.Load("tags"); !ok { - return errors.New("Initialized \"azure.keyvault.key\" resource without a \"tags\". This field is required.") + return errors.New("Initialized \"azure.subscription.keyvaultService.key\" resource without a \"tags\". This field is required.") } if _, ok := s.Cache.Load("managed"); !ok { - return errors.New("Initialized \"azure.keyvault.key\" resource without a \"managed\". This field is required.") + return errors.New("Initialized \"azure.subscription.keyvaultService.key\" resource without a \"managed\". This field is required.") } if _, ok := s.Cache.Load("enabled"); !ok { - return errors.New("Initialized \"azure.keyvault.key\" resource without a \"enabled\". This field is required.") + return errors.New("Initialized \"azure.subscription.keyvaultService.key\" resource without a \"enabled\". This field is required.") } if _, ok := s.Cache.Load("notBefore"); !ok { - return errors.New("Initialized \"azure.keyvault.key\" resource without a \"notBefore\". This field is required.") + return errors.New("Initialized \"azure.subscription.keyvaultService.key\" resource without a \"notBefore\". This field is required.") } if _, ok := s.Cache.Load("expires"); !ok { - return errors.New("Initialized \"azure.keyvault.key\" resource without a \"expires\". This field is required.") + return errors.New("Initialized \"azure.subscription.keyvaultService.key\" resource without a \"expires\". This field is required.") } if _, ok := s.Cache.Load("created"); !ok { - return errors.New("Initialized \"azure.keyvault.key\" resource without a \"created\". This field is required.") + return errors.New("Initialized \"azure.subscription.keyvaultService.key\" resource without a \"created\". This field is required.") } if _, ok := s.Cache.Load("updated"); !ok { - return errors.New("Initialized \"azure.keyvault.key\" resource without a \"updated\". This field is required.") + return errors.New("Initialized \"azure.subscription.keyvaultService.key\" resource without a \"updated\". This field is required.") } if _, ok := s.Cache.Load("recoveryLevel"); !ok { - return errors.New("Initialized \"azure.keyvault.key\" resource without a \"recoveryLevel\". This field is required.") + return errors.New("Initialized \"azure.subscription.keyvaultService.key\" resource without a \"recoveryLevel\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureKeyvaultKey) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.keyvault.key].Register") +func (s *mqlAzureSubscriptionKeyvaultServiceKey) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.keyvaultService.key].Register") switch name { case "kid": return nil @@ -17303,13 +18662,13 @@ func (s *mqlAzureKeyvaultKey) Register(name string) error { case "versions": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.keyvault.key\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.keyvaultService.key\" resource") } } // Field accessor autogenerated -func (s *mqlAzureKeyvaultKey) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.keyvault.key].Field") +func (s *mqlAzureSubscriptionKeyvaultServiceKey) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.keyvaultService.key].Field") switch name { case "kid": return s.Kid() @@ -17336,156 +18695,156 @@ func (s *mqlAzureKeyvaultKey) Field(name string) (interface{}, error) { case "versions": return s.Versions() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.keyvault.key\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.keyvaultService.key\" resource") } } // Kid accessor autogenerated -func (s *mqlAzureKeyvaultKey) Kid() (string, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceKey) Kid() (string, error) { res, ok := s.Cache.Load("kid") if !ok || !res.Valid { - return "", errors.New("\"azure.keyvault.key\" failed: no value provided for static field \"kid\"") + return "", errors.New("\"azure.subscription.keyvaultService.key\" failed: no value provided for static field \"kid\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.keyvault.key\" failed to cast field \"kid\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.keyvaultService.key\" failed to cast field \"kid\" to the right type (string): %#v", res) } return tres, nil } // Tags accessor autogenerated -func (s *mqlAzureKeyvaultKey) Tags() (map[string]interface{}, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceKey) Tags() (map[string]interface{}, error) { res, ok := s.Cache.Load("tags") if !ok || !res.Valid { - return nil, errors.New("\"azure.keyvault.key\" failed: no value provided for static field \"tags\"") + return nil, errors.New("\"azure.subscription.keyvaultService.key\" failed: no value provided for static field \"tags\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(map[string]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.keyvault.key\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.keyvaultService.key\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) } return tres, nil } // Managed accessor autogenerated -func (s *mqlAzureKeyvaultKey) Managed() (bool, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceKey) Managed() (bool, error) { res, ok := s.Cache.Load("managed") if !ok || !res.Valid { - return false, errors.New("\"azure.keyvault.key\" failed: no value provided for static field \"managed\"") + return false, errors.New("\"azure.subscription.keyvaultService.key\" failed: no value provided for static field \"managed\"") } if res.Error != nil { return false, res.Error } tres, ok := res.Data.(bool) if !ok { - return false, fmt.Errorf("\"azure.keyvault.key\" failed to cast field \"managed\" to the right type (bool): %#v", res) + return false, fmt.Errorf("\"azure.subscription.keyvaultService.key\" failed to cast field \"managed\" to the right type (bool): %#v", res) } return tres, nil } // Enabled accessor autogenerated -func (s *mqlAzureKeyvaultKey) Enabled() (bool, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceKey) Enabled() (bool, error) { res, ok := s.Cache.Load("enabled") if !ok || !res.Valid { - return false, errors.New("\"azure.keyvault.key\" failed: no value provided for static field \"enabled\"") + return false, errors.New("\"azure.subscription.keyvaultService.key\" failed: no value provided for static field \"enabled\"") } if res.Error != nil { return false, res.Error } tres, ok := res.Data.(bool) if !ok { - return false, fmt.Errorf("\"azure.keyvault.key\" failed to cast field \"enabled\" to the right type (bool): %#v", res) + return false, fmt.Errorf("\"azure.subscription.keyvaultService.key\" failed to cast field \"enabled\" to the right type (bool): %#v", res) } return tres, nil } // NotBefore accessor autogenerated -func (s *mqlAzureKeyvaultKey) NotBefore() (*time.Time, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceKey) NotBefore() (*time.Time, error) { res, ok := s.Cache.Load("notBefore") if !ok || !res.Valid { - return nil, errors.New("\"azure.keyvault.key\" failed: no value provided for static field \"notBefore\"") + return nil, errors.New("\"azure.subscription.keyvaultService.key\" failed: no value provided for static field \"notBefore\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(*time.Time) if !ok { - return nil, fmt.Errorf("\"azure.keyvault.key\" failed to cast field \"notBefore\" to the right type (*time.Time): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.keyvaultService.key\" failed to cast field \"notBefore\" to the right type (*time.Time): %#v", res) } return tres, nil } // Expires accessor autogenerated -func (s *mqlAzureKeyvaultKey) Expires() (*time.Time, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceKey) Expires() (*time.Time, error) { res, ok := s.Cache.Load("expires") if !ok || !res.Valid { - return nil, errors.New("\"azure.keyvault.key\" failed: no value provided for static field \"expires\"") + return nil, errors.New("\"azure.subscription.keyvaultService.key\" failed: no value provided for static field \"expires\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(*time.Time) if !ok { - return nil, fmt.Errorf("\"azure.keyvault.key\" failed to cast field \"expires\" to the right type (*time.Time): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.keyvaultService.key\" failed to cast field \"expires\" to the right type (*time.Time): %#v", res) } return tres, nil } // Created accessor autogenerated -func (s *mqlAzureKeyvaultKey) Created() (*time.Time, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceKey) Created() (*time.Time, error) { res, ok := s.Cache.Load("created") if !ok || !res.Valid { - return nil, errors.New("\"azure.keyvault.key\" failed: no value provided for static field \"created\"") + return nil, errors.New("\"azure.subscription.keyvaultService.key\" failed: no value provided for static field \"created\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(*time.Time) if !ok { - return nil, fmt.Errorf("\"azure.keyvault.key\" failed to cast field \"created\" to the right type (*time.Time): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.keyvaultService.key\" failed to cast field \"created\" to the right type (*time.Time): %#v", res) } return tres, nil } // Updated accessor autogenerated -func (s *mqlAzureKeyvaultKey) Updated() (*time.Time, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceKey) Updated() (*time.Time, error) { res, ok := s.Cache.Load("updated") if !ok || !res.Valid { - return nil, errors.New("\"azure.keyvault.key\" failed: no value provided for static field \"updated\"") + return nil, errors.New("\"azure.subscription.keyvaultService.key\" failed: no value provided for static field \"updated\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(*time.Time) if !ok { - return nil, fmt.Errorf("\"azure.keyvault.key\" failed to cast field \"updated\" to the right type (*time.Time): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.keyvaultService.key\" failed to cast field \"updated\" to the right type (*time.Time): %#v", res) } return tres, nil } // RecoveryLevel accessor autogenerated -func (s *mqlAzureKeyvaultKey) RecoveryLevel() (string, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceKey) RecoveryLevel() (string, error) { res, ok := s.Cache.Load("recoveryLevel") if !ok || !res.Valid { - return "", errors.New("\"azure.keyvault.key\" failed: no value provided for static field \"recoveryLevel\"") + return "", errors.New("\"azure.subscription.keyvaultService.key\" failed: no value provided for static field \"recoveryLevel\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.keyvault.key\" failed to cast field \"recoveryLevel\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.keyvaultService.key\" failed to cast field \"recoveryLevel\" to the right type (string): %#v", res) } return tres, nil } // KeyName accessor autogenerated -func (s *mqlAzureKeyvaultKey) KeyName() (string, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceKey) KeyName() (string, error) { res, ok := s.Cache.Load("keyName") if !ok || !res.Valid { if err := s.ComputeKeyName(); err != nil { @@ -17493,7 +18852,7 @@ func (s *mqlAzureKeyvaultKey) KeyName() (string, error) { } res, ok = s.Cache.Load("keyName") if !ok { - return "", errors.New("\"azure.keyvault.key\" calculated \"keyName\" but didn't find its value in cache.") + return "", errors.New("\"azure.subscription.keyvaultService.key\" calculated \"keyName\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "keyName") } @@ -17502,13 +18861,13 @@ func (s *mqlAzureKeyvaultKey) KeyName() (string, error) { } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.keyvault.key\" failed to cast field \"keyName\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.keyvaultService.key\" failed to cast field \"keyName\" to the right type (string): %#v", res) } return tres, nil } // Version accessor autogenerated -func (s *mqlAzureKeyvaultKey) Version() (string, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceKey) Version() (string, error) { res, ok := s.Cache.Load("version") if !ok || !res.Valid { if err := s.ComputeVersion(); err != nil { @@ -17516,7 +18875,7 @@ func (s *mqlAzureKeyvaultKey) Version() (string, error) { } res, ok = s.Cache.Load("version") if !ok { - return "", errors.New("\"azure.keyvault.key\" calculated \"version\" but didn't find its value in cache.") + return "", errors.New("\"azure.subscription.keyvaultService.key\" calculated \"version\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "version") } @@ -17525,13 +18884,13 @@ func (s *mqlAzureKeyvaultKey) Version() (string, error) { } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.keyvault.key\" failed to cast field \"version\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.keyvaultService.key\" failed to cast field \"version\" to the right type (string): %#v", res) } return tres, nil } // Versions accessor autogenerated -func (s *mqlAzureKeyvaultKey) Versions() ([]interface{}, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceKey) Versions() ([]interface{}, error) { res, ok := s.Cache.Load("versions") if !ok || !res.Valid { if err := s.ComputeVersions(); err != nil { @@ -17539,7 +18898,7 @@ func (s *mqlAzureKeyvaultKey) Versions() ([]interface{}, error) { } res, ok = s.Cache.Load("versions") if !ok { - return nil, errors.New("\"azure.keyvault.key\" calculated \"versions\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.keyvaultService.key\" calculated \"versions\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "versions") } @@ -17548,14 +18907,14 @@ func (s *mqlAzureKeyvaultKey) Versions() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.keyvault.key\" failed to cast field \"versions\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.keyvaultService.key\" failed to cast field \"versions\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureKeyvaultKey) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.keyvault.key].MqlCompute") +func (s *mqlAzureSubscriptionKeyvaultServiceKey) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.keyvaultService.key].MqlCompute") switch name { case "kid": return nil @@ -17582,12 +18941,12 @@ func (s *mqlAzureKeyvaultKey) MqlCompute(name string) error { case "versions": return s.ComputeVersions() default: - return errors.New("Cannot find field '" + name + "' in \"azure.keyvault.key\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.keyvaultService.key\" resource") } } // ComputeKeyName computer autogenerated -func (s *mqlAzureKeyvaultKey) ComputeKeyName() error { +func (s *mqlAzureSubscriptionKeyvaultServiceKey) ComputeKeyName() error { var err error if _, ok := s.Cache.Load("keyName"); ok { return nil @@ -17601,7 +18960,7 @@ func (s *mqlAzureKeyvaultKey) ComputeKeyName() error { } // ComputeVersion computer autogenerated -func (s *mqlAzureKeyvaultKey) ComputeVersion() error { +func (s *mqlAzureSubscriptionKeyvaultServiceKey) ComputeVersion() error { var err error if _, ok := s.Cache.Load("version"); ok { return nil @@ -17615,7 +18974,7 @@ func (s *mqlAzureKeyvaultKey) ComputeVersion() error { } // ComputeVersions computer autogenerated -func (s *mqlAzureKeyvaultKey) ComputeVersions() error { +func (s *mqlAzureSubscriptionKeyvaultServiceKey) ComputeVersions() error { var err error if _, ok := s.Cache.Load("versions"); ok { return nil @@ -17628,8 +18987,8 @@ func (s *mqlAzureKeyvaultKey) ComputeVersions() error { return nil } -// AzureKeyvaultCertificate resource interface -type AzureKeyvaultCertificate interface { +// AzureSubscriptionKeyvaultServiceCertificate resource interface +type AzureSubscriptionKeyvaultServiceCertificate interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -17649,21 +19008,21 @@ type AzureKeyvaultCertificate interface { Versions() ([]interface{}, error) } -// mqlAzureKeyvaultCertificate for the azure.keyvault.certificate resource -type mqlAzureKeyvaultCertificate struct { +// mqlAzureSubscriptionKeyvaultServiceCertificate for the azure.subscription.keyvaultService.certificate resource +type mqlAzureSubscriptionKeyvaultServiceCertificate struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureKeyvaultCertificate) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionKeyvaultServiceCertificate) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.keyvault.certificate resource -func newAzureKeyvaultCertificate(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.keyvaultService.certificate resource +func newAzureSubscriptionKeyvaultServiceCertificate(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureKeyvaultCertificate{runtime.NewResource("azure.keyvault.certificate")} + res := mqlAzureSubscriptionKeyvaultServiceCertificate{runtime.NewResource("azure.subscription.keyvaultService.certificate")} // assign all named fields var id string @@ -17677,60 +19036,60 @@ func newAzureKeyvaultCertificate(runtime *resources.Runtime, args *resources.Arg switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.certificate\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.certificate\", its \"id\" argument has the wrong type (expected type \"string\")") } case "tags": if _, ok := val.(map[string]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.certificate\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.certificate\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") } case "x5t": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.certificate\", its \"x5t\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.certificate\", its \"x5t\" argument has the wrong type (expected type \"string\")") } case "enabled": if _, ok := val.(bool); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.certificate\", its \"enabled\" argument has the wrong type (expected type \"bool\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.certificate\", its \"enabled\" argument has the wrong type (expected type \"bool\")") } case "notBefore": if _, ok := val.(*time.Time); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.certificate\", its \"notBefore\" argument has the wrong type (expected type \"*time.Time\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.certificate\", its \"notBefore\" argument has the wrong type (expected type \"*time.Time\")") } case "expires": if _, ok := val.(*time.Time); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.certificate\", its \"expires\" argument has the wrong type (expected type \"*time.Time\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.certificate\", its \"expires\" argument has the wrong type (expected type \"*time.Time\")") } case "created": if _, ok := val.(*time.Time); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.certificate\", its \"created\" argument has the wrong type (expected type \"*time.Time\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.certificate\", its \"created\" argument has the wrong type (expected type \"*time.Time\")") } case "updated": if _, ok := val.(*time.Time); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.certificate\", its \"updated\" argument has the wrong type (expected type \"*time.Time\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.certificate\", its \"updated\" argument has the wrong type (expected type \"*time.Time\")") } case "recoveryLevel": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.certificate\", its \"recoveryLevel\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.certificate\", its \"recoveryLevel\" argument has the wrong type (expected type \"string\")") } case "certName": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.certificate\", its \"certName\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.certificate\", its \"certName\" argument has the wrong type (expected type \"string\")") } case "version": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.certificate\", its \"version\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.certificate\", its \"version\" argument has the wrong type (expected type \"string\")") } case "versions": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.certificate\", its \"versions\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.certificate\", its \"versions\" argument has the wrong type (expected type \"[]interface{}\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.certificate\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.certificate\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.keyvault.certificate with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.keyvaultService.certificate with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -17748,42 +19107,42 @@ func newAzureKeyvaultCertificate(runtime *resources.Runtime, args *resources.Arg return &res, nil } -func (s *mqlAzureKeyvaultCertificate) Validate() error { +func (s *mqlAzureSubscriptionKeyvaultServiceCertificate) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.keyvault.certificate\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.keyvaultService.certificate\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("tags"); !ok { - return errors.New("Initialized \"azure.keyvault.certificate\" resource without a \"tags\". This field is required.") + return errors.New("Initialized \"azure.subscription.keyvaultService.certificate\" resource without a \"tags\". This field is required.") } if _, ok := s.Cache.Load("x5t"); !ok { - return errors.New("Initialized \"azure.keyvault.certificate\" resource without a \"x5t\". This field is required.") + return errors.New("Initialized \"azure.subscription.keyvaultService.certificate\" resource without a \"x5t\". This field is required.") } if _, ok := s.Cache.Load("enabled"); !ok { - return errors.New("Initialized \"azure.keyvault.certificate\" resource without a \"enabled\". This field is required.") + return errors.New("Initialized \"azure.subscription.keyvaultService.certificate\" resource without a \"enabled\". This field is required.") } if _, ok := s.Cache.Load("notBefore"); !ok { - return errors.New("Initialized \"azure.keyvault.certificate\" resource without a \"notBefore\". This field is required.") + return errors.New("Initialized \"azure.subscription.keyvaultService.certificate\" resource without a \"notBefore\". This field is required.") } if _, ok := s.Cache.Load("expires"); !ok { - return errors.New("Initialized \"azure.keyvault.certificate\" resource without a \"expires\". This field is required.") + return errors.New("Initialized \"azure.subscription.keyvaultService.certificate\" resource without a \"expires\". This field is required.") } if _, ok := s.Cache.Load("created"); !ok { - return errors.New("Initialized \"azure.keyvault.certificate\" resource without a \"created\". This field is required.") + return errors.New("Initialized \"azure.subscription.keyvaultService.certificate\" resource without a \"created\". This field is required.") } if _, ok := s.Cache.Load("updated"); !ok { - return errors.New("Initialized \"azure.keyvault.certificate\" resource without a \"updated\". This field is required.") + return errors.New("Initialized \"azure.subscription.keyvaultService.certificate\" resource without a \"updated\". This field is required.") } if _, ok := s.Cache.Load("recoveryLevel"); !ok { - return errors.New("Initialized \"azure.keyvault.certificate\" resource without a \"recoveryLevel\". This field is required.") + return errors.New("Initialized \"azure.subscription.keyvaultService.certificate\" resource without a \"recoveryLevel\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureKeyvaultCertificate) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.keyvault.certificate].Register") +func (s *mqlAzureSubscriptionKeyvaultServiceCertificate) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.keyvaultService.certificate].Register") switch name { case "id": return nil @@ -17810,13 +19169,13 @@ func (s *mqlAzureKeyvaultCertificate) Register(name string) error { case "versions": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.keyvault.certificate\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.keyvaultService.certificate\" resource") } } // Field accessor autogenerated -func (s *mqlAzureKeyvaultCertificate) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.keyvault.certificate].Field") +func (s *mqlAzureSubscriptionKeyvaultServiceCertificate) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.keyvaultService.certificate].Field") switch name { case "id": return s.Id() @@ -17843,156 +19202,156 @@ func (s *mqlAzureKeyvaultCertificate) Field(name string) (interface{}, error) { case "versions": return s.Versions() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.keyvault.certificate\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.keyvaultService.certificate\" resource") } } // Id accessor autogenerated -func (s *mqlAzureKeyvaultCertificate) Id() (string, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceCertificate) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.keyvault.certificate\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.keyvaultService.certificate\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.keyvault.certificate\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.keyvaultService.certificate\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Tags accessor autogenerated -func (s *mqlAzureKeyvaultCertificate) Tags() (map[string]interface{}, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceCertificate) Tags() (map[string]interface{}, error) { res, ok := s.Cache.Load("tags") if !ok || !res.Valid { - return nil, errors.New("\"azure.keyvault.certificate\" failed: no value provided for static field \"tags\"") + return nil, errors.New("\"azure.subscription.keyvaultService.certificate\" failed: no value provided for static field \"tags\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(map[string]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.keyvault.certificate\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.keyvaultService.certificate\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) } return tres, nil } // X5t accessor autogenerated -func (s *mqlAzureKeyvaultCertificate) X5t() (string, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceCertificate) X5t() (string, error) { res, ok := s.Cache.Load("x5t") if !ok || !res.Valid { - return "", errors.New("\"azure.keyvault.certificate\" failed: no value provided for static field \"x5t\"") + return "", errors.New("\"azure.subscription.keyvaultService.certificate\" failed: no value provided for static field \"x5t\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.keyvault.certificate\" failed to cast field \"x5t\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.keyvaultService.certificate\" failed to cast field \"x5t\" to the right type (string): %#v", res) } return tres, nil } // Enabled accessor autogenerated -func (s *mqlAzureKeyvaultCertificate) Enabled() (bool, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceCertificate) Enabled() (bool, error) { res, ok := s.Cache.Load("enabled") if !ok || !res.Valid { - return false, errors.New("\"azure.keyvault.certificate\" failed: no value provided for static field \"enabled\"") + return false, errors.New("\"azure.subscription.keyvaultService.certificate\" failed: no value provided for static field \"enabled\"") } if res.Error != nil { return false, res.Error } tres, ok := res.Data.(bool) if !ok { - return false, fmt.Errorf("\"azure.keyvault.certificate\" failed to cast field \"enabled\" to the right type (bool): %#v", res) + return false, fmt.Errorf("\"azure.subscription.keyvaultService.certificate\" failed to cast field \"enabled\" to the right type (bool): %#v", res) } return tres, nil } // NotBefore accessor autogenerated -func (s *mqlAzureKeyvaultCertificate) NotBefore() (*time.Time, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceCertificate) NotBefore() (*time.Time, error) { res, ok := s.Cache.Load("notBefore") if !ok || !res.Valid { - return nil, errors.New("\"azure.keyvault.certificate\" failed: no value provided for static field \"notBefore\"") + return nil, errors.New("\"azure.subscription.keyvaultService.certificate\" failed: no value provided for static field \"notBefore\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(*time.Time) if !ok { - return nil, fmt.Errorf("\"azure.keyvault.certificate\" failed to cast field \"notBefore\" to the right type (*time.Time): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.keyvaultService.certificate\" failed to cast field \"notBefore\" to the right type (*time.Time): %#v", res) } return tres, nil } // Expires accessor autogenerated -func (s *mqlAzureKeyvaultCertificate) Expires() (*time.Time, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceCertificate) Expires() (*time.Time, error) { res, ok := s.Cache.Load("expires") if !ok || !res.Valid { - return nil, errors.New("\"azure.keyvault.certificate\" failed: no value provided for static field \"expires\"") + return nil, errors.New("\"azure.subscription.keyvaultService.certificate\" failed: no value provided for static field \"expires\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(*time.Time) if !ok { - return nil, fmt.Errorf("\"azure.keyvault.certificate\" failed to cast field \"expires\" to the right type (*time.Time): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.keyvaultService.certificate\" failed to cast field \"expires\" to the right type (*time.Time): %#v", res) } return tres, nil } // Created accessor autogenerated -func (s *mqlAzureKeyvaultCertificate) Created() (*time.Time, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceCertificate) Created() (*time.Time, error) { res, ok := s.Cache.Load("created") if !ok || !res.Valid { - return nil, errors.New("\"azure.keyvault.certificate\" failed: no value provided for static field \"created\"") + return nil, errors.New("\"azure.subscription.keyvaultService.certificate\" failed: no value provided for static field \"created\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(*time.Time) if !ok { - return nil, fmt.Errorf("\"azure.keyvault.certificate\" failed to cast field \"created\" to the right type (*time.Time): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.keyvaultService.certificate\" failed to cast field \"created\" to the right type (*time.Time): %#v", res) } return tres, nil } // Updated accessor autogenerated -func (s *mqlAzureKeyvaultCertificate) Updated() (*time.Time, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceCertificate) Updated() (*time.Time, error) { res, ok := s.Cache.Load("updated") if !ok || !res.Valid { - return nil, errors.New("\"azure.keyvault.certificate\" failed: no value provided for static field \"updated\"") + return nil, errors.New("\"azure.subscription.keyvaultService.certificate\" failed: no value provided for static field \"updated\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(*time.Time) if !ok { - return nil, fmt.Errorf("\"azure.keyvault.certificate\" failed to cast field \"updated\" to the right type (*time.Time): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.keyvaultService.certificate\" failed to cast field \"updated\" to the right type (*time.Time): %#v", res) } return tres, nil } // RecoveryLevel accessor autogenerated -func (s *mqlAzureKeyvaultCertificate) RecoveryLevel() (string, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceCertificate) RecoveryLevel() (string, error) { res, ok := s.Cache.Load("recoveryLevel") if !ok || !res.Valid { - return "", errors.New("\"azure.keyvault.certificate\" failed: no value provided for static field \"recoveryLevel\"") + return "", errors.New("\"azure.subscription.keyvaultService.certificate\" failed: no value provided for static field \"recoveryLevel\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.keyvault.certificate\" failed to cast field \"recoveryLevel\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.keyvaultService.certificate\" failed to cast field \"recoveryLevel\" to the right type (string): %#v", res) } return tres, nil } // CertName accessor autogenerated -func (s *mqlAzureKeyvaultCertificate) CertName() (string, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceCertificate) CertName() (string, error) { res, ok := s.Cache.Load("certName") if !ok || !res.Valid { if err := s.ComputeCertName(); err != nil { @@ -18000,7 +19359,7 @@ func (s *mqlAzureKeyvaultCertificate) CertName() (string, error) { } res, ok = s.Cache.Load("certName") if !ok { - return "", errors.New("\"azure.keyvault.certificate\" calculated \"certName\" but didn't find its value in cache.") + return "", errors.New("\"azure.subscription.keyvaultService.certificate\" calculated \"certName\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "certName") } @@ -18009,13 +19368,13 @@ func (s *mqlAzureKeyvaultCertificate) CertName() (string, error) { } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.keyvault.certificate\" failed to cast field \"certName\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.keyvaultService.certificate\" failed to cast field \"certName\" to the right type (string): %#v", res) } return tres, nil } // Version accessor autogenerated -func (s *mqlAzureKeyvaultCertificate) Version() (string, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceCertificate) Version() (string, error) { res, ok := s.Cache.Load("version") if !ok || !res.Valid { if err := s.ComputeVersion(); err != nil { @@ -18023,7 +19382,7 @@ func (s *mqlAzureKeyvaultCertificate) Version() (string, error) { } res, ok = s.Cache.Load("version") if !ok { - return "", errors.New("\"azure.keyvault.certificate\" calculated \"version\" but didn't find its value in cache.") + return "", errors.New("\"azure.subscription.keyvaultService.certificate\" calculated \"version\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "version") } @@ -18032,13 +19391,13 @@ func (s *mqlAzureKeyvaultCertificate) Version() (string, error) { } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.keyvault.certificate\" failed to cast field \"version\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.keyvaultService.certificate\" failed to cast field \"version\" to the right type (string): %#v", res) } return tres, nil } // Versions accessor autogenerated -func (s *mqlAzureKeyvaultCertificate) Versions() ([]interface{}, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceCertificate) Versions() ([]interface{}, error) { res, ok := s.Cache.Load("versions") if !ok || !res.Valid { if err := s.ComputeVersions(); err != nil { @@ -18046,7 +19405,7 @@ func (s *mqlAzureKeyvaultCertificate) Versions() ([]interface{}, error) { } res, ok = s.Cache.Load("versions") if !ok { - return nil, errors.New("\"azure.keyvault.certificate\" calculated \"versions\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.keyvaultService.certificate\" calculated \"versions\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "versions") } @@ -18055,14 +19414,14 @@ func (s *mqlAzureKeyvaultCertificate) Versions() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.keyvault.certificate\" failed to cast field \"versions\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.keyvaultService.certificate\" failed to cast field \"versions\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureKeyvaultCertificate) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.keyvault.certificate].MqlCompute") +func (s *mqlAzureSubscriptionKeyvaultServiceCertificate) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.keyvaultService.certificate].MqlCompute") switch name { case "id": return nil @@ -18089,12 +19448,12 @@ func (s *mqlAzureKeyvaultCertificate) MqlCompute(name string) error { case "versions": return s.ComputeVersions() default: - return errors.New("Cannot find field '" + name + "' in \"azure.keyvault.certificate\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.keyvaultService.certificate\" resource") } } // ComputeCertName computer autogenerated -func (s *mqlAzureKeyvaultCertificate) ComputeCertName() error { +func (s *mqlAzureSubscriptionKeyvaultServiceCertificate) ComputeCertName() error { var err error if _, ok := s.Cache.Load("certName"); ok { return nil @@ -18108,7 +19467,7 @@ func (s *mqlAzureKeyvaultCertificate) ComputeCertName() error { } // ComputeVersion computer autogenerated -func (s *mqlAzureKeyvaultCertificate) ComputeVersion() error { +func (s *mqlAzureSubscriptionKeyvaultServiceCertificate) ComputeVersion() error { var err error if _, ok := s.Cache.Load("version"); ok { return nil @@ -18122,7 +19481,7 @@ func (s *mqlAzureKeyvaultCertificate) ComputeVersion() error { } // ComputeVersions computer autogenerated -func (s *mqlAzureKeyvaultCertificate) ComputeVersions() error { +func (s *mqlAzureSubscriptionKeyvaultServiceCertificate) ComputeVersions() error { var err error if _, ok := s.Cache.Load("versions"); ok { return nil @@ -18135,8 +19494,8 @@ func (s *mqlAzureKeyvaultCertificate) ComputeVersions() error { return nil } -// AzureKeyvaultSecret resource interface -type AzureKeyvaultSecret interface { +// AzureSubscriptionKeyvaultServiceSecret resource interface +type AzureSubscriptionKeyvaultServiceSecret interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -18156,21 +19515,21 @@ type AzureKeyvaultSecret interface { Versions() ([]interface{}, error) } -// mqlAzureKeyvaultSecret for the azure.keyvault.secret resource -type mqlAzureKeyvaultSecret struct { +// mqlAzureSubscriptionKeyvaultServiceSecret for the azure.subscription.keyvaultService.secret resource +type mqlAzureSubscriptionKeyvaultServiceSecret struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureKeyvaultSecret) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionKeyvaultServiceSecret) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.keyvault.secret resource -func newAzureKeyvaultSecret(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.keyvaultService.secret resource +func newAzureSubscriptionKeyvaultServiceSecret(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureKeyvaultSecret{runtime.NewResource("azure.keyvault.secret")} + res := mqlAzureSubscriptionKeyvaultServiceSecret{runtime.NewResource("azure.subscription.keyvaultService.secret")} // assign all named fields var id string @@ -18184,60 +19543,60 @@ func newAzureKeyvaultSecret(runtime *resources.Runtime, args *resources.Args) (i switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.secret\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.secret\", its \"id\" argument has the wrong type (expected type \"string\")") } case "tags": if _, ok := val.(map[string]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.secret\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.secret\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") } case "contentType": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.secret\", its \"contentType\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.secret\", its \"contentType\" argument has the wrong type (expected type \"string\")") } case "managed": if _, ok := val.(bool); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.secret\", its \"managed\" argument has the wrong type (expected type \"bool\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.secret\", its \"managed\" argument has the wrong type (expected type \"bool\")") } case "enabled": if _, ok := val.(bool); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.secret\", its \"enabled\" argument has the wrong type (expected type \"bool\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.secret\", its \"enabled\" argument has the wrong type (expected type \"bool\")") } case "notBefore": if _, ok := val.(*time.Time); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.secret\", its \"notBefore\" argument has the wrong type (expected type \"*time.Time\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.secret\", its \"notBefore\" argument has the wrong type (expected type \"*time.Time\")") } case "expires": if _, ok := val.(*time.Time); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.secret\", its \"expires\" argument has the wrong type (expected type \"*time.Time\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.secret\", its \"expires\" argument has the wrong type (expected type \"*time.Time\")") } case "created": if _, ok := val.(*time.Time); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.secret\", its \"created\" argument has the wrong type (expected type \"*time.Time\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.secret\", its \"created\" argument has the wrong type (expected type \"*time.Time\")") } case "updated": if _, ok := val.(*time.Time); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.secret\", its \"updated\" argument has the wrong type (expected type \"*time.Time\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.secret\", its \"updated\" argument has the wrong type (expected type \"*time.Time\")") } case "secretName": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.secret\", its \"secretName\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.secret\", its \"secretName\" argument has the wrong type (expected type \"string\")") } case "version": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.secret\", its \"version\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.secret\", its \"version\" argument has the wrong type (expected type \"string\")") } case "versions": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.secret\", its \"versions\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.secret\", its \"versions\" argument has the wrong type (expected type \"[]interface{}\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.keyvault.secret\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.keyvaultService.secret\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.keyvault.secret with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.keyvaultService.secret with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -18255,42 +19614,42 @@ func newAzureKeyvaultSecret(runtime *resources.Runtime, args *resources.Args) (i return &res, nil } -func (s *mqlAzureKeyvaultSecret) Validate() error { +func (s *mqlAzureSubscriptionKeyvaultServiceSecret) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.keyvault.secret\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.keyvaultService.secret\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("tags"); !ok { - return errors.New("Initialized \"azure.keyvault.secret\" resource without a \"tags\". This field is required.") + return errors.New("Initialized \"azure.subscription.keyvaultService.secret\" resource without a \"tags\". This field is required.") } if _, ok := s.Cache.Load("contentType"); !ok { - return errors.New("Initialized \"azure.keyvault.secret\" resource without a \"contentType\". This field is required.") + return errors.New("Initialized \"azure.subscription.keyvaultService.secret\" resource without a \"contentType\". This field is required.") } if _, ok := s.Cache.Load("managed"); !ok { - return errors.New("Initialized \"azure.keyvault.secret\" resource without a \"managed\". This field is required.") + return errors.New("Initialized \"azure.subscription.keyvaultService.secret\" resource without a \"managed\". This field is required.") } if _, ok := s.Cache.Load("enabled"); !ok { - return errors.New("Initialized \"azure.keyvault.secret\" resource without a \"enabled\". This field is required.") + return errors.New("Initialized \"azure.subscription.keyvaultService.secret\" resource without a \"enabled\". This field is required.") } if _, ok := s.Cache.Load("notBefore"); !ok { - return errors.New("Initialized \"azure.keyvault.secret\" resource without a \"notBefore\". This field is required.") + return errors.New("Initialized \"azure.subscription.keyvaultService.secret\" resource without a \"notBefore\". This field is required.") } if _, ok := s.Cache.Load("expires"); !ok { - return errors.New("Initialized \"azure.keyvault.secret\" resource without a \"expires\". This field is required.") + return errors.New("Initialized \"azure.subscription.keyvaultService.secret\" resource without a \"expires\". This field is required.") } if _, ok := s.Cache.Load("created"); !ok { - return errors.New("Initialized \"azure.keyvault.secret\" resource without a \"created\". This field is required.") + return errors.New("Initialized \"azure.subscription.keyvaultService.secret\" resource without a \"created\". This field is required.") } if _, ok := s.Cache.Load("updated"); !ok { - return errors.New("Initialized \"azure.keyvault.secret\" resource without a \"updated\". This field is required.") + return errors.New("Initialized \"azure.subscription.keyvaultService.secret\" resource without a \"updated\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureKeyvaultSecret) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.keyvault.secret].Register") +func (s *mqlAzureSubscriptionKeyvaultServiceSecret) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.keyvaultService.secret].Register") switch name { case "id": return nil @@ -18317,13 +19676,13 @@ func (s *mqlAzureKeyvaultSecret) Register(name string) error { case "versions": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.keyvault.secret\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.keyvaultService.secret\" resource") } } // Field accessor autogenerated -func (s *mqlAzureKeyvaultSecret) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.keyvault.secret].Field") +func (s *mqlAzureSubscriptionKeyvaultServiceSecret) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.keyvaultService.secret].Field") switch name { case "id": return s.Id() @@ -18350,156 +19709,156 @@ func (s *mqlAzureKeyvaultSecret) Field(name string) (interface{}, error) { case "versions": return s.Versions() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.keyvault.secret\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.keyvaultService.secret\" resource") } } // Id accessor autogenerated -func (s *mqlAzureKeyvaultSecret) Id() (string, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceSecret) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.keyvault.secret\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.keyvaultService.secret\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.keyvault.secret\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.keyvaultService.secret\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Tags accessor autogenerated -func (s *mqlAzureKeyvaultSecret) Tags() (map[string]interface{}, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceSecret) Tags() (map[string]interface{}, error) { res, ok := s.Cache.Load("tags") if !ok || !res.Valid { - return nil, errors.New("\"azure.keyvault.secret\" failed: no value provided for static field \"tags\"") + return nil, errors.New("\"azure.subscription.keyvaultService.secret\" failed: no value provided for static field \"tags\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(map[string]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.keyvault.secret\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.keyvaultService.secret\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) } return tres, nil } // ContentType accessor autogenerated -func (s *mqlAzureKeyvaultSecret) ContentType() (string, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceSecret) ContentType() (string, error) { res, ok := s.Cache.Load("contentType") if !ok || !res.Valid { - return "", errors.New("\"azure.keyvault.secret\" failed: no value provided for static field \"contentType\"") + return "", errors.New("\"azure.subscription.keyvaultService.secret\" failed: no value provided for static field \"contentType\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.keyvault.secret\" failed to cast field \"contentType\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.keyvaultService.secret\" failed to cast field \"contentType\" to the right type (string): %#v", res) } return tres, nil } // Managed accessor autogenerated -func (s *mqlAzureKeyvaultSecret) Managed() (bool, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceSecret) Managed() (bool, error) { res, ok := s.Cache.Load("managed") if !ok || !res.Valid { - return false, errors.New("\"azure.keyvault.secret\" failed: no value provided for static field \"managed\"") + return false, errors.New("\"azure.subscription.keyvaultService.secret\" failed: no value provided for static field \"managed\"") } if res.Error != nil { return false, res.Error } tres, ok := res.Data.(bool) if !ok { - return false, fmt.Errorf("\"azure.keyvault.secret\" failed to cast field \"managed\" to the right type (bool): %#v", res) + return false, fmt.Errorf("\"azure.subscription.keyvaultService.secret\" failed to cast field \"managed\" to the right type (bool): %#v", res) } return tres, nil } // Enabled accessor autogenerated -func (s *mqlAzureKeyvaultSecret) Enabled() (bool, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceSecret) Enabled() (bool, error) { res, ok := s.Cache.Load("enabled") if !ok || !res.Valid { - return false, errors.New("\"azure.keyvault.secret\" failed: no value provided for static field \"enabled\"") + return false, errors.New("\"azure.subscription.keyvaultService.secret\" failed: no value provided for static field \"enabled\"") } if res.Error != nil { return false, res.Error } tres, ok := res.Data.(bool) if !ok { - return false, fmt.Errorf("\"azure.keyvault.secret\" failed to cast field \"enabled\" to the right type (bool): %#v", res) + return false, fmt.Errorf("\"azure.subscription.keyvaultService.secret\" failed to cast field \"enabled\" to the right type (bool): %#v", res) } return tres, nil } // NotBefore accessor autogenerated -func (s *mqlAzureKeyvaultSecret) NotBefore() (*time.Time, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceSecret) NotBefore() (*time.Time, error) { res, ok := s.Cache.Load("notBefore") if !ok || !res.Valid { - return nil, errors.New("\"azure.keyvault.secret\" failed: no value provided for static field \"notBefore\"") + return nil, errors.New("\"azure.subscription.keyvaultService.secret\" failed: no value provided for static field \"notBefore\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(*time.Time) if !ok { - return nil, fmt.Errorf("\"azure.keyvault.secret\" failed to cast field \"notBefore\" to the right type (*time.Time): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.keyvaultService.secret\" failed to cast field \"notBefore\" to the right type (*time.Time): %#v", res) } return tres, nil } // Expires accessor autogenerated -func (s *mqlAzureKeyvaultSecret) Expires() (*time.Time, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceSecret) Expires() (*time.Time, error) { res, ok := s.Cache.Load("expires") if !ok || !res.Valid { - return nil, errors.New("\"azure.keyvault.secret\" failed: no value provided for static field \"expires\"") + return nil, errors.New("\"azure.subscription.keyvaultService.secret\" failed: no value provided for static field \"expires\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(*time.Time) if !ok { - return nil, fmt.Errorf("\"azure.keyvault.secret\" failed to cast field \"expires\" to the right type (*time.Time): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.keyvaultService.secret\" failed to cast field \"expires\" to the right type (*time.Time): %#v", res) } return tres, nil } // Created accessor autogenerated -func (s *mqlAzureKeyvaultSecret) Created() (*time.Time, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceSecret) Created() (*time.Time, error) { res, ok := s.Cache.Load("created") if !ok || !res.Valid { - return nil, errors.New("\"azure.keyvault.secret\" failed: no value provided for static field \"created\"") + return nil, errors.New("\"azure.subscription.keyvaultService.secret\" failed: no value provided for static field \"created\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(*time.Time) if !ok { - return nil, fmt.Errorf("\"azure.keyvault.secret\" failed to cast field \"created\" to the right type (*time.Time): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.keyvaultService.secret\" failed to cast field \"created\" to the right type (*time.Time): %#v", res) } return tres, nil } // Updated accessor autogenerated -func (s *mqlAzureKeyvaultSecret) Updated() (*time.Time, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceSecret) Updated() (*time.Time, error) { res, ok := s.Cache.Load("updated") if !ok || !res.Valid { - return nil, errors.New("\"azure.keyvault.secret\" failed: no value provided for static field \"updated\"") + return nil, errors.New("\"azure.subscription.keyvaultService.secret\" failed: no value provided for static field \"updated\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(*time.Time) if !ok { - return nil, fmt.Errorf("\"azure.keyvault.secret\" failed to cast field \"updated\" to the right type (*time.Time): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.keyvaultService.secret\" failed to cast field \"updated\" to the right type (*time.Time): %#v", res) } return tres, nil } // SecretName accessor autogenerated -func (s *mqlAzureKeyvaultSecret) SecretName() (string, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceSecret) SecretName() (string, error) { res, ok := s.Cache.Load("secretName") if !ok || !res.Valid { if err := s.ComputeSecretName(); err != nil { @@ -18507,7 +19866,7 @@ func (s *mqlAzureKeyvaultSecret) SecretName() (string, error) { } res, ok = s.Cache.Load("secretName") if !ok { - return "", errors.New("\"azure.keyvault.secret\" calculated \"secretName\" but didn't find its value in cache.") + return "", errors.New("\"azure.subscription.keyvaultService.secret\" calculated \"secretName\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "secretName") } @@ -18516,13 +19875,13 @@ func (s *mqlAzureKeyvaultSecret) SecretName() (string, error) { } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.keyvault.secret\" failed to cast field \"secretName\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.keyvaultService.secret\" failed to cast field \"secretName\" to the right type (string): %#v", res) } return tres, nil } // Version accessor autogenerated -func (s *mqlAzureKeyvaultSecret) Version() (string, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceSecret) Version() (string, error) { res, ok := s.Cache.Load("version") if !ok || !res.Valid { if err := s.ComputeVersion(); err != nil { @@ -18530,7 +19889,7 @@ func (s *mqlAzureKeyvaultSecret) Version() (string, error) { } res, ok = s.Cache.Load("version") if !ok { - return "", errors.New("\"azure.keyvault.secret\" calculated \"version\" but didn't find its value in cache.") + return "", errors.New("\"azure.subscription.keyvaultService.secret\" calculated \"version\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "version") } @@ -18539,13 +19898,13 @@ func (s *mqlAzureKeyvaultSecret) Version() (string, error) { } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.keyvault.secret\" failed to cast field \"version\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.keyvaultService.secret\" failed to cast field \"version\" to the right type (string): %#v", res) } return tres, nil } // Versions accessor autogenerated -func (s *mqlAzureKeyvaultSecret) Versions() ([]interface{}, error) { +func (s *mqlAzureSubscriptionKeyvaultServiceSecret) Versions() ([]interface{}, error) { res, ok := s.Cache.Load("versions") if !ok || !res.Valid { if err := s.ComputeVersions(); err != nil { @@ -18553,7 +19912,7 @@ func (s *mqlAzureKeyvaultSecret) Versions() ([]interface{}, error) { } res, ok = s.Cache.Load("versions") if !ok { - return nil, errors.New("\"azure.keyvault.secret\" calculated \"versions\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.keyvaultService.secret\" calculated \"versions\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "versions") } @@ -18562,14 +19921,14 @@ func (s *mqlAzureKeyvaultSecret) Versions() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.keyvault.secret\" failed to cast field \"versions\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.keyvaultService.secret\" failed to cast field \"versions\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureKeyvaultSecret) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.keyvault.secret].MqlCompute") +func (s *mqlAzureSubscriptionKeyvaultServiceSecret) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.keyvaultService.secret].MqlCompute") switch name { case "id": return nil @@ -18596,12 +19955,12 @@ func (s *mqlAzureKeyvaultSecret) MqlCompute(name string) error { case "versions": return s.ComputeVersions() default: - return errors.New("Cannot find field '" + name + "' in \"azure.keyvault.secret\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.keyvaultService.secret\" resource") } } // ComputeSecretName computer autogenerated -func (s *mqlAzureKeyvaultSecret) ComputeSecretName() error { +func (s *mqlAzureSubscriptionKeyvaultServiceSecret) ComputeSecretName() error { var err error if _, ok := s.Cache.Load("secretName"); ok { return nil @@ -18615,7 +19974,7 @@ func (s *mqlAzureKeyvaultSecret) ComputeSecretName() error { } // ComputeVersion computer autogenerated -func (s *mqlAzureKeyvaultSecret) ComputeVersion() error { +func (s *mqlAzureSubscriptionKeyvaultServiceSecret) ComputeVersion() error { var err error if _, ok := s.Cache.Load("version"); ok { return nil @@ -18629,7 +19988,7 @@ func (s *mqlAzureKeyvaultSecret) ComputeVersion() error { } // ComputeVersions computer autogenerated -func (s *mqlAzureKeyvaultSecret) ComputeVersions() error { +func (s *mqlAzureSubscriptionKeyvaultServiceSecret) ComputeVersions() error { var err error if _, ok := s.Cache.Load("versions"); ok { return nil @@ -18642,33 +20001,43 @@ func (s *mqlAzureKeyvaultSecret) ComputeVersions() error { return nil } -// AzureMonitor resource interface -type AzureMonitor interface { +// AzureSubscriptionMonitorService resource interface +type AzureSubscriptionMonitorService interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) Register(string) error Validate() error + SubscriptionId() (string, error) LogProfiles() ([]interface{}, error) DiagnosticSettings() ([]interface{}, error) - ActivityLog() (AzureMonitorActivitylog, error) + ActivityLog() (AzureSubscriptionMonitorServiceActivitylog, error) } -// mqlAzureMonitor for the azure.monitor resource -type mqlAzureMonitor struct { +// mqlAzureSubscriptionMonitorService for the azure.subscription.monitorService resource +type mqlAzureSubscriptionMonitorService struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureMonitor) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionMonitorService) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.monitor resource -func newAzureMonitor(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.monitorService resource +func newAzureSubscriptionMonitorService(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureMonitor{runtime.NewResource("azure.monitor")} + res := mqlAzureSubscriptionMonitorService{runtime.NewResource("azure.subscription.monitorService")} + var existing AzureSubscriptionMonitorService + args, existing, err = res.init(args) + if err != nil { + return nil, err + } + if existing != nil { + return existing, nil + } + // assign all named fields var id string @@ -18680,26 +20049,30 @@ func newAzureMonitor(runtime *resources.Runtime, args *resources.Args) (interfac } switch name { + case "subscriptionId": + if _, ok := val.(string); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription.monitorService\", its \"subscriptionId\" argument has the wrong type (expected type \"string\")") + } case "logProfiles": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.monitor\", its \"logProfiles\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.monitorService\", its \"logProfiles\" argument has the wrong type (expected type \"[]interface{}\")") } case "diagnosticSettings": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.monitor\", its \"diagnosticSettings\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.monitorService\", its \"diagnosticSettings\" argument has the wrong type (expected type \"[]interface{}\")") } case "activityLog": - if _, ok := val.(AzureMonitorActivitylog); !ok { - return nil, errors.New("Failed to initialize \"azure.monitor\", its \"activityLog\" argument has the wrong type (expected type \"AzureMonitorActivitylog\")") + if _, ok := val.(AzureSubscriptionMonitorServiceActivitylog); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription.monitorService\", its \"activityLog\" argument has the wrong type (expected type \"AzureSubscriptionMonitorServiceActivitylog\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.monitor\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.monitorService\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.monitor with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.monitorService with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -18717,17 +20090,21 @@ func newAzureMonitor(runtime *resources.Runtime, args *resources.Args) (interfac return &res, nil } -func (s *mqlAzureMonitor) Validate() error { +func (s *mqlAzureSubscriptionMonitorService) Validate() error { // required arguments - // no required fields found + if _, ok := s.Cache.Load("subscriptionId"); !ok { + return errors.New("Initialized \"azure.subscription.monitorService\" resource without a \"subscriptionId\". This field is required.") + } return nil } // Register accessor autogenerated -func (s *mqlAzureMonitor) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.monitor].Register") +func (s *mqlAzureSubscriptionMonitorService) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.monitorService].Register") switch name { + case "subscriptionId": + return nil case "logProfiles": return nil case "diagnosticSettings": @@ -18735,14 +20112,16 @@ func (s *mqlAzureMonitor) Register(name string) error { case "activityLog": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.monitor\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.monitorService\" resource") } } // Field accessor autogenerated -func (s *mqlAzureMonitor) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.monitor].Field") +func (s *mqlAzureSubscriptionMonitorService) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.monitorService].Field") switch name { + case "subscriptionId": + return s.SubscriptionId() case "logProfiles": return s.LogProfiles() case "diagnosticSettings": @@ -18750,12 +20129,28 @@ func (s *mqlAzureMonitor) Field(name string) (interface{}, error) { case "activityLog": return s.ActivityLog() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.monitor\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.monitorService\" resource") + } +} + +// SubscriptionId accessor autogenerated +func (s *mqlAzureSubscriptionMonitorService) SubscriptionId() (string, error) { + res, ok := s.Cache.Load("subscriptionId") + if !ok || !res.Valid { + return "", errors.New("\"azure.subscription.monitorService\" failed: no value provided for static field \"subscriptionId\"") + } + if res.Error != nil { + return "", res.Error + } + tres, ok := res.Data.(string) + if !ok { + return "", fmt.Errorf("\"azure.subscription.monitorService\" failed to cast field \"subscriptionId\" to the right type (string): %#v", res) } + return tres, nil } // LogProfiles accessor autogenerated -func (s *mqlAzureMonitor) LogProfiles() ([]interface{}, error) { +func (s *mqlAzureSubscriptionMonitorService) LogProfiles() ([]interface{}, error) { res, ok := s.Cache.Load("logProfiles") if !ok || !res.Valid { if err := s.ComputeLogProfiles(); err != nil { @@ -18763,7 +20158,7 @@ func (s *mqlAzureMonitor) LogProfiles() ([]interface{}, error) { } res, ok = s.Cache.Load("logProfiles") if !ok { - return nil, errors.New("\"azure.monitor\" calculated \"logProfiles\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.monitorService\" calculated \"logProfiles\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "logProfiles") } @@ -18772,13 +20167,13 @@ func (s *mqlAzureMonitor) LogProfiles() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.monitor\" failed to cast field \"logProfiles\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.monitorService\" failed to cast field \"logProfiles\" to the right type ([]interface{}): %#v", res) } return tres, nil } // DiagnosticSettings accessor autogenerated -func (s *mqlAzureMonitor) DiagnosticSettings() ([]interface{}, error) { +func (s *mqlAzureSubscriptionMonitorService) DiagnosticSettings() ([]interface{}, error) { res, ok := s.Cache.Load("diagnosticSettings") if !ok || !res.Valid { if err := s.ComputeDiagnosticSettings(); err != nil { @@ -18786,7 +20181,7 @@ func (s *mqlAzureMonitor) DiagnosticSettings() ([]interface{}, error) { } res, ok = s.Cache.Load("diagnosticSettings") if !ok { - return nil, errors.New("\"azure.monitor\" calculated \"diagnosticSettings\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.monitorService\" calculated \"diagnosticSettings\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "diagnosticSettings") } @@ -18795,13 +20190,13 @@ func (s *mqlAzureMonitor) DiagnosticSettings() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.monitor\" failed to cast field \"diagnosticSettings\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.monitorService\" failed to cast field \"diagnosticSettings\" to the right type ([]interface{}): %#v", res) } return tres, nil } // ActivityLog accessor autogenerated -func (s *mqlAzureMonitor) ActivityLog() (AzureMonitorActivitylog, error) { +func (s *mqlAzureSubscriptionMonitorService) ActivityLog() (AzureSubscriptionMonitorServiceActivitylog, error) { res, ok := s.Cache.Load("activityLog") if !ok || !res.Valid { if err := s.ComputeActivityLog(); err != nil { @@ -18809,24 +20204,26 @@ func (s *mqlAzureMonitor) ActivityLog() (AzureMonitorActivitylog, error) { } res, ok = s.Cache.Load("activityLog") if !ok { - return nil, errors.New("\"azure.monitor\" calculated \"activityLog\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.monitorService\" calculated \"activityLog\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "activityLog") } if res.Error != nil { return nil, res.Error } - tres, ok := res.Data.(AzureMonitorActivitylog) + tres, ok := res.Data.(AzureSubscriptionMonitorServiceActivitylog) if !ok { - return nil, fmt.Errorf("\"azure.monitor\" failed to cast field \"activityLog\" to the right type (AzureMonitorActivitylog): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.monitorService\" failed to cast field \"activityLog\" to the right type (AzureSubscriptionMonitorServiceActivitylog): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureMonitor) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.monitor].MqlCompute") +func (s *mqlAzureSubscriptionMonitorService) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.monitorService].MqlCompute") switch name { + case "subscriptionId": + return nil case "logProfiles": return s.ComputeLogProfiles() case "diagnosticSettings": @@ -18834,12 +20231,12 @@ func (s *mqlAzureMonitor) MqlCompute(name string) error { case "activityLog": return s.ComputeActivityLog() default: - return errors.New("Cannot find field '" + name + "' in \"azure.monitor\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.monitorService\" resource") } } // ComputeLogProfiles computer autogenerated -func (s *mqlAzureMonitor) ComputeLogProfiles() error { +func (s *mqlAzureSubscriptionMonitorService) ComputeLogProfiles() error { var err error if _, ok := s.Cache.Load("logProfiles"); ok { return nil @@ -18853,7 +20250,7 @@ func (s *mqlAzureMonitor) ComputeLogProfiles() error { } // ComputeDiagnosticSettings computer autogenerated -func (s *mqlAzureMonitor) ComputeDiagnosticSettings() error { +func (s *mqlAzureSubscriptionMonitorService) ComputeDiagnosticSettings() error { var err error if _, ok := s.Cache.Load("diagnosticSettings"); ok { return nil @@ -18867,7 +20264,7 @@ func (s *mqlAzureMonitor) ComputeDiagnosticSettings() error { } // ComputeActivityLog computer autogenerated -func (s *mqlAzureMonitor) ComputeActivityLog() error { +func (s *mqlAzureSubscriptionMonitorService) ComputeActivityLog() error { var err error if _, ok := s.Cache.Load("activityLog"); ok { return nil @@ -18880,8 +20277,8 @@ func (s *mqlAzureMonitor) ComputeActivityLog() error { return nil } -// AzureMonitorActivitylog resource interface -type AzureMonitorActivitylog interface { +// AzureSubscriptionMonitorServiceActivitylog resource interface +type AzureSubscriptionMonitorServiceActivitylog interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -18890,21 +20287,21 @@ type AzureMonitorActivitylog interface { Alerts() ([]interface{}, error) } -// mqlAzureMonitorActivitylog for the azure.monitor.activitylog resource -type mqlAzureMonitorActivitylog struct { +// mqlAzureSubscriptionMonitorServiceActivitylog for the azure.subscription.monitorService.activitylog resource +type mqlAzureSubscriptionMonitorServiceActivitylog struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureMonitorActivitylog) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionMonitorServiceActivitylog) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.monitor.activitylog resource -func newAzureMonitorActivitylog(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.monitorService.activitylog resource +func newAzureSubscriptionMonitorServiceActivitylog(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureMonitorActivitylog{runtime.NewResource("azure.monitor.activitylog")} + res := mqlAzureSubscriptionMonitorServiceActivitylog{runtime.NewResource("azure.subscription.monitorService.activitylog")} // assign all named fields var id string @@ -18918,16 +20315,16 @@ func newAzureMonitorActivitylog(runtime *resources.Runtime, args *resources.Args switch name { case "alerts": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.monitor.activitylog\", its \"alerts\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.monitorService.activitylog\", its \"alerts\" argument has the wrong type (expected type \"[]interface{}\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.monitor.activitylog\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.monitorService.activitylog\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.monitor.activitylog with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.monitorService.activitylog with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -18945,7 +20342,7 @@ func newAzureMonitorActivitylog(runtime *resources.Runtime, args *resources.Args return &res, nil } -func (s *mqlAzureMonitorActivitylog) Validate() error { +func (s *mqlAzureSubscriptionMonitorServiceActivitylog) Validate() error { // required arguments // no required fields found @@ -18953,29 +20350,29 @@ func (s *mqlAzureMonitorActivitylog) Validate() error { } // Register accessor autogenerated -func (s *mqlAzureMonitorActivitylog) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.monitor.activitylog].Register") +func (s *mqlAzureSubscriptionMonitorServiceActivitylog) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.monitorService.activitylog].Register") switch name { case "alerts": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.monitor.activitylog\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.monitorService.activitylog\" resource") } } // Field accessor autogenerated -func (s *mqlAzureMonitorActivitylog) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.monitor.activitylog].Field") +func (s *mqlAzureSubscriptionMonitorServiceActivitylog) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.monitorService.activitylog].Field") switch name { case "alerts": return s.Alerts() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.monitor.activitylog\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.monitorService.activitylog\" resource") } } // Alerts accessor autogenerated -func (s *mqlAzureMonitorActivitylog) Alerts() ([]interface{}, error) { +func (s *mqlAzureSubscriptionMonitorServiceActivitylog) Alerts() ([]interface{}, error) { res, ok := s.Cache.Load("alerts") if !ok || !res.Valid { if err := s.ComputeAlerts(); err != nil { @@ -18983,7 +20380,7 @@ func (s *mqlAzureMonitorActivitylog) Alerts() ([]interface{}, error) { } res, ok = s.Cache.Load("alerts") if !ok { - return nil, errors.New("\"azure.monitor.activitylog\" calculated \"alerts\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.monitorService.activitylog\" calculated \"alerts\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "alerts") } @@ -18992,24 +20389,24 @@ func (s *mqlAzureMonitorActivitylog) Alerts() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.monitor.activitylog\" failed to cast field \"alerts\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.monitorService.activitylog\" failed to cast field \"alerts\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureMonitorActivitylog) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.monitor.activitylog].MqlCompute") +func (s *mqlAzureSubscriptionMonitorServiceActivitylog) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.monitorService.activitylog].MqlCompute") switch name { case "alerts": return s.ComputeAlerts() default: - return errors.New("Cannot find field '" + name + "' in \"azure.monitor.activitylog\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.monitorService.activitylog\" resource") } } // ComputeAlerts computer autogenerated -func (s *mqlAzureMonitorActivitylog) ComputeAlerts() error { +func (s *mqlAzureSubscriptionMonitorServiceActivitylog) ComputeAlerts() error { var err error if _, ok := s.Cache.Load("alerts"); ok { return nil @@ -19022,8 +20419,8 @@ func (s *mqlAzureMonitorActivitylog) ComputeAlerts() error { return nil } -// AzureMonitorActivitylogAlert resource interface -type AzureMonitorActivitylogAlert interface { +// AzureSubscriptionMonitorServiceActivitylogAlert resource interface +type AzureSubscriptionMonitorServiceActivitylogAlert interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -19040,21 +20437,21 @@ type AzureMonitorActivitylogAlert interface { Scopes() ([]interface{}, error) } -// mqlAzureMonitorActivitylogAlert for the azure.monitor.activitylog.alert resource -type mqlAzureMonitorActivitylogAlert struct { +// mqlAzureSubscriptionMonitorServiceActivitylogAlert for the azure.subscription.monitorService.activitylog.alert resource +type mqlAzureSubscriptionMonitorServiceActivitylogAlert struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureMonitorActivitylogAlert) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionMonitorServiceActivitylogAlert) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.monitor.activitylog.alert resource -func newAzureMonitorActivitylogAlert(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.monitorService.activitylog.alert resource +func newAzureSubscriptionMonitorServiceActivitylogAlert(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureMonitorActivitylogAlert{runtime.NewResource("azure.monitor.activitylog.alert")} + res := mqlAzureSubscriptionMonitorServiceActivitylogAlert{runtime.NewResource("azure.subscription.monitorService.activitylog.alert")} // assign all named fields var id string @@ -19068,48 +20465,48 @@ func newAzureMonitorActivitylogAlert(runtime *resources.Runtime, args *resources switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.monitor.activitylog.alert\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.monitorService.activitylog.alert\", its \"id\" argument has the wrong type (expected type \"string\")") } case "type": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.monitor.activitylog.alert\", its \"type\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.monitorService.activitylog.alert\", its \"type\" argument has the wrong type (expected type \"string\")") } case "name": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.monitor.activitylog.alert\", its \"name\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.monitorService.activitylog.alert\", its \"name\" argument has the wrong type (expected type \"string\")") } case "description": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.monitor.activitylog.alert\", its \"description\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.monitorService.activitylog.alert\", its \"description\" argument has the wrong type (expected type \"string\")") } case "conditions": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.monitor.activitylog.alert\", its \"conditions\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.monitorService.activitylog.alert\", its \"conditions\" argument has the wrong type (expected type \"[]interface{}\")") } case "location": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.monitor.activitylog.alert\", its \"location\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.monitorService.activitylog.alert\", its \"location\" argument has the wrong type (expected type \"string\")") } case "tags": if _, ok := val.(map[string]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.monitor.activitylog.alert\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.monitorService.activitylog.alert\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") } case "actions": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.monitor.activitylog.alert\", its \"actions\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.monitorService.activitylog.alert\", its \"actions\" argument has the wrong type (expected type \"[]interface{}\")") } case "scopes": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.monitor.activitylog.alert\", its \"scopes\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.monitorService.activitylog.alert\", its \"scopes\" argument has the wrong type (expected type \"[]interface{}\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.monitor.activitylog.alert\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.monitorService.activitylog.alert\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.monitor.activitylog.alert with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.monitorService.activitylog.alert with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -19127,42 +20524,42 @@ func newAzureMonitorActivitylogAlert(runtime *resources.Runtime, args *resources return &res, nil } -func (s *mqlAzureMonitorActivitylogAlert) Validate() error { +func (s *mqlAzureSubscriptionMonitorServiceActivitylogAlert) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.monitor.activitylog.alert\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.monitorService.activitylog.alert\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("type"); !ok { - return errors.New("Initialized \"azure.monitor.activitylog.alert\" resource without a \"type\". This field is required.") + return errors.New("Initialized \"azure.subscription.monitorService.activitylog.alert\" resource without a \"type\". This field is required.") } if _, ok := s.Cache.Load("name"); !ok { - return errors.New("Initialized \"azure.monitor.activitylog.alert\" resource without a \"name\". This field is required.") + return errors.New("Initialized \"azure.subscription.monitorService.activitylog.alert\" resource without a \"name\". This field is required.") } if _, ok := s.Cache.Load("description"); !ok { - return errors.New("Initialized \"azure.monitor.activitylog.alert\" resource without a \"description\". This field is required.") + return errors.New("Initialized \"azure.subscription.monitorService.activitylog.alert\" resource without a \"description\". This field is required.") } if _, ok := s.Cache.Load("conditions"); !ok { - return errors.New("Initialized \"azure.monitor.activitylog.alert\" resource without a \"conditions\". This field is required.") + return errors.New("Initialized \"azure.subscription.monitorService.activitylog.alert\" resource without a \"conditions\". This field is required.") } if _, ok := s.Cache.Load("location"); !ok { - return errors.New("Initialized \"azure.monitor.activitylog.alert\" resource without a \"location\". This field is required.") + return errors.New("Initialized \"azure.subscription.monitorService.activitylog.alert\" resource without a \"location\". This field is required.") } if _, ok := s.Cache.Load("tags"); !ok { - return errors.New("Initialized \"azure.monitor.activitylog.alert\" resource without a \"tags\". This field is required.") + return errors.New("Initialized \"azure.subscription.monitorService.activitylog.alert\" resource without a \"tags\". This field is required.") } if _, ok := s.Cache.Load("actions"); !ok { - return errors.New("Initialized \"azure.monitor.activitylog.alert\" resource without a \"actions\". This field is required.") + return errors.New("Initialized \"azure.subscription.monitorService.activitylog.alert\" resource without a \"actions\". This field is required.") } if _, ok := s.Cache.Load("scopes"); !ok { - return errors.New("Initialized \"azure.monitor.activitylog.alert\" resource without a \"scopes\". This field is required.") + return errors.New("Initialized \"azure.subscription.monitorService.activitylog.alert\" resource without a \"scopes\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureMonitorActivitylogAlert) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.monitor.activitylog.alert].Register") +func (s *mqlAzureSubscriptionMonitorServiceActivitylogAlert) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.monitorService.activitylog.alert].Register") switch name { case "id": return nil @@ -19183,13 +20580,13 @@ func (s *mqlAzureMonitorActivitylogAlert) Register(name string) error { case "scopes": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.monitor.activitylog.alert\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.monitorService.activitylog.alert\" resource") } } // Field accessor autogenerated -func (s *mqlAzureMonitorActivitylogAlert) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.monitor.activitylog.alert].Field") +func (s *mqlAzureSubscriptionMonitorServiceActivitylogAlert) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.monitorService.activitylog.alert].Field") switch name { case "id": return s.Id() @@ -19210,157 +20607,157 @@ func (s *mqlAzureMonitorActivitylogAlert) Field(name string) (interface{}, error case "scopes": return s.Scopes() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.monitor.activitylog.alert\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.monitorService.activitylog.alert\" resource") } } // Id accessor autogenerated -func (s *mqlAzureMonitorActivitylogAlert) Id() (string, error) { +func (s *mqlAzureSubscriptionMonitorServiceActivitylogAlert) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.monitor.activitylog.alert\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.monitorService.activitylog.alert\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.monitor.activitylog.alert\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.monitorService.activitylog.alert\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Type accessor autogenerated -func (s *mqlAzureMonitorActivitylogAlert) Type() (string, error) { +func (s *mqlAzureSubscriptionMonitorServiceActivitylogAlert) Type() (string, error) { res, ok := s.Cache.Load("type") if !ok || !res.Valid { - return "", errors.New("\"azure.monitor.activitylog.alert\" failed: no value provided for static field \"type\"") + return "", errors.New("\"azure.subscription.monitorService.activitylog.alert\" failed: no value provided for static field \"type\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.monitor.activitylog.alert\" failed to cast field \"type\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.monitorService.activitylog.alert\" failed to cast field \"type\" to the right type (string): %#v", res) } return tres, nil } // Name accessor autogenerated -func (s *mqlAzureMonitorActivitylogAlert) Name() (string, error) { +func (s *mqlAzureSubscriptionMonitorServiceActivitylogAlert) Name() (string, error) { res, ok := s.Cache.Load("name") if !ok || !res.Valid { - return "", errors.New("\"azure.monitor.activitylog.alert\" failed: no value provided for static field \"name\"") + return "", errors.New("\"azure.subscription.monitorService.activitylog.alert\" failed: no value provided for static field \"name\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.monitor.activitylog.alert\" failed to cast field \"name\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.monitorService.activitylog.alert\" failed to cast field \"name\" to the right type (string): %#v", res) } return tres, nil } // Description accessor autogenerated -func (s *mqlAzureMonitorActivitylogAlert) Description() (string, error) { +func (s *mqlAzureSubscriptionMonitorServiceActivitylogAlert) Description() (string, error) { res, ok := s.Cache.Load("description") if !ok || !res.Valid { - return "", errors.New("\"azure.monitor.activitylog.alert\" failed: no value provided for static field \"description\"") + return "", errors.New("\"azure.subscription.monitorService.activitylog.alert\" failed: no value provided for static field \"description\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.monitor.activitylog.alert\" failed to cast field \"description\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.monitorService.activitylog.alert\" failed to cast field \"description\" to the right type (string): %#v", res) } return tres, nil } // Conditions accessor autogenerated -func (s *mqlAzureMonitorActivitylogAlert) Conditions() ([]interface{}, error) { +func (s *mqlAzureSubscriptionMonitorServiceActivitylogAlert) Conditions() ([]interface{}, error) { res, ok := s.Cache.Load("conditions") if !ok || !res.Valid { - return nil, errors.New("\"azure.monitor.activitylog.alert\" failed: no value provided for static field \"conditions\"") + return nil, errors.New("\"azure.subscription.monitorService.activitylog.alert\" failed: no value provided for static field \"conditions\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.monitor.activitylog.alert\" failed to cast field \"conditions\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.monitorService.activitylog.alert\" failed to cast field \"conditions\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Location accessor autogenerated -func (s *mqlAzureMonitorActivitylogAlert) Location() (string, error) { +func (s *mqlAzureSubscriptionMonitorServiceActivitylogAlert) Location() (string, error) { res, ok := s.Cache.Load("location") if !ok || !res.Valid { - return "", errors.New("\"azure.monitor.activitylog.alert\" failed: no value provided for static field \"location\"") + return "", errors.New("\"azure.subscription.monitorService.activitylog.alert\" failed: no value provided for static field \"location\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.monitor.activitylog.alert\" failed to cast field \"location\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.monitorService.activitylog.alert\" failed to cast field \"location\" to the right type (string): %#v", res) } return tres, nil } // Tags accessor autogenerated -func (s *mqlAzureMonitorActivitylogAlert) Tags() (map[string]interface{}, error) { +func (s *mqlAzureSubscriptionMonitorServiceActivitylogAlert) Tags() (map[string]interface{}, error) { res, ok := s.Cache.Load("tags") if !ok || !res.Valid { - return nil, errors.New("\"azure.monitor.activitylog.alert\" failed: no value provided for static field \"tags\"") + return nil, errors.New("\"azure.subscription.monitorService.activitylog.alert\" failed: no value provided for static field \"tags\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(map[string]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.monitor.activitylog.alert\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.monitorService.activitylog.alert\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) } return tres, nil } // Actions accessor autogenerated -func (s *mqlAzureMonitorActivitylogAlert) Actions() ([]interface{}, error) { +func (s *mqlAzureSubscriptionMonitorServiceActivitylogAlert) Actions() ([]interface{}, error) { res, ok := s.Cache.Load("actions") if !ok || !res.Valid { - return nil, errors.New("\"azure.monitor.activitylog.alert\" failed: no value provided for static field \"actions\"") + return nil, errors.New("\"azure.subscription.monitorService.activitylog.alert\" failed: no value provided for static field \"actions\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.monitor.activitylog.alert\" failed to cast field \"actions\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.monitorService.activitylog.alert\" failed to cast field \"actions\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Scopes accessor autogenerated -func (s *mqlAzureMonitorActivitylogAlert) Scopes() ([]interface{}, error) { +func (s *mqlAzureSubscriptionMonitorServiceActivitylogAlert) Scopes() ([]interface{}, error) { res, ok := s.Cache.Load("scopes") if !ok || !res.Valid { - return nil, errors.New("\"azure.monitor.activitylog.alert\" failed: no value provided for static field \"scopes\"") + return nil, errors.New("\"azure.subscription.monitorService.activitylog.alert\" failed: no value provided for static field \"scopes\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.monitor.activitylog.alert\" failed to cast field \"scopes\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.monitorService.activitylog.alert\" failed to cast field \"scopes\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureMonitorActivitylogAlert) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.monitor.activitylog.alert].MqlCompute") +func (s *mqlAzureSubscriptionMonitorServiceActivitylogAlert) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.monitorService.activitylog.alert].MqlCompute") switch name { case "id": return nil @@ -19381,12 +20778,12 @@ func (s *mqlAzureMonitorActivitylogAlert) MqlCompute(name string) error { case "scopes": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.monitor.activitylog.alert\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.monitorService.activitylog.alert\" resource") } } -// AzureMonitorLogprofile resource interface -type AzureMonitorLogprofile interface { +// AzureSubscriptionMonitorServiceLogprofile resource interface +type AzureSubscriptionMonitorServiceLogprofile interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -19398,24 +20795,24 @@ type AzureMonitorLogprofile interface { Type() (string, error) Tags() (map[string]interface{}, error) Properties() (interface{}, error) - StorageAccount() (AzureStorageAccount, error) + StorageAccount() (AzureSubscriptionStorageServiceAccount, error) } -// mqlAzureMonitorLogprofile for the azure.monitor.logprofile resource -type mqlAzureMonitorLogprofile struct { +// mqlAzureSubscriptionMonitorServiceLogprofile for the azure.subscription.monitorService.logprofile resource +type mqlAzureSubscriptionMonitorServiceLogprofile struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureMonitorLogprofile) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionMonitorServiceLogprofile) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.monitor.logprofile resource -func newAzureMonitorLogprofile(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.monitorService.logprofile resource +func newAzureSubscriptionMonitorServiceLogprofile(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureMonitorLogprofile{runtime.NewResource("azure.monitor.logprofile")} + res := mqlAzureSubscriptionMonitorServiceLogprofile{runtime.NewResource("azure.subscription.monitorService.logprofile")} // assign all named fields var id string @@ -19429,40 +20826,40 @@ func newAzureMonitorLogprofile(runtime *resources.Runtime, args *resources.Args) switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.monitor.logprofile\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.monitorService.logprofile\", its \"id\" argument has the wrong type (expected type \"string\")") } case "name": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.monitor.logprofile\", its \"name\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.monitorService.logprofile\", its \"name\" argument has the wrong type (expected type \"string\")") } case "location": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.monitor.logprofile\", its \"location\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.monitorService.logprofile\", its \"location\" argument has the wrong type (expected type \"string\")") } case "type": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.monitor.logprofile\", its \"type\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.monitorService.logprofile\", its \"type\" argument has the wrong type (expected type \"string\")") } case "tags": if _, ok := val.(map[string]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.monitor.logprofile\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.monitorService.logprofile\", its \"tags\" argument has the wrong type (expected type \"map[string]interface{}\")") } case "properties": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.monitor.logprofile\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.monitorService.logprofile\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") } case "storageAccount": - if _, ok := val.(AzureStorageAccount); !ok { - return nil, errors.New("Failed to initialize \"azure.monitor.logprofile\", its \"storageAccount\" argument has the wrong type (expected type \"AzureStorageAccount\")") + if _, ok := val.(AzureSubscriptionStorageServiceAccount); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription.monitorService.logprofile\", its \"storageAccount\" argument has the wrong type (expected type \"AzureSubscriptionStorageServiceAccount\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.monitor.logprofile\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.monitorService.logprofile\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.monitor.logprofile with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.monitorService.logprofile with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -19480,36 +20877,36 @@ func newAzureMonitorLogprofile(runtime *resources.Runtime, args *resources.Args) return &res, nil } -func (s *mqlAzureMonitorLogprofile) Validate() error { +func (s *mqlAzureSubscriptionMonitorServiceLogprofile) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.monitor.logprofile\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.monitorService.logprofile\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("name"); !ok { - return errors.New("Initialized \"azure.monitor.logprofile\" resource without a \"name\". This field is required.") + return errors.New("Initialized \"azure.subscription.monitorService.logprofile\" resource without a \"name\". This field is required.") } if _, ok := s.Cache.Load("location"); !ok { - return errors.New("Initialized \"azure.monitor.logprofile\" resource without a \"location\". This field is required.") + return errors.New("Initialized \"azure.subscription.monitorService.logprofile\" resource without a \"location\". This field is required.") } if _, ok := s.Cache.Load("type"); !ok { - return errors.New("Initialized \"azure.monitor.logprofile\" resource without a \"type\". This field is required.") + return errors.New("Initialized \"azure.subscription.monitorService.logprofile\" resource without a \"type\". This field is required.") } if _, ok := s.Cache.Load("tags"); !ok { - return errors.New("Initialized \"azure.monitor.logprofile\" resource without a \"tags\". This field is required.") + return errors.New("Initialized \"azure.subscription.monitorService.logprofile\" resource without a \"tags\". This field is required.") } if _, ok := s.Cache.Load("properties"); !ok { - return errors.New("Initialized \"azure.monitor.logprofile\" resource without a \"properties\". This field is required.") + return errors.New("Initialized \"azure.subscription.monitorService.logprofile\" resource without a \"properties\". This field is required.") } if _, ok := s.Cache.Load("storageAccount"); !ok { - return errors.New("Initialized \"azure.monitor.logprofile\" resource without a \"storageAccount\". This field is required.") + return errors.New("Initialized \"azure.subscription.monitorService.logprofile\" resource without a \"storageAccount\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureMonitorLogprofile) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.monitor.logprofile].Register") +func (s *mqlAzureSubscriptionMonitorServiceLogprofile) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.monitorService.logprofile].Register") switch name { case "id": return nil @@ -19526,13 +20923,13 @@ func (s *mqlAzureMonitorLogprofile) Register(name string) error { case "storageAccount": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.monitor.logprofile\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.monitorService.logprofile\" resource") } } // Field accessor autogenerated -func (s *mqlAzureMonitorLogprofile) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.monitor.logprofile].Field") +func (s *mqlAzureSubscriptionMonitorServiceLogprofile) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.monitorService.logprofile].Field") switch name { case "id": return s.Id() @@ -19549,125 +20946,125 @@ func (s *mqlAzureMonitorLogprofile) Field(name string) (interface{}, error) { case "storageAccount": return s.StorageAccount() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.monitor.logprofile\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.monitorService.logprofile\" resource") } } // Id accessor autogenerated -func (s *mqlAzureMonitorLogprofile) Id() (string, error) { +func (s *mqlAzureSubscriptionMonitorServiceLogprofile) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.monitor.logprofile\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.monitorService.logprofile\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.monitor.logprofile\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.monitorService.logprofile\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Name accessor autogenerated -func (s *mqlAzureMonitorLogprofile) Name() (string, error) { +func (s *mqlAzureSubscriptionMonitorServiceLogprofile) Name() (string, error) { res, ok := s.Cache.Load("name") if !ok || !res.Valid { - return "", errors.New("\"azure.monitor.logprofile\" failed: no value provided for static field \"name\"") + return "", errors.New("\"azure.subscription.monitorService.logprofile\" failed: no value provided for static field \"name\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.monitor.logprofile\" failed to cast field \"name\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.monitorService.logprofile\" failed to cast field \"name\" to the right type (string): %#v", res) } return tres, nil } // Location accessor autogenerated -func (s *mqlAzureMonitorLogprofile) Location() (string, error) { +func (s *mqlAzureSubscriptionMonitorServiceLogprofile) Location() (string, error) { res, ok := s.Cache.Load("location") if !ok || !res.Valid { - return "", errors.New("\"azure.monitor.logprofile\" failed: no value provided for static field \"location\"") + return "", errors.New("\"azure.subscription.monitorService.logprofile\" failed: no value provided for static field \"location\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.monitor.logprofile\" failed to cast field \"location\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.monitorService.logprofile\" failed to cast field \"location\" to the right type (string): %#v", res) } return tres, nil } // Type accessor autogenerated -func (s *mqlAzureMonitorLogprofile) Type() (string, error) { +func (s *mqlAzureSubscriptionMonitorServiceLogprofile) Type() (string, error) { res, ok := s.Cache.Load("type") if !ok || !res.Valid { - return "", errors.New("\"azure.monitor.logprofile\" failed: no value provided for static field \"type\"") + return "", errors.New("\"azure.subscription.monitorService.logprofile\" failed: no value provided for static field \"type\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.monitor.logprofile\" failed to cast field \"type\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.monitorService.logprofile\" failed to cast field \"type\" to the right type (string): %#v", res) } return tres, nil } // Tags accessor autogenerated -func (s *mqlAzureMonitorLogprofile) Tags() (map[string]interface{}, error) { +func (s *mqlAzureSubscriptionMonitorServiceLogprofile) Tags() (map[string]interface{}, error) { res, ok := s.Cache.Load("tags") if !ok || !res.Valid { - return nil, errors.New("\"azure.monitor.logprofile\" failed: no value provided for static field \"tags\"") + return nil, errors.New("\"azure.subscription.monitorService.logprofile\" failed: no value provided for static field \"tags\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(map[string]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.monitor.logprofile\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.monitorService.logprofile\" failed to cast field \"tags\" to the right type (map[string]interface{}): %#v", res) } return tres, nil } // Properties accessor autogenerated -func (s *mqlAzureMonitorLogprofile) Properties() (interface{}, error) { +func (s *mqlAzureSubscriptionMonitorServiceLogprofile) Properties() (interface{}, error) { res, ok := s.Cache.Load("properties") if !ok || !res.Valid { - return nil, errors.New("\"azure.monitor.logprofile\" failed: no value provided for static field \"properties\"") + return nil, errors.New("\"azure.subscription.monitorService.logprofile\" failed: no value provided for static field \"properties\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.monitor.logprofile\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.monitorService.logprofile\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) } return tres, nil } // StorageAccount accessor autogenerated -func (s *mqlAzureMonitorLogprofile) StorageAccount() (AzureStorageAccount, error) { +func (s *mqlAzureSubscriptionMonitorServiceLogprofile) StorageAccount() (AzureSubscriptionStorageServiceAccount, error) { res, ok := s.Cache.Load("storageAccount") if !ok || !res.Valid { - return nil, errors.New("\"azure.monitor.logprofile\" failed: no value provided for static field \"storageAccount\"") + return nil, errors.New("\"azure.subscription.monitorService.logprofile\" failed: no value provided for static field \"storageAccount\"") } if res.Error != nil { return nil, res.Error } - tres, ok := res.Data.(AzureStorageAccount) + tres, ok := res.Data.(AzureSubscriptionStorageServiceAccount) if !ok { - return nil, fmt.Errorf("\"azure.monitor.logprofile\" failed to cast field \"storageAccount\" to the right type (AzureStorageAccount): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.monitorService.logprofile\" failed to cast field \"storageAccount\" to the right type (AzureSubscriptionStorageServiceAccount): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureMonitorLogprofile) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.monitor.logprofile].MqlCompute") +func (s *mqlAzureSubscriptionMonitorServiceLogprofile) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.monitorService.logprofile].MqlCompute") switch name { case "id": return nil @@ -19684,12 +21081,12 @@ func (s *mqlAzureMonitorLogprofile) MqlCompute(name string) error { case "storageAccount": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.monitor.logprofile\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.monitorService.logprofile\" resource") } } -// AzureMonitorDiagnosticsetting resource interface -type AzureMonitorDiagnosticsetting interface { +// AzureSubscriptionMonitorServiceDiagnosticsetting resource interface +type AzureSubscriptionMonitorServiceDiagnosticsetting interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -19699,24 +21096,24 @@ type AzureMonitorDiagnosticsetting interface { Name() (string, error) Type() (string, error) Properties() (interface{}, error) - StorageAccount() (AzureStorageAccount, error) + StorageAccount() (AzureSubscriptionStorageServiceAccount, error) } -// mqlAzureMonitorDiagnosticsetting for the azure.monitor.diagnosticsetting resource -type mqlAzureMonitorDiagnosticsetting struct { +// mqlAzureSubscriptionMonitorServiceDiagnosticsetting for the azure.subscription.monitorService.diagnosticsetting resource +type mqlAzureSubscriptionMonitorServiceDiagnosticsetting struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureMonitorDiagnosticsetting) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionMonitorServiceDiagnosticsetting) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.monitor.diagnosticsetting resource -func newAzureMonitorDiagnosticsetting(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.monitorService.diagnosticsetting resource +func newAzureSubscriptionMonitorServiceDiagnosticsetting(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureMonitorDiagnosticsetting{runtime.NewResource("azure.monitor.diagnosticsetting")} + res := mqlAzureSubscriptionMonitorServiceDiagnosticsetting{runtime.NewResource("azure.subscription.monitorService.diagnosticsetting")} // assign all named fields var id string @@ -19730,32 +21127,32 @@ func newAzureMonitorDiagnosticsetting(runtime *resources.Runtime, args *resource switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.monitor.diagnosticsetting\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.monitorService.diagnosticsetting\", its \"id\" argument has the wrong type (expected type \"string\")") } case "name": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.monitor.diagnosticsetting\", its \"name\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.monitorService.diagnosticsetting\", its \"name\" argument has the wrong type (expected type \"string\")") } case "type": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.monitor.diagnosticsetting\", its \"type\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.monitorService.diagnosticsetting\", its \"type\" argument has the wrong type (expected type \"string\")") } case "properties": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.monitor.diagnosticsetting\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.monitorService.diagnosticsetting\", its \"properties\" argument has the wrong type (expected type \"interface{}\")") } case "storageAccount": - if _, ok := val.(AzureStorageAccount); !ok { - return nil, errors.New("Failed to initialize \"azure.monitor.diagnosticsetting\", its \"storageAccount\" argument has the wrong type (expected type \"AzureStorageAccount\")") + if _, ok := val.(AzureSubscriptionStorageServiceAccount); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription.monitorService.diagnosticsetting\", its \"storageAccount\" argument has the wrong type (expected type \"AzureSubscriptionStorageServiceAccount\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.monitor.diagnosticsetting\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.monitorService.diagnosticsetting\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.monitor.diagnosticsetting with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.monitorService.diagnosticsetting with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -19773,30 +21170,30 @@ func newAzureMonitorDiagnosticsetting(runtime *resources.Runtime, args *resource return &res, nil } -func (s *mqlAzureMonitorDiagnosticsetting) Validate() error { +func (s *mqlAzureSubscriptionMonitorServiceDiagnosticsetting) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.monitor.diagnosticsetting\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.monitorService.diagnosticsetting\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("name"); !ok { - return errors.New("Initialized \"azure.monitor.diagnosticsetting\" resource without a \"name\". This field is required.") + return errors.New("Initialized \"azure.subscription.monitorService.diagnosticsetting\" resource without a \"name\". This field is required.") } if _, ok := s.Cache.Load("type"); !ok { - return errors.New("Initialized \"azure.monitor.diagnosticsetting\" resource without a \"type\". This field is required.") + return errors.New("Initialized \"azure.subscription.monitorService.diagnosticsetting\" resource without a \"type\". This field is required.") } if _, ok := s.Cache.Load("properties"); !ok { - return errors.New("Initialized \"azure.monitor.diagnosticsetting\" resource without a \"properties\". This field is required.") + return errors.New("Initialized \"azure.subscription.monitorService.diagnosticsetting\" resource without a \"properties\". This field is required.") } if _, ok := s.Cache.Load("storageAccount"); !ok { - return errors.New("Initialized \"azure.monitor.diagnosticsetting\" resource without a \"storageAccount\". This field is required.") + return errors.New("Initialized \"azure.subscription.monitorService.diagnosticsetting\" resource without a \"storageAccount\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureMonitorDiagnosticsetting) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.monitor.diagnosticsetting].Register") +func (s *mqlAzureSubscriptionMonitorServiceDiagnosticsetting) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.monitorService.diagnosticsetting].Register") switch name { case "id": return nil @@ -19809,13 +21206,13 @@ func (s *mqlAzureMonitorDiagnosticsetting) Register(name string) error { case "storageAccount": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.monitor.diagnosticsetting\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.monitorService.diagnosticsetting\" resource") } } // Field accessor autogenerated -func (s *mqlAzureMonitorDiagnosticsetting) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.monitor.diagnosticsetting].Field") +func (s *mqlAzureSubscriptionMonitorServiceDiagnosticsetting) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.monitorService.diagnosticsetting].Field") switch name { case "id": return s.Id() @@ -19828,93 +21225,93 @@ func (s *mqlAzureMonitorDiagnosticsetting) Field(name string) (interface{}, erro case "storageAccount": return s.StorageAccount() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.monitor.diagnosticsetting\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.monitorService.diagnosticsetting\" resource") } } // Id accessor autogenerated -func (s *mqlAzureMonitorDiagnosticsetting) Id() (string, error) { +func (s *mqlAzureSubscriptionMonitorServiceDiagnosticsetting) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.monitor.diagnosticsetting\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.monitorService.diagnosticsetting\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.monitor.diagnosticsetting\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.monitorService.diagnosticsetting\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Name accessor autogenerated -func (s *mqlAzureMonitorDiagnosticsetting) Name() (string, error) { +func (s *mqlAzureSubscriptionMonitorServiceDiagnosticsetting) Name() (string, error) { res, ok := s.Cache.Load("name") if !ok || !res.Valid { - return "", errors.New("\"azure.monitor.diagnosticsetting\" failed: no value provided for static field \"name\"") + return "", errors.New("\"azure.subscription.monitorService.diagnosticsetting\" failed: no value provided for static field \"name\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.monitor.diagnosticsetting\" failed to cast field \"name\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.monitorService.diagnosticsetting\" failed to cast field \"name\" to the right type (string): %#v", res) } return tres, nil } // Type accessor autogenerated -func (s *mqlAzureMonitorDiagnosticsetting) Type() (string, error) { +func (s *mqlAzureSubscriptionMonitorServiceDiagnosticsetting) Type() (string, error) { res, ok := s.Cache.Load("type") if !ok || !res.Valid { - return "", errors.New("\"azure.monitor.diagnosticsetting\" failed: no value provided for static field \"type\"") + return "", errors.New("\"azure.subscription.monitorService.diagnosticsetting\" failed: no value provided for static field \"type\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.monitor.diagnosticsetting\" failed to cast field \"type\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.monitorService.diagnosticsetting\" failed to cast field \"type\" to the right type (string): %#v", res) } return tres, nil } // Properties accessor autogenerated -func (s *mqlAzureMonitorDiagnosticsetting) Properties() (interface{}, error) { +func (s *mqlAzureSubscriptionMonitorServiceDiagnosticsetting) Properties() (interface{}, error) { res, ok := s.Cache.Load("properties") if !ok || !res.Valid { - return nil, errors.New("\"azure.monitor.diagnosticsetting\" failed: no value provided for static field \"properties\"") + return nil, errors.New("\"azure.subscription.monitorService.diagnosticsetting\" failed: no value provided for static field \"properties\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.monitor.diagnosticsetting\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.monitorService.diagnosticsetting\" failed to cast field \"properties\" to the right type (interface{}): %#v", res) } return tres, nil } // StorageAccount accessor autogenerated -func (s *mqlAzureMonitorDiagnosticsetting) StorageAccount() (AzureStorageAccount, error) { +func (s *mqlAzureSubscriptionMonitorServiceDiagnosticsetting) StorageAccount() (AzureSubscriptionStorageServiceAccount, error) { res, ok := s.Cache.Load("storageAccount") if !ok || !res.Valid { - return nil, errors.New("\"azure.monitor.diagnosticsetting\" failed: no value provided for static field \"storageAccount\"") + return nil, errors.New("\"azure.subscription.monitorService.diagnosticsetting\" failed: no value provided for static field \"storageAccount\"") } if res.Error != nil { return nil, res.Error } - tres, ok := res.Data.(AzureStorageAccount) + tres, ok := res.Data.(AzureSubscriptionStorageServiceAccount) if !ok { - return nil, fmt.Errorf("\"azure.monitor.diagnosticsetting\" failed to cast field \"storageAccount\" to the right type (AzureStorageAccount): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.monitorService.diagnosticsetting\" failed to cast field \"storageAccount\" to the right type (AzureSubscriptionStorageServiceAccount): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureMonitorDiagnosticsetting) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.monitor.diagnosticsetting].MqlCompute") +func (s *mqlAzureSubscriptionMonitorServiceDiagnosticsetting) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.monitorService.diagnosticsetting].MqlCompute") switch name { case "id": return nil @@ -19927,38 +21324,48 @@ func (s *mqlAzureMonitorDiagnosticsetting) MqlCompute(name string) error { case "storageAccount": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.monitor.diagnosticsetting\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.monitorService.diagnosticsetting\" resource") } } -// AzureCloudDefender resource interface -type AzureCloudDefender interface { +// AzureSubscriptionCloudDefenderService resource interface +type AzureSubscriptionCloudDefenderService interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) Register(string) error Validate() error + SubscriptionId() (string, error) MonitoringAgentAutoProvision() (bool, error) DefenderForServers() (interface{}, error) DefenderForContainers() (interface{}, error) SecurityContacts() ([]interface{}, error) } -// mqlAzureCloudDefender for the azure.cloudDefender resource -type mqlAzureCloudDefender struct { +// mqlAzureSubscriptionCloudDefenderService for the azure.subscription.cloudDefenderService resource +type mqlAzureSubscriptionCloudDefenderService struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureCloudDefender) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionCloudDefenderService) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.cloudDefender resource -func newAzureCloudDefender(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.cloudDefenderService resource +func newAzureSubscriptionCloudDefenderService(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureCloudDefender{runtime.NewResource("azure.cloudDefender")} + res := mqlAzureSubscriptionCloudDefenderService{runtime.NewResource("azure.subscription.cloudDefenderService")} + var existing AzureSubscriptionCloudDefenderService + args, existing, err = res.init(args) + if err != nil { + return nil, err + } + if existing != nil { + return existing, nil + } + // assign all named fields var id string @@ -19970,30 +21377,34 @@ func newAzureCloudDefender(runtime *resources.Runtime, args *resources.Args) (in } switch name { + case "subscriptionId": + if _, ok := val.(string); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription.cloudDefenderService\", its \"subscriptionId\" argument has the wrong type (expected type \"string\")") + } case "monitoringAgentAutoProvision": if _, ok := val.(bool); !ok { - return nil, errors.New("Failed to initialize \"azure.cloudDefender\", its \"monitoringAgentAutoProvision\" argument has the wrong type (expected type \"bool\")") + return nil, errors.New("Failed to initialize \"azure.subscription.cloudDefenderService\", its \"monitoringAgentAutoProvision\" argument has the wrong type (expected type \"bool\")") } case "defenderForServers": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.cloudDefender\", its \"defenderForServers\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.cloudDefenderService\", its \"defenderForServers\" argument has the wrong type (expected type \"interface{}\")") } case "defenderForContainers": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.cloudDefender\", its \"defenderForContainers\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.cloudDefenderService\", its \"defenderForContainers\" argument has the wrong type (expected type \"interface{}\")") } case "securityContacts": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.cloudDefender\", its \"securityContacts\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.cloudDefenderService\", its \"securityContacts\" argument has the wrong type (expected type \"[]interface{}\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.cloudDefender\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.cloudDefenderService\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.cloudDefender with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.cloudDefenderService with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -20011,17 +21422,21 @@ func newAzureCloudDefender(runtime *resources.Runtime, args *resources.Args) (in return &res, nil } -func (s *mqlAzureCloudDefender) Validate() error { +func (s *mqlAzureSubscriptionCloudDefenderService) Validate() error { // required arguments - // no required fields found + if _, ok := s.Cache.Load("subscriptionId"); !ok { + return errors.New("Initialized \"azure.subscription.cloudDefenderService\" resource without a \"subscriptionId\". This field is required.") + } return nil } // Register accessor autogenerated -func (s *mqlAzureCloudDefender) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.cloudDefender].Register") +func (s *mqlAzureSubscriptionCloudDefenderService) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.cloudDefenderService].Register") switch name { + case "subscriptionId": + return nil case "monitoringAgentAutoProvision": return nil case "defenderForServers": @@ -20031,14 +21446,16 @@ func (s *mqlAzureCloudDefender) Register(name string) error { case "securityContacts": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.cloudDefender\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.cloudDefenderService\" resource") } } // Field accessor autogenerated -func (s *mqlAzureCloudDefender) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.cloudDefender].Field") +func (s *mqlAzureSubscriptionCloudDefenderService) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.cloudDefenderService].Field") switch name { + case "subscriptionId": + return s.SubscriptionId() case "monitoringAgentAutoProvision": return s.MonitoringAgentAutoProvision() case "defenderForServers": @@ -20048,12 +21465,28 @@ func (s *mqlAzureCloudDefender) Field(name string) (interface{}, error) { case "securityContacts": return s.SecurityContacts() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.cloudDefender\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.cloudDefenderService\" resource") + } +} + +// SubscriptionId accessor autogenerated +func (s *mqlAzureSubscriptionCloudDefenderService) SubscriptionId() (string, error) { + res, ok := s.Cache.Load("subscriptionId") + if !ok || !res.Valid { + return "", errors.New("\"azure.subscription.cloudDefenderService\" failed: no value provided for static field \"subscriptionId\"") + } + if res.Error != nil { + return "", res.Error + } + tres, ok := res.Data.(string) + if !ok { + return "", fmt.Errorf("\"azure.subscription.cloudDefenderService\" failed to cast field \"subscriptionId\" to the right type (string): %#v", res) } + return tres, nil } // MonitoringAgentAutoProvision accessor autogenerated -func (s *mqlAzureCloudDefender) MonitoringAgentAutoProvision() (bool, error) { +func (s *mqlAzureSubscriptionCloudDefenderService) MonitoringAgentAutoProvision() (bool, error) { res, ok := s.Cache.Load("monitoringAgentAutoProvision") if !ok || !res.Valid { if err := s.ComputeMonitoringAgentAutoProvision(); err != nil { @@ -20061,7 +21494,7 @@ func (s *mqlAzureCloudDefender) MonitoringAgentAutoProvision() (bool, error) { } res, ok = s.Cache.Load("monitoringAgentAutoProvision") if !ok { - return false, errors.New("\"azure.cloudDefender\" calculated \"monitoringAgentAutoProvision\" but didn't find its value in cache.") + return false, errors.New("\"azure.subscription.cloudDefenderService\" calculated \"monitoringAgentAutoProvision\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "monitoringAgentAutoProvision") } @@ -20070,13 +21503,13 @@ func (s *mqlAzureCloudDefender) MonitoringAgentAutoProvision() (bool, error) { } tres, ok := res.Data.(bool) if !ok { - return false, fmt.Errorf("\"azure.cloudDefender\" failed to cast field \"monitoringAgentAutoProvision\" to the right type (bool): %#v", res) + return false, fmt.Errorf("\"azure.subscription.cloudDefenderService\" failed to cast field \"monitoringAgentAutoProvision\" to the right type (bool): %#v", res) } return tres, nil } // DefenderForServers accessor autogenerated -func (s *mqlAzureCloudDefender) DefenderForServers() (interface{}, error) { +func (s *mqlAzureSubscriptionCloudDefenderService) DefenderForServers() (interface{}, error) { res, ok := s.Cache.Load("defenderForServers") if !ok || !res.Valid { if err := s.ComputeDefenderForServers(); err != nil { @@ -20084,7 +21517,7 @@ func (s *mqlAzureCloudDefender) DefenderForServers() (interface{}, error) { } res, ok = s.Cache.Load("defenderForServers") if !ok { - return nil, errors.New("\"azure.cloudDefender\" calculated \"defenderForServers\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.cloudDefenderService\" calculated \"defenderForServers\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "defenderForServers") } @@ -20093,13 +21526,13 @@ func (s *mqlAzureCloudDefender) DefenderForServers() (interface{}, error) { } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.cloudDefender\" failed to cast field \"defenderForServers\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.cloudDefenderService\" failed to cast field \"defenderForServers\" to the right type (interface{}): %#v", res) } return tres, nil } // DefenderForContainers accessor autogenerated -func (s *mqlAzureCloudDefender) DefenderForContainers() (interface{}, error) { +func (s *mqlAzureSubscriptionCloudDefenderService) DefenderForContainers() (interface{}, error) { res, ok := s.Cache.Load("defenderForContainers") if !ok || !res.Valid { if err := s.ComputeDefenderForContainers(); err != nil { @@ -20107,7 +21540,7 @@ func (s *mqlAzureCloudDefender) DefenderForContainers() (interface{}, error) { } res, ok = s.Cache.Load("defenderForContainers") if !ok { - return nil, errors.New("\"azure.cloudDefender\" calculated \"defenderForContainers\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.cloudDefenderService\" calculated \"defenderForContainers\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "defenderForContainers") } @@ -20116,13 +21549,13 @@ func (s *mqlAzureCloudDefender) DefenderForContainers() (interface{}, error) { } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.cloudDefender\" failed to cast field \"defenderForContainers\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.cloudDefenderService\" failed to cast field \"defenderForContainers\" to the right type (interface{}): %#v", res) } return tres, nil } // SecurityContacts accessor autogenerated -func (s *mqlAzureCloudDefender) SecurityContacts() ([]interface{}, error) { +func (s *mqlAzureSubscriptionCloudDefenderService) SecurityContacts() ([]interface{}, error) { res, ok := s.Cache.Load("securityContacts") if !ok || !res.Valid { if err := s.ComputeSecurityContacts(); err != nil { @@ -20130,7 +21563,7 @@ func (s *mqlAzureCloudDefender) SecurityContacts() ([]interface{}, error) { } res, ok = s.Cache.Load("securityContacts") if !ok { - return nil, errors.New("\"azure.cloudDefender\" calculated \"securityContacts\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.cloudDefenderService\" calculated \"securityContacts\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "securityContacts") } @@ -20139,15 +21572,17 @@ func (s *mqlAzureCloudDefender) SecurityContacts() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.cloudDefender\" failed to cast field \"securityContacts\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.cloudDefenderService\" failed to cast field \"securityContacts\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureCloudDefender) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.cloudDefender].MqlCompute") +func (s *mqlAzureSubscriptionCloudDefenderService) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.cloudDefenderService].MqlCompute") switch name { + case "subscriptionId": + return nil case "monitoringAgentAutoProvision": return s.ComputeMonitoringAgentAutoProvision() case "defenderForServers": @@ -20157,12 +21592,12 @@ func (s *mqlAzureCloudDefender) MqlCompute(name string) error { case "securityContacts": return s.ComputeSecurityContacts() default: - return errors.New("Cannot find field '" + name + "' in \"azure.cloudDefender\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.cloudDefenderService\" resource") } } // ComputeMonitoringAgentAutoProvision computer autogenerated -func (s *mqlAzureCloudDefender) ComputeMonitoringAgentAutoProvision() error { +func (s *mqlAzureSubscriptionCloudDefenderService) ComputeMonitoringAgentAutoProvision() error { var err error if _, ok := s.Cache.Load("monitoringAgentAutoProvision"); ok { return nil @@ -20176,7 +21611,7 @@ func (s *mqlAzureCloudDefender) ComputeMonitoringAgentAutoProvision() error { } // ComputeDefenderForServers computer autogenerated -func (s *mqlAzureCloudDefender) ComputeDefenderForServers() error { +func (s *mqlAzureSubscriptionCloudDefenderService) ComputeDefenderForServers() error { var err error if _, ok := s.Cache.Load("defenderForServers"); ok { return nil @@ -20190,7 +21625,7 @@ func (s *mqlAzureCloudDefender) ComputeDefenderForServers() error { } // ComputeDefenderForContainers computer autogenerated -func (s *mqlAzureCloudDefender) ComputeDefenderForContainers() error { +func (s *mqlAzureSubscriptionCloudDefenderService) ComputeDefenderForContainers() error { var err error if _, ok := s.Cache.Load("defenderForContainers"); ok { return nil @@ -20204,7 +21639,7 @@ func (s *mqlAzureCloudDefender) ComputeDefenderForContainers() error { } // ComputeSecurityContacts computer autogenerated -func (s *mqlAzureCloudDefender) ComputeSecurityContacts() error { +func (s *mqlAzureSubscriptionCloudDefenderService) ComputeSecurityContacts() error { var err error if _, ok := s.Cache.Load("securityContacts"); ok { return nil @@ -20217,8 +21652,8 @@ func (s *mqlAzureCloudDefender) ComputeSecurityContacts() error { return nil } -// AzureCloudDefenderSecurityContact resource interface -type AzureCloudDefenderSecurityContact interface { +// AzureSubscriptionCloudDefenderServiceSecurityContact resource interface +type AzureSubscriptionCloudDefenderServiceSecurityContact interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -20231,21 +21666,21 @@ type AzureCloudDefenderSecurityContact interface { NotificationsByRole() (interface{}, error) } -// mqlAzureCloudDefenderSecurityContact for the azure.cloudDefender.securityContact resource -type mqlAzureCloudDefenderSecurityContact struct { +// mqlAzureSubscriptionCloudDefenderServiceSecurityContact for the azure.subscription.cloudDefenderService.securityContact resource +type mqlAzureSubscriptionCloudDefenderServiceSecurityContact struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureCloudDefenderSecurityContact) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionCloudDefenderServiceSecurityContact) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.cloudDefender.securityContact resource -func newAzureCloudDefenderSecurityContact(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.cloudDefenderService.securityContact resource +func newAzureSubscriptionCloudDefenderServiceSecurityContact(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureCloudDefenderSecurityContact{runtime.NewResource("azure.cloudDefender.securityContact")} + res := mqlAzureSubscriptionCloudDefenderServiceSecurityContact{runtime.NewResource("azure.subscription.cloudDefenderService.securityContact")} // assign all named fields var id string @@ -20259,32 +21694,32 @@ func newAzureCloudDefenderSecurityContact(runtime *resources.Runtime, args *reso switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.cloudDefender.securityContact\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.cloudDefenderService.securityContact\", its \"id\" argument has the wrong type (expected type \"string\")") } case "name": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.cloudDefender.securityContact\", its \"name\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.cloudDefenderService.securityContact\", its \"name\" argument has the wrong type (expected type \"string\")") } case "emails": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.cloudDefender.securityContact\", its \"emails\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.cloudDefenderService.securityContact\", its \"emails\" argument has the wrong type (expected type \"[]interface{}\")") } case "alertNotifications": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.cloudDefender.securityContact\", its \"alertNotifications\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.cloudDefenderService.securityContact\", its \"alertNotifications\" argument has the wrong type (expected type \"interface{}\")") } case "notificationsByRole": if _, ok := val.(interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.cloudDefender.securityContact\", its \"notificationsByRole\" argument has the wrong type (expected type \"interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.cloudDefenderService.securityContact\", its \"notificationsByRole\" argument has the wrong type (expected type \"interface{}\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.cloudDefender.securityContact\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.cloudDefenderService.securityContact\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.cloudDefender.securityContact with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.cloudDefenderService.securityContact with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -20302,30 +21737,30 @@ func newAzureCloudDefenderSecurityContact(runtime *resources.Runtime, args *reso return &res, nil } -func (s *mqlAzureCloudDefenderSecurityContact) Validate() error { +func (s *mqlAzureSubscriptionCloudDefenderServiceSecurityContact) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.cloudDefender.securityContact\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.cloudDefenderService.securityContact\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("name"); !ok { - return errors.New("Initialized \"azure.cloudDefender.securityContact\" resource without a \"name\". This field is required.") + return errors.New("Initialized \"azure.subscription.cloudDefenderService.securityContact\" resource without a \"name\". This field is required.") } if _, ok := s.Cache.Load("emails"); !ok { - return errors.New("Initialized \"azure.cloudDefender.securityContact\" resource without a \"emails\". This field is required.") + return errors.New("Initialized \"azure.subscription.cloudDefenderService.securityContact\" resource without a \"emails\". This field is required.") } if _, ok := s.Cache.Load("alertNotifications"); !ok { - return errors.New("Initialized \"azure.cloudDefender.securityContact\" resource without a \"alertNotifications\". This field is required.") + return errors.New("Initialized \"azure.subscription.cloudDefenderService.securityContact\" resource without a \"alertNotifications\". This field is required.") } if _, ok := s.Cache.Load("notificationsByRole"); !ok { - return errors.New("Initialized \"azure.cloudDefender.securityContact\" resource without a \"notificationsByRole\". This field is required.") + return errors.New("Initialized \"azure.subscription.cloudDefenderService.securityContact\" resource without a \"notificationsByRole\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureCloudDefenderSecurityContact) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.cloudDefender.securityContact].Register") +func (s *mqlAzureSubscriptionCloudDefenderServiceSecurityContact) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.cloudDefenderService.securityContact].Register") switch name { case "id": return nil @@ -20338,13 +21773,13 @@ func (s *mqlAzureCloudDefenderSecurityContact) Register(name string) error { case "notificationsByRole": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.cloudDefender.securityContact\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.cloudDefenderService.securityContact\" resource") } } // Field accessor autogenerated -func (s *mqlAzureCloudDefenderSecurityContact) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.cloudDefender.securityContact].Field") +func (s *mqlAzureSubscriptionCloudDefenderServiceSecurityContact) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.cloudDefenderService.securityContact].Field") switch name { case "id": return s.Id() @@ -20357,93 +21792,93 @@ func (s *mqlAzureCloudDefenderSecurityContact) Field(name string) (interface{}, case "notificationsByRole": return s.NotificationsByRole() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.cloudDefender.securityContact\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.cloudDefenderService.securityContact\" resource") } } // Id accessor autogenerated -func (s *mqlAzureCloudDefenderSecurityContact) Id() (string, error) { +func (s *mqlAzureSubscriptionCloudDefenderServiceSecurityContact) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.cloudDefender.securityContact\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.cloudDefenderService.securityContact\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.cloudDefender.securityContact\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.cloudDefenderService.securityContact\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Name accessor autogenerated -func (s *mqlAzureCloudDefenderSecurityContact) Name() (string, error) { +func (s *mqlAzureSubscriptionCloudDefenderServiceSecurityContact) Name() (string, error) { res, ok := s.Cache.Load("name") if !ok || !res.Valid { - return "", errors.New("\"azure.cloudDefender.securityContact\" failed: no value provided for static field \"name\"") + return "", errors.New("\"azure.subscription.cloudDefenderService.securityContact\" failed: no value provided for static field \"name\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.cloudDefender.securityContact\" failed to cast field \"name\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.cloudDefenderService.securityContact\" failed to cast field \"name\" to the right type (string): %#v", res) } return tres, nil } // Emails accessor autogenerated -func (s *mqlAzureCloudDefenderSecurityContact) Emails() ([]interface{}, error) { +func (s *mqlAzureSubscriptionCloudDefenderServiceSecurityContact) Emails() ([]interface{}, error) { res, ok := s.Cache.Load("emails") if !ok || !res.Valid { - return nil, errors.New("\"azure.cloudDefender.securityContact\" failed: no value provided for static field \"emails\"") + return nil, errors.New("\"azure.subscription.cloudDefenderService.securityContact\" failed: no value provided for static field \"emails\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.cloudDefender.securityContact\" failed to cast field \"emails\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.cloudDefenderService.securityContact\" failed to cast field \"emails\" to the right type ([]interface{}): %#v", res) } return tres, nil } // AlertNotifications accessor autogenerated -func (s *mqlAzureCloudDefenderSecurityContact) AlertNotifications() (interface{}, error) { +func (s *mqlAzureSubscriptionCloudDefenderServiceSecurityContact) AlertNotifications() (interface{}, error) { res, ok := s.Cache.Load("alertNotifications") if !ok || !res.Valid { - return nil, errors.New("\"azure.cloudDefender.securityContact\" failed: no value provided for static field \"alertNotifications\"") + return nil, errors.New("\"azure.subscription.cloudDefenderService.securityContact\" failed: no value provided for static field \"alertNotifications\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.cloudDefender.securityContact\" failed to cast field \"alertNotifications\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.cloudDefenderService.securityContact\" failed to cast field \"alertNotifications\" to the right type (interface{}): %#v", res) } return tres, nil } // NotificationsByRole accessor autogenerated -func (s *mqlAzureCloudDefenderSecurityContact) NotificationsByRole() (interface{}, error) { +func (s *mqlAzureSubscriptionCloudDefenderServiceSecurityContact) NotificationsByRole() (interface{}, error) { res, ok := s.Cache.Load("notificationsByRole") if !ok || !res.Valid { - return nil, errors.New("\"azure.cloudDefender.securityContact\" failed: no value provided for static field \"notificationsByRole\"") + return nil, errors.New("\"azure.subscription.cloudDefenderService.securityContact\" failed: no value provided for static field \"notificationsByRole\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.(interface{}) if !ok { - return nil, fmt.Errorf("\"azure.cloudDefender.securityContact\" failed to cast field \"notificationsByRole\" to the right type (interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.cloudDefenderService.securityContact\" failed to cast field \"notificationsByRole\" to the right type (interface{}): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureCloudDefenderSecurityContact) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.cloudDefender.securityContact].MqlCompute") +func (s *mqlAzureSubscriptionCloudDefenderServiceSecurityContact) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.cloudDefenderService.securityContact].MqlCompute") switch name { case "id": return nil @@ -20456,35 +21891,45 @@ func (s *mqlAzureCloudDefenderSecurityContact) MqlCompute(name string) error { case "notificationsByRole": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.cloudDefender.securityContact\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.cloudDefenderService.securityContact\" resource") } } -// AzureAuthorization resource interface -type AzureAuthorization interface { +// AzureSubscriptionAuthorizationService resource interface +type AzureSubscriptionAuthorizationService interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) Register(string) error Validate() error + SubscriptionId() (string, error) RoleDefinitions() ([]interface{}, error) } -// mqlAzureAuthorization for the azure.authorization resource -type mqlAzureAuthorization struct { +// mqlAzureSubscriptionAuthorizationService for the azure.subscription.authorizationService resource +type mqlAzureSubscriptionAuthorizationService struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureAuthorization) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionAuthorizationService) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.authorization resource -func newAzureAuthorization(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.authorizationService resource +func newAzureSubscriptionAuthorizationService(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureAuthorization{runtime.NewResource("azure.authorization")} + res := mqlAzureSubscriptionAuthorizationService{runtime.NewResource("azure.subscription.authorizationService")} + var existing AzureSubscriptionAuthorizationService + args, existing, err = res.init(args) + if err != nil { + return nil, err + } + if existing != nil { + return existing, nil + } + // assign all named fields var id string @@ -20496,18 +21941,22 @@ func newAzureAuthorization(runtime *resources.Runtime, args *resources.Args) (in } switch name { + case "subscriptionId": + if _, ok := val.(string); !ok { + return nil, errors.New("Failed to initialize \"azure.subscription.authorizationService\", its \"subscriptionId\" argument has the wrong type (expected type \"string\")") + } case "roleDefinitions": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.authorization\", its \"roleDefinitions\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.authorizationService\", its \"roleDefinitions\" argument has the wrong type (expected type \"[]interface{}\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.authorization\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.authorizationService\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.authorization with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.authorizationService with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -20525,37 +21974,59 @@ func newAzureAuthorization(runtime *resources.Runtime, args *resources.Args) (in return &res, nil } -func (s *mqlAzureAuthorization) Validate() error { +func (s *mqlAzureSubscriptionAuthorizationService) Validate() error { // required arguments - // no required fields found + if _, ok := s.Cache.Load("subscriptionId"); !ok { + return errors.New("Initialized \"azure.subscription.authorizationService\" resource without a \"subscriptionId\". This field is required.") + } return nil } // Register accessor autogenerated -func (s *mqlAzureAuthorization) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.authorization].Register") +func (s *mqlAzureSubscriptionAuthorizationService) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.authorizationService].Register") switch name { + case "subscriptionId": + return nil case "roleDefinitions": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.authorization\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.authorizationService\" resource") } } // Field accessor autogenerated -func (s *mqlAzureAuthorization) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.authorization].Field") +func (s *mqlAzureSubscriptionAuthorizationService) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.authorizationService].Field") switch name { + case "subscriptionId": + return s.SubscriptionId() case "roleDefinitions": return s.RoleDefinitions() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.authorization\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.authorizationService\" resource") + } +} + +// SubscriptionId accessor autogenerated +func (s *mqlAzureSubscriptionAuthorizationService) SubscriptionId() (string, error) { + res, ok := s.Cache.Load("subscriptionId") + if !ok || !res.Valid { + return "", errors.New("\"azure.subscription.authorizationService\" failed: no value provided for static field \"subscriptionId\"") } + if res.Error != nil { + return "", res.Error + } + tres, ok := res.Data.(string) + if !ok { + return "", fmt.Errorf("\"azure.subscription.authorizationService\" failed to cast field \"subscriptionId\" to the right type (string): %#v", res) + } + return tres, nil } // RoleDefinitions accessor autogenerated -func (s *mqlAzureAuthorization) RoleDefinitions() ([]interface{}, error) { +func (s *mqlAzureSubscriptionAuthorizationService) RoleDefinitions() ([]interface{}, error) { res, ok := s.Cache.Load("roleDefinitions") if !ok || !res.Valid { if err := s.ComputeRoleDefinitions(); err != nil { @@ -20563,7 +22034,7 @@ func (s *mqlAzureAuthorization) RoleDefinitions() ([]interface{}, error) { } res, ok = s.Cache.Load("roleDefinitions") if !ok { - return nil, errors.New("\"azure.authorization\" calculated \"roleDefinitions\" but didn't find its value in cache.") + return nil, errors.New("\"azure.subscription.authorizationService\" calculated \"roleDefinitions\" but didn't find its value in cache.") } s.MotorRuntime.Trigger(s, "roleDefinitions") } @@ -20572,24 +22043,26 @@ func (s *mqlAzureAuthorization) RoleDefinitions() ([]interface{}, error) { } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.authorization\" failed to cast field \"roleDefinitions\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.authorizationService\" failed to cast field \"roleDefinitions\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureAuthorization) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.authorization].MqlCompute") +func (s *mqlAzureSubscriptionAuthorizationService) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.authorizationService].MqlCompute") switch name { + case "subscriptionId": + return nil case "roleDefinitions": return s.ComputeRoleDefinitions() default: - return errors.New("Cannot find field '" + name + "' in \"azure.authorization\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.authorizationService\" resource") } } // ComputeRoleDefinitions computer autogenerated -func (s *mqlAzureAuthorization) ComputeRoleDefinitions() error { +func (s *mqlAzureSubscriptionAuthorizationService) ComputeRoleDefinitions() error { var err error if _, ok := s.Cache.Load("roleDefinitions"); ok { return nil @@ -20602,8 +22075,8 @@ func (s *mqlAzureAuthorization) ComputeRoleDefinitions() error { return nil } -// AzureAuthorizationRoleDefinition resource interface -type AzureAuthorizationRoleDefinition interface { +// AzureSubscriptionAuthorizationServiceRoleDefinition resource interface +type AzureSubscriptionAuthorizationServiceRoleDefinition interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -20617,21 +22090,21 @@ type AzureAuthorizationRoleDefinition interface { Permissions() ([]interface{}, error) } -// mqlAzureAuthorizationRoleDefinition for the azure.authorization.roleDefinition resource -type mqlAzureAuthorizationRoleDefinition struct { +// mqlAzureSubscriptionAuthorizationServiceRoleDefinition for the azure.subscription.authorizationService.roleDefinition resource +type mqlAzureSubscriptionAuthorizationServiceRoleDefinition struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureAuthorizationRoleDefinition) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionAuthorizationServiceRoleDefinition) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.authorization.roleDefinition resource -func newAzureAuthorizationRoleDefinition(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.authorizationService.roleDefinition resource +func newAzureSubscriptionAuthorizationServiceRoleDefinition(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureAuthorizationRoleDefinition{runtime.NewResource("azure.authorization.roleDefinition")} + res := mqlAzureSubscriptionAuthorizationServiceRoleDefinition{runtime.NewResource("azure.subscription.authorizationService.roleDefinition")} // assign all named fields var id string @@ -20645,36 +22118,36 @@ func newAzureAuthorizationRoleDefinition(runtime *resources.Runtime, args *resou switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.authorization.roleDefinition\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.authorizationService.roleDefinition\", its \"id\" argument has the wrong type (expected type \"string\")") } case "description": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.authorization.roleDefinition\", its \"description\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.authorizationService.roleDefinition\", its \"description\" argument has the wrong type (expected type \"string\")") } case "name": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.authorization.roleDefinition\", its \"name\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.authorizationService.roleDefinition\", its \"name\" argument has the wrong type (expected type \"string\")") } case "isCustom": if _, ok := val.(bool); !ok { - return nil, errors.New("Failed to initialize \"azure.authorization.roleDefinition\", its \"isCustom\" argument has the wrong type (expected type \"bool\")") + return nil, errors.New("Failed to initialize \"azure.subscription.authorizationService.roleDefinition\", its \"isCustom\" argument has the wrong type (expected type \"bool\")") } case "scopes": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.authorization.roleDefinition\", its \"scopes\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.authorizationService.roleDefinition\", its \"scopes\" argument has the wrong type (expected type \"[]interface{}\")") } case "permissions": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.authorization.roleDefinition\", its \"permissions\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.authorizationService.roleDefinition\", its \"permissions\" argument has the wrong type (expected type \"[]interface{}\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.authorization.roleDefinition\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.authorizationService.roleDefinition\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.authorization.roleDefinition with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.authorizationService.roleDefinition with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -20692,33 +22165,33 @@ func newAzureAuthorizationRoleDefinition(runtime *resources.Runtime, args *resou return &res, nil } -func (s *mqlAzureAuthorizationRoleDefinition) Validate() error { +func (s *mqlAzureSubscriptionAuthorizationServiceRoleDefinition) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.authorization.roleDefinition\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.authorizationService.roleDefinition\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("description"); !ok { - return errors.New("Initialized \"azure.authorization.roleDefinition\" resource without a \"description\". This field is required.") + return errors.New("Initialized \"azure.subscription.authorizationService.roleDefinition\" resource without a \"description\". This field is required.") } if _, ok := s.Cache.Load("name"); !ok { - return errors.New("Initialized \"azure.authorization.roleDefinition\" resource without a \"name\". This field is required.") + return errors.New("Initialized \"azure.subscription.authorizationService.roleDefinition\" resource without a \"name\". This field is required.") } if _, ok := s.Cache.Load("isCustom"); !ok { - return errors.New("Initialized \"azure.authorization.roleDefinition\" resource without a \"isCustom\". This field is required.") + return errors.New("Initialized \"azure.subscription.authorizationService.roleDefinition\" resource without a \"isCustom\". This field is required.") } if _, ok := s.Cache.Load("scopes"); !ok { - return errors.New("Initialized \"azure.authorization.roleDefinition\" resource without a \"scopes\". This field is required.") + return errors.New("Initialized \"azure.subscription.authorizationService.roleDefinition\" resource without a \"scopes\". This field is required.") } if _, ok := s.Cache.Load("permissions"); !ok { - return errors.New("Initialized \"azure.authorization.roleDefinition\" resource without a \"permissions\". This field is required.") + return errors.New("Initialized \"azure.subscription.authorizationService.roleDefinition\" resource without a \"permissions\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureAuthorizationRoleDefinition) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.authorization.roleDefinition].Register") +func (s *mqlAzureSubscriptionAuthorizationServiceRoleDefinition) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.authorizationService.roleDefinition].Register") switch name { case "id": return nil @@ -20733,13 +22206,13 @@ func (s *mqlAzureAuthorizationRoleDefinition) Register(name string) error { case "permissions": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.authorization.roleDefinition\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.authorizationService.roleDefinition\" resource") } } // Field accessor autogenerated -func (s *mqlAzureAuthorizationRoleDefinition) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.authorization.roleDefinition].Field") +func (s *mqlAzureSubscriptionAuthorizationServiceRoleDefinition) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.authorizationService.roleDefinition].Field") switch name { case "id": return s.Id() @@ -20754,109 +22227,109 @@ func (s *mqlAzureAuthorizationRoleDefinition) Field(name string) (interface{}, e case "permissions": return s.Permissions() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.authorization.roleDefinition\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.authorizationService.roleDefinition\" resource") } } // Id accessor autogenerated -func (s *mqlAzureAuthorizationRoleDefinition) Id() (string, error) { +func (s *mqlAzureSubscriptionAuthorizationServiceRoleDefinition) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.authorization.roleDefinition\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.authorizationService.roleDefinition\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.authorization.roleDefinition\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.authorizationService.roleDefinition\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // Description accessor autogenerated -func (s *mqlAzureAuthorizationRoleDefinition) Description() (string, error) { +func (s *mqlAzureSubscriptionAuthorizationServiceRoleDefinition) Description() (string, error) { res, ok := s.Cache.Load("description") if !ok || !res.Valid { - return "", errors.New("\"azure.authorization.roleDefinition\" failed: no value provided for static field \"description\"") + return "", errors.New("\"azure.subscription.authorizationService.roleDefinition\" failed: no value provided for static field \"description\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.authorization.roleDefinition\" failed to cast field \"description\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.authorizationService.roleDefinition\" failed to cast field \"description\" to the right type (string): %#v", res) } return tres, nil } // Name accessor autogenerated -func (s *mqlAzureAuthorizationRoleDefinition) Name() (string, error) { +func (s *mqlAzureSubscriptionAuthorizationServiceRoleDefinition) Name() (string, error) { res, ok := s.Cache.Load("name") if !ok || !res.Valid { - return "", errors.New("\"azure.authorization.roleDefinition\" failed: no value provided for static field \"name\"") + return "", errors.New("\"azure.subscription.authorizationService.roleDefinition\" failed: no value provided for static field \"name\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.authorization.roleDefinition\" failed to cast field \"name\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.authorizationService.roleDefinition\" failed to cast field \"name\" to the right type (string): %#v", res) } return tres, nil } // IsCustom accessor autogenerated -func (s *mqlAzureAuthorizationRoleDefinition) IsCustom() (bool, error) { +func (s *mqlAzureSubscriptionAuthorizationServiceRoleDefinition) IsCustom() (bool, error) { res, ok := s.Cache.Load("isCustom") if !ok || !res.Valid { - return false, errors.New("\"azure.authorization.roleDefinition\" failed: no value provided for static field \"isCustom\"") + return false, errors.New("\"azure.subscription.authorizationService.roleDefinition\" failed: no value provided for static field \"isCustom\"") } if res.Error != nil { return false, res.Error } tres, ok := res.Data.(bool) if !ok { - return false, fmt.Errorf("\"azure.authorization.roleDefinition\" failed to cast field \"isCustom\" to the right type (bool): %#v", res) + return false, fmt.Errorf("\"azure.subscription.authorizationService.roleDefinition\" failed to cast field \"isCustom\" to the right type (bool): %#v", res) } return tres, nil } // Scopes accessor autogenerated -func (s *mqlAzureAuthorizationRoleDefinition) Scopes() ([]interface{}, error) { +func (s *mqlAzureSubscriptionAuthorizationServiceRoleDefinition) Scopes() ([]interface{}, error) { res, ok := s.Cache.Load("scopes") if !ok || !res.Valid { - return nil, errors.New("\"azure.authorization.roleDefinition\" failed: no value provided for static field \"scopes\"") + return nil, errors.New("\"azure.subscription.authorizationService.roleDefinition\" failed: no value provided for static field \"scopes\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.authorization.roleDefinition\" failed to cast field \"scopes\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.authorizationService.roleDefinition\" failed to cast field \"scopes\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Permissions accessor autogenerated -func (s *mqlAzureAuthorizationRoleDefinition) Permissions() ([]interface{}, error) { +func (s *mqlAzureSubscriptionAuthorizationServiceRoleDefinition) Permissions() ([]interface{}, error) { res, ok := s.Cache.Load("permissions") if !ok || !res.Valid { - return nil, errors.New("\"azure.authorization.roleDefinition\" failed: no value provided for static field \"permissions\"") + return nil, errors.New("\"azure.subscription.authorizationService.roleDefinition\" failed: no value provided for static field \"permissions\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.authorization.roleDefinition\" failed to cast field \"permissions\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.authorizationService.roleDefinition\" failed to cast field \"permissions\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureAuthorizationRoleDefinition) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.authorization.roleDefinition].MqlCompute") +func (s *mqlAzureSubscriptionAuthorizationServiceRoleDefinition) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.authorizationService.roleDefinition].MqlCompute") switch name { case "id": return nil @@ -20871,12 +22344,12 @@ func (s *mqlAzureAuthorizationRoleDefinition) MqlCompute(name string) error { case "permissions": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.authorization.roleDefinition\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.authorizationService.roleDefinition\" resource") } } -// AzureAuthorizationRoleDefinitionPermission resource interface -type AzureAuthorizationRoleDefinitionPermission interface { +// AzureSubscriptionAuthorizationServiceRoleDefinitionPermission resource interface +type AzureSubscriptionAuthorizationServiceRoleDefinitionPermission interface { MqlResource() (*resources.Resource) MqlCompute(string) error Field(string) (interface{}, error) @@ -20889,21 +22362,21 @@ type AzureAuthorizationRoleDefinitionPermission interface { DeniedDataActions() ([]interface{}, error) } -// mqlAzureAuthorizationRoleDefinitionPermission for the azure.authorization.roleDefinition.permission resource -type mqlAzureAuthorizationRoleDefinitionPermission struct { +// mqlAzureSubscriptionAuthorizationServiceRoleDefinitionPermission for the azure.subscription.authorizationService.roleDefinition.permission resource +type mqlAzureSubscriptionAuthorizationServiceRoleDefinitionPermission struct { *resources.Resource } // MqlResource to retrieve the underlying resource info -func (s *mqlAzureAuthorizationRoleDefinitionPermission) MqlResource() *resources.Resource { +func (s *mqlAzureSubscriptionAuthorizationServiceRoleDefinitionPermission) MqlResource() *resources.Resource { return s.Resource } -// create a new instance of the azure.authorization.roleDefinition.permission resource -func newAzureAuthorizationRoleDefinitionPermission(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { +// create a new instance of the azure.subscription.authorizationService.roleDefinition.permission resource +func newAzureSubscriptionAuthorizationServiceRoleDefinitionPermission(runtime *resources.Runtime, args *resources.Args) (interface{}, error) { // User hooks var err error - res := mqlAzureAuthorizationRoleDefinitionPermission{runtime.NewResource("azure.authorization.roleDefinition.permission")} + res := mqlAzureSubscriptionAuthorizationServiceRoleDefinitionPermission{runtime.NewResource("azure.subscription.authorizationService.roleDefinition.permission")} // assign all named fields var id string @@ -20917,32 +22390,32 @@ func newAzureAuthorizationRoleDefinitionPermission(runtime *resources.Runtime, a switch name { case "id": if _, ok := val.(string); !ok { - return nil, errors.New("Failed to initialize \"azure.authorization.roleDefinition.permission\", its \"id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.authorizationService.roleDefinition.permission\", its \"id\" argument has the wrong type (expected type \"string\")") } case "allowedActions": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.authorization.roleDefinition.permission\", its \"allowedActions\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.authorizationService.roleDefinition.permission\", its \"allowedActions\" argument has the wrong type (expected type \"[]interface{}\")") } case "deniedActions": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.authorization.roleDefinition.permission\", its \"deniedActions\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.authorizationService.roleDefinition.permission\", its \"deniedActions\" argument has the wrong type (expected type \"[]interface{}\")") } case "allowedDataActions": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.authorization.roleDefinition.permission\", its \"allowedDataActions\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.authorizationService.roleDefinition.permission\", its \"allowedDataActions\" argument has the wrong type (expected type \"[]interface{}\")") } case "deniedDataActions": if _, ok := val.([]interface{}); !ok { - return nil, errors.New("Failed to initialize \"azure.authorization.roleDefinition.permission\", its \"deniedDataActions\" argument has the wrong type (expected type \"[]interface{}\")") + return nil, errors.New("Failed to initialize \"azure.subscription.authorizationService.roleDefinition.permission\", its \"deniedDataActions\" argument has the wrong type (expected type \"[]interface{}\")") } case "__id": idVal, ok := val.(string) if !ok { - return nil, errors.New("Failed to initialize \"azure.authorization.roleDefinition.permission\", its \"__id\" argument has the wrong type (expected type \"string\")") + return nil, errors.New("Failed to initialize \"azure.subscription.authorizationService.roleDefinition.permission\", its \"__id\" argument has the wrong type (expected type \"string\")") } id = idVal default: - return nil, errors.New("Initialized azure.authorization.roleDefinition.permission with unknown argument " + name) + return nil, errors.New("Initialized azure.subscription.authorizationService.roleDefinition.permission with unknown argument " + name) } res.Cache.Store(name, &resources.CacheEntry{Data: val, Valid: true, Timestamp: now}) } @@ -20960,30 +22433,30 @@ func newAzureAuthorizationRoleDefinitionPermission(runtime *resources.Runtime, a return &res, nil } -func (s *mqlAzureAuthorizationRoleDefinitionPermission) Validate() error { +func (s *mqlAzureSubscriptionAuthorizationServiceRoleDefinitionPermission) Validate() error { // required arguments if _, ok := s.Cache.Load("id"); !ok { - return errors.New("Initialized \"azure.authorization.roleDefinition.permission\" resource without a \"id\". This field is required.") + return errors.New("Initialized \"azure.subscription.authorizationService.roleDefinition.permission\" resource without a \"id\". This field is required.") } if _, ok := s.Cache.Load("allowedActions"); !ok { - return errors.New("Initialized \"azure.authorization.roleDefinition.permission\" resource without a \"allowedActions\". This field is required.") + return errors.New("Initialized \"azure.subscription.authorizationService.roleDefinition.permission\" resource without a \"allowedActions\". This field is required.") } if _, ok := s.Cache.Load("deniedActions"); !ok { - return errors.New("Initialized \"azure.authorization.roleDefinition.permission\" resource without a \"deniedActions\". This field is required.") + return errors.New("Initialized \"azure.subscription.authorizationService.roleDefinition.permission\" resource without a \"deniedActions\". This field is required.") } if _, ok := s.Cache.Load("allowedDataActions"); !ok { - return errors.New("Initialized \"azure.authorization.roleDefinition.permission\" resource without a \"allowedDataActions\". This field is required.") + return errors.New("Initialized \"azure.subscription.authorizationService.roleDefinition.permission\" resource without a \"allowedDataActions\". This field is required.") } if _, ok := s.Cache.Load("deniedDataActions"); !ok { - return errors.New("Initialized \"azure.authorization.roleDefinition.permission\" resource without a \"deniedDataActions\". This field is required.") + return errors.New("Initialized \"azure.subscription.authorizationService.roleDefinition.permission\" resource without a \"deniedDataActions\". This field is required.") } return nil } // Register accessor autogenerated -func (s *mqlAzureAuthorizationRoleDefinitionPermission) Register(name string) error { - log.Trace().Str("field", name).Msg("[azure.authorization.roleDefinition.permission].Register") +func (s *mqlAzureSubscriptionAuthorizationServiceRoleDefinitionPermission) Register(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.authorizationService.roleDefinition.permission].Register") switch name { case "id": return nil @@ -20996,13 +22469,13 @@ func (s *mqlAzureAuthorizationRoleDefinitionPermission) Register(name string) er case "deniedDataActions": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.authorization.roleDefinition.permission\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.authorizationService.roleDefinition.permission\" resource") } } // Field accessor autogenerated -func (s *mqlAzureAuthorizationRoleDefinitionPermission) Field(name string) (interface{}, error) { - log.Trace().Str("field", name).Msg("[azure.authorization.roleDefinition.permission].Field") +func (s *mqlAzureSubscriptionAuthorizationServiceRoleDefinitionPermission) Field(name string) (interface{}, error) { + log.Trace().Str("field", name).Msg("[azure.subscription.authorizationService.roleDefinition.permission].Field") switch name { case "id": return s.Id() @@ -21015,93 +22488,93 @@ func (s *mqlAzureAuthorizationRoleDefinitionPermission) Field(name string) (inte case "deniedDataActions": return s.DeniedDataActions() default: - return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.authorization.roleDefinition.permission\" resource") + return nil, fmt.Errorf("Cannot find field '" + name + "' in \"azure.subscription.authorizationService.roleDefinition.permission\" resource") } } // Id accessor autogenerated -func (s *mqlAzureAuthorizationRoleDefinitionPermission) Id() (string, error) { +func (s *mqlAzureSubscriptionAuthorizationServiceRoleDefinitionPermission) Id() (string, error) { res, ok := s.Cache.Load("id") if !ok || !res.Valid { - return "", errors.New("\"azure.authorization.roleDefinition.permission\" failed: no value provided for static field \"id\"") + return "", errors.New("\"azure.subscription.authorizationService.roleDefinition.permission\" failed: no value provided for static field \"id\"") } if res.Error != nil { return "", res.Error } tres, ok := res.Data.(string) if !ok { - return "", fmt.Errorf("\"azure.authorization.roleDefinition.permission\" failed to cast field \"id\" to the right type (string): %#v", res) + return "", fmt.Errorf("\"azure.subscription.authorizationService.roleDefinition.permission\" failed to cast field \"id\" to the right type (string): %#v", res) } return tres, nil } // AllowedActions accessor autogenerated -func (s *mqlAzureAuthorizationRoleDefinitionPermission) AllowedActions() ([]interface{}, error) { +func (s *mqlAzureSubscriptionAuthorizationServiceRoleDefinitionPermission) AllowedActions() ([]interface{}, error) { res, ok := s.Cache.Load("allowedActions") if !ok || !res.Valid { - return nil, errors.New("\"azure.authorization.roleDefinition.permission\" failed: no value provided for static field \"allowedActions\"") + return nil, errors.New("\"azure.subscription.authorizationService.roleDefinition.permission\" failed: no value provided for static field \"allowedActions\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.authorization.roleDefinition.permission\" failed to cast field \"allowedActions\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.authorizationService.roleDefinition.permission\" failed to cast field \"allowedActions\" to the right type ([]interface{}): %#v", res) } return tres, nil } // DeniedActions accessor autogenerated -func (s *mqlAzureAuthorizationRoleDefinitionPermission) DeniedActions() ([]interface{}, error) { +func (s *mqlAzureSubscriptionAuthorizationServiceRoleDefinitionPermission) DeniedActions() ([]interface{}, error) { res, ok := s.Cache.Load("deniedActions") if !ok || !res.Valid { - return nil, errors.New("\"azure.authorization.roleDefinition.permission\" failed: no value provided for static field \"deniedActions\"") + return nil, errors.New("\"azure.subscription.authorizationService.roleDefinition.permission\" failed: no value provided for static field \"deniedActions\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.authorization.roleDefinition.permission\" failed to cast field \"deniedActions\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.authorizationService.roleDefinition.permission\" failed to cast field \"deniedActions\" to the right type ([]interface{}): %#v", res) } return tres, nil } // AllowedDataActions accessor autogenerated -func (s *mqlAzureAuthorizationRoleDefinitionPermission) AllowedDataActions() ([]interface{}, error) { +func (s *mqlAzureSubscriptionAuthorizationServiceRoleDefinitionPermission) AllowedDataActions() ([]interface{}, error) { res, ok := s.Cache.Load("allowedDataActions") if !ok || !res.Valid { - return nil, errors.New("\"azure.authorization.roleDefinition.permission\" failed: no value provided for static field \"allowedDataActions\"") + return nil, errors.New("\"azure.subscription.authorizationService.roleDefinition.permission\" failed: no value provided for static field \"allowedDataActions\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.authorization.roleDefinition.permission\" failed to cast field \"allowedDataActions\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.authorizationService.roleDefinition.permission\" failed to cast field \"allowedDataActions\" to the right type ([]interface{}): %#v", res) } return tres, nil } // DeniedDataActions accessor autogenerated -func (s *mqlAzureAuthorizationRoleDefinitionPermission) DeniedDataActions() ([]interface{}, error) { +func (s *mqlAzureSubscriptionAuthorizationServiceRoleDefinitionPermission) DeniedDataActions() ([]interface{}, error) { res, ok := s.Cache.Load("deniedDataActions") if !ok || !res.Valid { - return nil, errors.New("\"azure.authorization.roleDefinition.permission\" failed: no value provided for static field \"deniedDataActions\"") + return nil, errors.New("\"azure.subscription.authorizationService.roleDefinition.permission\" failed: no value provided for static field \"deniedDataActions\"") } if res.Error != nil { return nil, res.Error } tres, ok := res.Data.([]interface{}) if !ok { - return nil, fmt.Errorf("\"azure.authorization.roleDefinition.permission\" failed to cast field \"deniedDataActions\" to the right type ([]interface{}): %#v", res) + return nil, fmt.Errorf("\"azure.subscription.authorizationService.roleDefinition.permission\" failed to cast field \"deniedDataActions\" to the right type ([]interface{}): %#v", res) } return tres, nil } // Compute accessor autogenerated -func (s *mqlAzureAuthorizationRoleDefinitionPermission) MqlCompute(name string) error { - log.Trace().Str("field", name).Msg("[azure.authorization.roleDefinition.permission].MqlCompute") +func (s *mqlAzureSubscriptionAuthorizationServiceRoleDefinitionPermission) MqlCompute(name string) error { + log.Trace().Str("field", name).Msg("[azure.subscription.authorizationService.roleDefinition.permission].MqlCompute") switch name { case "id": return nil @@ -21114,7 +22587,7 @@ func (s *mqlAzureAuthorizationRoleDefinitionPermission) MqlCompute(name string) case "deniedDataActions": return nil default: - return errors.New("Cannot find field '" + name + "' in \"azure.authorization.roleDefinition.permission\" resource") + return errors.New("Cannot find field '" + name + "' in \"azure.subscription.authorizationService.roleDefinition.permission\" resource") } } diff --git a/resources/packs/azure/azure.lr.manifest.yaml b/resources/packs/azure/azure.lr.manifest.yaml index f18ac52811..8e730cc087 100755 --- a/resources/packs/azure/azure.lr.manifest.yaml +++ b/resources/packs/azure/azure.lr.manifest.yaml @@ -4,6 +4,7 @@ resources: cloudDefender: {} resourceGroups: {} resources: {} + subscription: {} min_mondoo_version: latest platform: name: @@ -34,7 +35,6 @@ resources: deniedActions: {} deniedDataActions: {} id: {} - is_private: true min_mondoo_version: latest platform: name: @@ -56,7 +56,6 @@ resources: id: {} name: {} notificationsByRole: {} - is_private: true min_mondoo_version: latest platform: name: @@ -81,7 +80,6 @@ resources: tags: {} type: {} zones: {} - is_private: true min_mondoo_version: latest platform: name: @@ -97,7 +95,6 @@ resources: properties: {} tags: {} type: {} - is_private: true min_mondoo_version: latest platform: name: @@ -123,7 +120,6 @@ resources: version: {} versions: {} x5t: {} - is_private: true min_mondoo_version: latest platform: name: @@ -143,7 +139,6 @@ resources: updated: {} version: {} versions: {} - is_private: true min_mondoo_version: latest platform: name: @@ -162,7 +157,6 @@ resources: updated: {} version: {} versions: {} - is_private: true min_mondoo_version: latest platform: name: @@ -180,7 +174,6 @@ resources: type: {} vaultName: {} vaultUri: {} - is_private: true min_mondoo_version: latest platform: name: @@ -199,7 +192,6 @@ resources: id: {} name: {} type: {} - is_private: true min_mondoo_version: latest platform: name: @@ -215,7 +207,6 @@ resources: properties: {} tags: {} type: {} - is_private: true min_mondoo_version: latest platform: name: @@ -232,7 +223,6 @@ resources: azure.monitor.activitylog: fields: alerts: {} - is_private: true min_mondoo_version: latest platform: name: @@ -248,7 +238,6 @@ resources: scopes: {} tags: {} type: {} - is_private: true min_mondoo_version: latest platform: name: @@ -260,7 +249,6 @@ resources: properties: {} storageAccount: {} type: {} - is_private: true min_mondoo_version: latest platform: name: @@ -274,7 +262,6 @@ resources: storageAccount: {} tags: {} type: {} - is_private: true min_mondoo_version: latest platform: name: @@ -294,7 +281,6 @@ resources: id: {} name: {} type: {} - is_private: true min_mondoo_version: latest platform: name: @@ -310,7 +296,6 @@ resources: properties: {} tags: {} type: {} - is_private: true min_mondoo_version: latest platform: name: @@ -326,7 +311,6 @@ resources: properties: {} tags: {} type: {} - is_private: true min_mondoo_version: latest platform: name: @@ -350,7 +334,6 @@ resources: tags: {} type: {} vm: {} - is_private: true min_mondoo_version: latest platform: name: @@ -367,7 +350,6 @@ resources: securityRules: {} tags: {} type: {} - is_private: true min_mondoo_version: latest platform: name: @@ -379,7 +361,6 @@ resources: id: {} name: {} properties: {} - is_private: true min_mondoo_version: latest platform: name: @@ -395,7 +376,6 @@ resources: provisioningState: {} tags: {} type: {} - is_private: true min_mondoo_version: latest platform: name: @@ -417,7 +397,6 @@ resources: targetResourceId: {} type: {} version: {} - is_private: true min_mondoo_version: latest platform: name: @@ -436,7 +415,6 @@ resources: id: {} name: {} type: {} - is_private: true min_mondoo_version: latest platform: name: @@ -452,7 +430,6 @@ resources: properties: {} tags: {} type: {} - is_private: true min_mondoo_version: latest platform: name: @@ -472,7 +449,6 @@ resources: sku: {} tags: {} type: {} - is_private: true min_mondoo_version: latest platform: name: @@ -486,7 +462,6 @@ resources: provisioningState: {} tags: {} type: {} - is_private: true min_mondoo_version: latest platform: name: @@ -509,7 +484,6 @@ resources: source: {} type: {} value: {} - is_private: true min_mondoo_version: latest platform: name: @@ -550,7 +524,6 @@ resources: type: {} usage: {} zoneRedundant: {} - is_private: true min_mondoo_version: latest platform: name: @@ -565,7 +538,6 @@ resources: nextResetTime: {} resourceName: {} unit: {} - is_private: true min_mondoo_version: latest platform: name: @@ -577,7 +549,6 @@ resources: name: {} startIpAddress: {} type: {} - is_private: true min_mondoo_version: latest platform: name: @@ -599,7 +570,6 @@ resources: threatDetectionPolicy: {} type: {} vulnerabilityAssessmentSettings: {} - is_private: true min_mondoo_version: latest platform: name: @@ -613,7 +583,6 @@ resources: sid: {} tenantId: {} type: {} - is_private: true min_mondoo_version: latest platform: name: @@ -629,7 +598,6 @@ resources: storageContainerPath: {} storageContainerSasKey: {} type: {} - is_private: true min_mondoo_version: latest platform: name: @@ -657,7 +625,6 @@ resources: tableProperties: {} tags: {} type: {} - is_private: true min_mondoo_version: latest platform: name: @@ -668,7 +635,6 @@ resources: id: {} logging: {} minuteMetrics: {} - is_private: true min_mondoo_version: latest platform: name: @@ -680,7 +646,6 @@ resources: containerRetentionDays: {} containerSoftDeletionEnabled: {} storageAccountId: {} - is_private: true min_mondoo_version: latest platform: name: @@ -691,7 +656,6 @@ resources: id: {} logging: {} minuteMetrics: {} - is_private: true min_mondoo_version: latest platform: name: @@ -704,7 +668,6 @@ resources: retentionPolicy: {} version: {} write: {} - is_private: true min_mondoo_version: latest platform: name: @@ -716,7 +679,6 @@ resources: includeAPIs: {} retentionPolicy: {} version: {} - is_private: true min_mondoo_version: latest platform: name: @@ -726,7 +688,6 @@ resources: enabled: {} id: {} retentionDays: {} - is_private: true min_mondoo_version: latest platform: name: @@ -737,7 +698,6 @@ resources: id: {} logging: {} minuteMetrics: {} - is_private: true min_mondoo_version: latest platform: name: @@ -749,64 +709,1660 @@ resources: name: {} properties: {} type: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription: + fields: + authorization: {} + authorizationSource: {} + cloudDefender: {} + compute: {} + id: {} + keyVault: {} + managedByTenants: {} + mariaDb: {} + monitor: {} + mySql: {} + name: {} + network: {} + postgreSql: {} + resourceGroups: {} + resources: {} + sql: {} + state: {} + storage: {} + subscriptionId: {} + subscriptionsPolicies: {} + tags: {} + tenantId: {} + web: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.authorization: + fields: + roleDefinitions: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.authorization.roleDefinition: + fields: + description: {} + id: {} + isCustom: {} + name: {} + permissions: {} + scopes: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.authorization.roleDefinition.permission: + fields: + allowedActions: {} + allowedDataActions: {} + deniedActions: {} + deniedDataActions: {} + id: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.authorizationService: + fields: + roleDefinitions: {} + subscriptionId: {} is_private: true min_mondoo_version: latest platform: name: - azure - azure.web: + azure.subscription.authorizationService.roleDefinition: fields: - apps: {} - availableRuntimes: {} + description: {} + id: {} + isCustom: {} + name: {} + permissions: {} + scopes: {} + is_private: true min_mondoo_version: latest platform: name: - azure - azure.web.appsite: + azure.subscription.authorizationService.roleDefinition.permission: + fields: + allowedActions: {} + allowedDataActions: {} + deniedActions: {} + deniedDataActions: {} + id: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.cloudDefender: + fields: + defenderForContainers: {} + defenderForServers: {} + monitoringAgentAutoProvision: {} + securityContacts: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.cloudDefender.securityContact: + fields: + alertNotifications: {} + emails: {} + id: {} + name: {} + notificationsByRole: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.cloudDefenderService: + fields: + defenderForContainers: {} + defenderForServers: {} + monitoringAgentAutoProvision: {} + securityContacts: {} + subscriptionId: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.cloudDefenderService.securityContact: + fields: + alertNotifications: {} + emails: {} + id: {} + name: {} + notificationsByRole: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.compute: + fields: + disks: {} + vms: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.compute.disk: fields: - applicationSettings: {} - authenticationSettings: {} - configuration: {} - connectionSettings: {} id: {} - identity: {} - kind: {} location: {} - metadata: {} + managedBy: {} + managedByExtended: {} name: {} properties: {} - stack: {} + sku: {} + tags: {} + type: {} + zones: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.compute.vm: + fields: + dataDisks: {} + extensions: {} + id: {} + location: {} + name: {} + osDisk: {} + properties: {} tags: {} type: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.computeService: + fields: + disks: {} + subscriptionId: {} + vms: {} is_private: true min_mondoo_version: latest platform: name: - azure - azure.web.appsiteauthsettings: + azure.subscription.computeService.disk: fields: id: {} - kind: {} + location: {} + managedBy: {} + managedByExtended: {} name: {} properties: {} + sku: {} + tags: {} type: {} + zones: {} is_private: true min_mondoo_version: latest platform: name: - azure - azure.web.appsiteconfig: + azure.subscription.computeService.vm: fields: + dataDisks: {} + extensions: {} id: {} - kind: {} + location: {} name: {} + osDisk: {} properties: {} + tags: {} type: {} is_private: true min_mondoo_version: latest platform: name: - azure + azure.subscription.keyvault: + fields: + vaults: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.keyvault.certificate: + fields: + certName: {} + created: {} + enabled: {} + expires: {} + id: {} + notBefore: {} + recoveryLevel: {} + tags: {} + updated: {} + version: {} + versions: {} + x5t: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.keyvault.key: + fields: + created: {} + enabled: {} + expires: {} + keyName: {} + kid: {} + managed: {} + notBefore: {} + recoveryLevel: {} + tags: {} + updated: {} + version: {} + versions: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.keyvault.secret: + fields: + contentType: {} + created: {} + enabled: {} + expires: {} + id: {} + managed: {} + notBefore: {} + secretName: {} + tags: {} + updated: {} + version: {} + versions: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.keyvault.vault: + fields: + certificates: {} + diagnosticSettings: {} + id: {} + keys: {} + location: {} + properties: {} + secrets: {} + tags: {} + type: {} + vaultName: {} + vaultUri: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.keyvaultService: + fields: + subscriptionId: {} + vaults: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.keyvaultService.certificate: + fields: + certName: {} + created: {} + enabled: {} + expires: {} + id: {} + notBefore: {} + recoveryLevel: {} + tags: {} + updated: {} + version: {} + versions: {} + x5t: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.keyvaultService.key: + fields: + created: {} + enabled: {} + expires: {} + keyName: {} + kid: {} + managed: {} + notBefore: {} + recoveryLevel: {} + tags: {} + updated: {} + version: {} + versions: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.keyvaultService.secret: + fields: + contentType: {} + created: {} + enabled: {} + expires: {} + id: {} + managed: {} + notBefore: {} + secretName: {} + tags: {} + updated: {} + version: {} + versions: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.keyvaultService.vault: + fields: + certificates: {} + diagnosticSettings: {} + id: {} + keys: {} + location: {} + properties: {} + secrets: {} + tags: {} + type: {} + vaultName: {} + vaultUri: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.mariadb: + fields: + servers: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.mariadb.database: + fields: + charset: {} + collation: {} + id: {} + name: {} + type: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.mariadb.server: + fields: + configuration: {} + databases: {} + firewallRules: {} + id: {} + location: {} + name: {} + properties: {} + tags: {} + type: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.mariadbService: + fields: + servers: {} + subscriptionId: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.mariadbService.database: + fields: + charset: {} + collation: {} + id: {} + name: {} + type: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.mariadbService.server: + fields: + configuration: {} + databases: {} + firewallRules: {} + id: {} + location: {} + name: {} + properties: {} + tags: {} + type: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.monitor: + fields: + activityLog: {} + diagnosticSettings: {} + logProfiles: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.monitor.activitylog: + fields: + alerts: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.monitor.activitylog.alert: + fields: + actions: {} + conditions: {} + description: {} + id: {} + location: {} + name: {} + scopes: {} + tags: {} + type: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.monitor.diagnosticsetting: + fields: + id: {} + name: {} + properties: {} + storageAccount: {} + type: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.monitor.logprofile: + fields: + id: {} + location: {} + name: {} + properties: {} + storageAccount: {} + tags: {} + type: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.monitorService: + fields: + activityLog: {} + diagnosticSettings: {} + logProfiles: {} + subscriptionId: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.monitorService.activitylog: + fields: + alerts: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.monitorService.activitylog.alert: + fields: + actions: {} + conditions: {} + description: {} + id: {} + location: {} + name: {} + scopes: {} + tags: {} + type: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.monitorService.diagnosticsetting: + fields: + id: {} + name: {} + properties: {} + storageAccount: {} + type: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.monitorService.logprofile: + fields: + id: {} + location: {} + name: {} + properties: {} + storageAccount: {} + tags: {} + type: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.mysql: + fields: + flexibleServers: {} + servers: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.mysql.database: + fields: + charset: {} + collation: {} + id: {} + name: {} + type: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.mysql.flexibleServer: + fields: + configuration: {} + databases: {} + firewallRules: {} + id: {} + location: {} + name: {} + properties: {} + tags: {} + type: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.mysql.server: + fields: + configuration: {} + databases: {} + firewallRules: {} + id: {} + location: {} + name: {} + properties: {} + tags: {} + type: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.mysqlService: + fields: + flexibleServers: {} + servers: {} + subscriptionId: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.mysqlService.database: + fields: + charset: {} + collation: {} + id: {} + name: {} + type: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.mysqlService.flexibleServer: + fields: + configuration: {} + databases: {} + firewallRules: {} + id: {} + location: {} + name: {} + properties: {} + tags: {} + type: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.mysqlService.server: + fields: + configuration: {} + databases: {} + firewallRules: {} + id: {} + location: {} + name: {} + properties: {} + tags: {} + type: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.network: + fields: + interfaces: {} + securityGroups: {} + watchers: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.network.interface: + fields: + etag: {} + id: {} + location: {} + name: {} + properties: {} + tags: {} + type: {} + vm: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.network.securitygroup: + fields: + defaultSecurityRules: {} + etag: {} + id: {} + interfaces: {} + location: {} + name: {} + properties: {} + securityRules: {} + tags: {} + type: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.network.securityrule: + fields: + destinationPortRange: {} + etag: {} + id: {} + name: {} + properties: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.network.watcher: + fields: + etag: {} + flowLogs: {} + id: {} + location: {} + name: {} + properties: {} + provisioningState: {} + tags: {} + type: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.network.watcher.flowlog: + fields: + analytics: {} + enabled: {} + etag: {} + format: {} + id: {} + location: {} + name: {} + provisioningState: {} + retentionPolicy: {} + storageAccountId: {} + tags: {} + targetResourceGuid: {} + targetResourceId: {} + type: {} + version: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.networkService: + fields: + interfaces: {} + securityGroups: {} + subscriptionId: {} + watchers: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.networkService.interface: + fields: + etag: {} + id: {} + location: {} + name: {} + properties: {} + tags: {} + type: {} + vm: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.networkService.securityGroup: + fields: + defaultSecurityRules: {} + etag: {} + id: {} + interfaces: {} + location: {} + name: {} + properties: {} + securityRules: {} + tags: {} + type: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.networkService.securitygroup: + fields: + defaultSecurityRules: {} + etag: {} + id: {} + interfaces: {} + location: {} + name: {} + properties: {} + securityRules: {} + tags: {} + type: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.networkService.securityrule: + fields: + destinationPortRange: {} + etag: {} + id: {} + name: {} + properties: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.networkService.watcher: + fields: + etag: {} + flowLogs: {} + id: {} + location: {} + name: {} + properties: {} + provisioningState: {} + tags: {} + type: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.networkService.watcher.flowlog: + fields: + analytics: {} + enabled: {} + etag: {} + format: {} + id: {} + location: {} + name: {} + provisioningState: {} + retentionPolicy: {} + storageAccountId: {} + tags: {} + targetResourceGuid: {} + targetResourceId: {} + type: {} + version: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.postgresql: + fields: + servers: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.postgresql.database: + fields: + charset: {} + collation: {} + id: {} + name: {} + type: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.postgresql.server: + fields: + configuration: {} + databases: {} + firewallRules: {} + id: {} + location: {} + name: {} + properties: {} + tags: {} + type: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.postgresqlService: + fields: + servers: {} + subscriptionId: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.postgresqlService.database: + fields: + charset: {} + collation: {} + id: {} + name: {} + type: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.postgresqlService.server: + fields: + configuration: {} + databases: {} + firewallRules: {} + id: {} + location: {} + name: {} + properties: {} + tags: {} + type: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.resource: + fields: + changedTime: {} + createdTime: {} + id: {} + identity: {} + kind: {} + location: {} + managedBy: {} + name: {} + plan: {} + provisioningState: {} + sku: {} + tags: {} + type: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.resourcegroup: + fields: + id: {} + location: {} + managedBy: {} + name: {} + provisioningState: {} + tags: {} + type: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.sql: + fields: + servers: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.sql.configuration: + fields: + allowedValues: {} + dataType: {} + defaultValue: {} + description: {} + id: {} + name: {} + source: {} + type: {} + value: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.sql.database: + fields: + advisor: {} + auditingPolicy: {} + collation: {} + connectionPolicy: {} + containmentState: {} + createMode: {} + creationDate: {} + currentServiceObjectiveId: {} + databaseId: {} + defaultSecondaryLocation: {} + earliestRestoreDate: {} + edition: {} + elasticPoolName: {} + failoverGroupId: {} + id: {} + maxSizeBytes: {} + name: {} + readScale: {} + recommendedIndex: {} + recoveryServicesRecoveryPointResourceId: {} + requestedServiceObjectiveId: {} + requestedServiceObjectiveName: {} + restorePointInTime: {} + sampleName: {} + serviceLevelObjective: {} + serviceTierAdvisors: {} + sourceDatabaseDeletionDate: {} + sourceDatabaseId: {} + status: {} + threatDetectionPolicy: {} + transparentDataEncryption: {} + type: {} + usage: {} + zoneRedundant: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.sql.databaseusage: + fields: + currentValue: {} + displayName: {} + id: {} + limit: {} + name: {} + nextResetTime: {} + resourceName: {} + unit: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.sql.firewallrule: + fields: + endIpAddress: {} + id: {} + name: {} + startIpAddress: {} + type: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.sql.server: + fields: + auditingPolicy: {} + azureAdAdministrators: {} + connectionPolicy: {} + databases: {} + encryptionProtector: {} + firewallRules: {} + id: {} + location: {} + name: {} + properties: {} + securityAlertPolicy: {} + tags: {} + threatDetectionPolicy: {} + type: {} + vulnerabilityAssessmentSettings: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.sql.server.administrator: + fields: + administratorType: {} + id: {} + login: {} + name: {} + sid: {} + tenantId: {} + type: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.sql.server.vulnerabilityassessmentsettings: + fields: + id: {} + mailSubscriptionAdmins: {} + name: {} + recurringScanEmails: {} + recurringScanEnabled: {} + storageAccountAccessKey: {} + storageContainerPath: {} + storageContainerSasKey: {} + type: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.sqlService: + fields: + servers: {} + subscriptionId: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.sqlService.configuration: + fields: + allowedValues: {} + dataType: {} + defaultValue: {} + description: {} + id: {} + name: {} + source: {} + type: {} + value: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.sqlService.database: + fields: + advisor: {} + auditingPolicy: {} + collation: {} + connectionPolicy: {} + containmentState: {} + createMode: {} + creationDate: {} + currentServiceObjectiveId: {} + databaseId: {} + defaultSecondaryLocation: {} + earliestRestoreDate: {} + edition: {} + elasticPoolName: {} + failoverGroupId: {} + id: {} + maxSizeBytes: {} + name: {} + readScale: {} + recommendedIndex: {} + recoveryServicesRecoveryPointResourceId: {} + requestedServiceObjectiveId: {} + requestedServiceObjectiveName: {} + restorePointInTime: {} + sampleName: {} + serviceLevelObjective: {} + serviceTierAdvisors: {} + sourceDatabaseDeletionDate: {} + sourceDatabaseId: {} + status: {} + threatDetectionPolicy: {} + transparentDataEncryption: {} + type: {} + usage: {} + zoneRedundant: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.sqlService.databaseusage: + fields: + currentValue: {} + displayName: {} + id: {} + limit: {} + name: {} + nextResetTime: {} + resourceName: {} + unit: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.sqlService.firewallrule: + fields: + endIpAddress: {} + id: {} + name: {} + startIpAddress: {} + type: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.sqlService.server: + fields: + auditingPolicy: {} + azureAdAdministrators: {} + connectionPolicy: {} + databases: {} + encryptionProtector: {} + firewallRules: {} + id: {} + location: {} + name: {} + properties: {} + securityAlertPolicy: {} + tags: {} + threatDetectionPolicy: {} + type: {} + vulnerabilityAssessmentSettings: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.sqlService.server.administrator: + fields: + administratorType: {} + id: {} + login: {} + name: {} + sid: {} + tenantId: {} + type: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.sqlService.server.vulnerabilityassessmentsettings: + fields: + id: {} + mailSubscriptionAdmins: {} + name: {} + recurringScanEmails: {} + recurringScanEnabled: {} + storageAccountAccessKey: {} + storageContainerPath: {} + storageContainerSasKey: {} + type: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.storage: + fields: + accounts: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.storage.account: + fields: + blobProperties: {} + containers: {} + dataProtection: {} + id: {} + identity: {} + kind: {} + location: {} + name: {} + properties: {} + queueProperties: {} + sku: {} + tableProperties: {} + tags: {} + type: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.storage.account.blobService.properties: + fields: + hourMetrics: {} + id: {} + logging: {} + minuteMetrics: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.storage.account.dataProtection: + fields: + blobRetentionDays: {} + blobSoftDeletionEnabled: {} + containerRetentionDays: {} + containerSoftDeletionEnabled: {} + storageAccountId: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.storage.account.queueService.properties: + fields: + hourMetrics: {} + id: {} + logging: {} + minuteMetrics: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.storage.account.service.properties.logging: + fields: + delete: {} + id: {} + read: {} + retentionPolicy: {} + version: {} + write: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.storage.account.service.properties.metrics: + fields: + enabled: {} + id: {} + includeAPIs: {} + retentionPolicy: {} + version: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.storage.account.service.properties.retentionPolicy: + fields: + enabled: {} + id: {} + retentionDays: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.storage.account.tableService.properties: + fields: + hourMetrics: {} + id: {} + logging: {} + minuteMetrics: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.storage.container: + fields: + etag: {} + id: {} + name: {} + properties: {} + type: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.storageService: + fields: + accounts: {} + subscriptionId: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.storageService.account: + fields: + blobProperties: {} + containers: {} + dataProtection: {} + id: {} + identity: {} + kind: {} + location: {} + name: {} + properties: {} + queueProperties: {} + sku: {} + tableProperties: {} + tags: {} + type: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.storageService.account.blobService.properties: + fields: + hourMetrics: {} + id: {} + logging: {} + minuteMetrics: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.storageService.account.container: + fields: + etag: {} + id: {} + name: {} + properties: {} + type: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.storageService.account.dataProtection: + fields: + blobRetentionDays: {} + blobSoftDeletionEnabled: {} + containerRetentionDays: {} + containerSoftDeletionEnabled: {} + storageAccountId: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.storageService.account.queueService.properties: + fields: + hourMetrics: {} + id: {} + logging: {} + minuteMetrics: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.storageService.account.service.properties.logging: + fields: + delete: {} + id: {} + read: {} + retentionPolicy: {} + version: {} + write: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.storageService.account.service.properties.metrics: + fields: + enabled: {} + id: {} + includeAPIs: {} + retentionPolicy: {} + version: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.storageService.account.service.properties.retentionPolicy: + fields: + enabled: {} + id: {} + retentionDays: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.storageService.account.tableService.properties: + fields: + hourMetrics: {} + id: {} + logging: {} + minuteMetrics: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.storageService.container: + fields: + etag: {} + id: {} + name: {} + properties: {} + type: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.web: + fields: + apps: {} + availableRuntimes: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.web.appsite: + fields: + applicationSettings: {} + authenticationSettings: {} + configuration: {} + connectionSettings: {} + id: {} + identity: {} + kind: {} + location: {} + metadata: {} + name: {} + properties: {} + stack: {} + tags: {} + type: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.web.appsiteauthsettings: + fields: + id: {} + kind: {} + name: {} + properties: {} + type: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.web.appsiteconfig: + fields: + id: {} + kind: {} + name: {} + properties: {} + type: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.webService: + fields: + apps: {} + availableRuntimes: {} + subscriptionId: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.webService.appsite: + fields: + applicationSettings: {} + authenticationSettings: {} + configuration: {} + connectionSettings: {} + id: {} + identity: {} + kind: {} + location: {} + metadata: {} + name: {} + properties: {} + stack: {} + tags: {} + type: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.webService.appsiteauthsettings: + fields: + id: {} + kind: {} + name: {} + properties: {} + type: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.subscription.webService.appsiteconfig: + fields: + id: {} + kind: {} + name: {} + properties: {} + type: {} + is_private: true + min_mondoo_version: latest + platform: + name: + - azure + azure.web: + fields: + apps: {} + availableRuntimes: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.web.appsite: + fields: + applicationSettings: {} + authenticationSettings: {} + configuration: {} + connectionSettings: {} + id: {} + identity: {} + kind: {} + location: {} + metadata: {} + name: {} + properties: {} + stack: {} + tags: {} + type: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.web.appsiteauthsettings: + fields: + id: {} + kind: {} + name: {} + properties: {} + type: {} + min_mondoo_version: latest + platform: + name: + - azure + azure.web.appsiteconfig: + fields: + id: {} + kind: {} + name: {} + properties: {} + type: {} + min_mondoo_version: latest + platform: + name: + - azure azuread: fields: applications: {} diff --git a/resources/packs/azure/azure_authorization.go b/resources/packs/azure/azure_authorization.go index 276cef31c7..5194555431 100644 --- a/resources/packs/azure/azure_authorization.go +++ b/resources/packs/azure/azure_authorization.go @@ -10,12 +10,31 @@ import ( "go.mondoo.com/cnquery/resources/packs/core" ) -func (a *mqlAzureAuthorization) id() (string, error) { - return "azure.authorization", nil +func (a *mqlAzureSubscriptionAuthorizationService) init(args *resources.Args) (*resources.Args, AzureSubscriptionAuthorizationService, error) { + if len(*args) > 0 { + return args, nil, nil + } + + at, err := azureTransport(a.MotorRuntime.Motor.Provider) + if err != nil { + return nil, nil, err + } + + (*args)["subscriptionId"] = at.SubscriptionID() + + return args, nil, nil +} + +func (a *mqlAzureSubscriptionAuthorizationService) id() (string, error) { + subId, err := a.SubscriptionId() + if err != nil { + return "", err + } + return fmt.Sprintf("/subscriptions/%s/authorizationService", subId), nil } // note: requires Microsoft.Authorization/roleDefinitions/read to read role definitions -func (a *mqlAzureAuthorization) GetRoleDefinitions() (interface{}, error) { +func (a *mqlAzureSubscriptionAuthorizationService) GetRoleDefinitions() (interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -52,7 +71,7 @@ func (a *mqlAzureAuthorization) GetRoleDefinitions() (interface{}, error) { } permissions := []interface{}{} for idx, p := range roleDef.Properties.Permissions { - id := fmt.Sprintf("%s/azure.authorization.roleDefinition.permission/%d", *roleDef.ID, idx) + id := fmt.Sprintf("%s/azure.subscription.authorization.roleDefinition.permission/%d", *roleDef.ID, idx) permission, err := azureToMqlPermission(a.MotorRuntime, id, p) if err != nil { return nil, err @@ -62,7 +81,7 @@ func (a *mqlAzureAuthorization) GetRoleDefinitions() (interface{}, error) { if isCustom { isCustom = true } - mqlRoleDefinition, err := a.MotorRuntime.CreateResource("azure.authorization.roleDefinition", + mqlRoleDefinition, err := a.MotorRuntime.CreateResource("azure.subscription.authorizationService.roleDefinition", "id", core.ToString(roleDef.ID), "name", core.ToString(roleDef.Properties.RoleName), "description", core.ToString(roleDef.Properties.Description), @@ -106,7 +125,7 @@ func azureToMqlPermission(runtime *resources.Runtime, id string, permission *aut } } - p, err := runtime.CreateResource("azure.authorization.roleDefinition.permission", + p, err := runtime.CreateResource("azure.subscription.authorizationService.roleDefinition.permission", "id", id, "allowedActions", allowedActions, "deniedActions", deniedActions, @@ -118,10 +137,10 @@ func azureToMqlPermission(runtime *resources.Runtime, id string, permission *aut return p, nil } -func (a *mqlAzureAuthorizationRoleDefinition) id() (string, error) { +func (a *mqlAzureSubscriptionAuthorizationServiceRoleDefinition) id() (string, error) { return a.Id() } -func (a *mqlAzureAuthorizationRoleDefinitionPermission) id() (string, error) { +func (a *mqlAzureSubscriptionAuthorizationServiceRoleDefinitionPermission) id() (string, error) { return a.Id() } diff --git a/resources/packs/azure/azure_cloud_defender.go b/resources/packs/azure/azure_cloud_defender.go index 1fedc4d128..3ab5d52387 100644 --- a/resources/packs/azure/azure_cloud_defender.go +++ b/resources/packs/azure/azure_cloud_defender.go @@ -17,6 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" security "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" + "go.mondoo.com/cnquery/resources" "go.mondoo.com/cnquery/resources/packs/core" ) @@ -31,11 +32,30 @@ const ( kubernetesClusterPolicyExtensonDefinitionId string = "/providers/Microsoft.Authorization/policyDefinitions/0adc5395-9169-4b9b-8687-af838d69410a" ) -func (a *mqlAzureCloudDefender) id() (string, error) { - return "azure.cloudDefender", nil +func (a *mqlAzureSubscriptionCloudDefenderService) init(args *resources.Args) (*resources.Args, AzureSubscriptionCloudDefenderService, error) { + if len(*args) > 0 { + return args, nil, nil + } + + at, err := azureTransport(a.MotorRuntime.Motor.Provider) + if err != nil { + return nil, nil, err + } + + (*args)["subscriptionId"] = at.SubscriptionID() + + return args, nil, nil +} + +func (a *mqlAzureSubscriptionCloudDefenderService) id() (string, error) { + subId, err := a.SubscriptionId() + if err != nil { + return "", err + } + return fmt.Sprintf("/subscriptions/%s/cloudDefenderService", subId), nil } -func (a *mqlAzureCloudDefender) GetMonitoringAgentAutoProvision() (interface{}, error) { +func (a *mqlAzureSubscriptionCloudDefenderService) GetMonitoringAgentAutoProvision() (interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -59,7 +79,7 @@ func (a *mqlAzureCloudDefender) GetMonitoringAgentAutoProvision() (interface{}, return autoProvision == security.AutoProvisionOn, nil } -func (a *mqlAzureCloudDefender) GetDefenderForContainers() (interface{}, error) { +func (a *mqlAzureSubscriptionCloudDefenderService) GetDefenderForContainers() (interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -117,7 +137,7 @@ func (a *mqlAzureCloudDefender) GetDefenderForContainers() (interface{}, error) return core.JsonToDict(def) } -func (a *mqlAzureCloudDefender) GetDefenderForServers() (interface{}, error) { +func (a *mqlAzureSubscriptionCloudDefenderService) GetDefenderForServers() (interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -166,7 +186,7 @@ func (a *mqlAzureCloudDefender) GetDefenderForServers() (interface{}, error) { return core.JsonToDict(resp) } -func (a *mqlAzureCloudDefender) GetSecurityContacts() (interface{}, error) { +func (a *mqlAzureSubscriptionCloudDefenderService) GetSecurityContacts() (interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -202,7 +222,7 @@ func (a *mqlAzureCloudDefender) GetSecurityContacts() (interface{}, error) { if contact.Properties.Emails != nil { mails = *contact.Properties.Emails } - mqlSecurityContact, err := a.MotorRuntime.CreateResource("azure.cloudDefender.securityContact", + mqlSecurityContact, err := a.MotorRuntime.CreateResource("azure.subscription.cloudDefenderService.securityContact", "id", core.ToString(contact.ID), "name", core.ToString(contact.Name), "emails", core.StrSliceToInterface(strings.Split(mails, ";")), @@ -217,7 +237,7 @@ func (a *mqlAzureCloudDefender) GetSecurityContacts() (interface{}, error) { return res, nil } -func (a *mqlAzureCloudDefenderSecurityContact) id() (string, error) { +func (a *mqlAzureSubscriptionCloudDefenderServiceSecurityContact) id() (string, error) { return a.Id() } diff --git a/resources/packs/azure/azure_resource_groups.go b/resources/packs/azure/azure_resource_groups.go deleted file mode 100644 index 024d22e1e0..0000000000 --- a/resources/packs/azure/azure_resource_groups.go +++ /dev/null @@ -1,57 +0,0 @@ -package azure - -import ( - "context" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - resources "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources" - "go.mondoo.com/cnquery/resources/packs/core" -) - -func (a *mqlAzure) GetResourceGroups() ([]interface{}, error) { - at, err := azureTransport(a.MotorRuntime.Motor.Provider) - if err != nil { - return nil, err - } - - ctx := context.Background() - token, err := at.GetTokenCredential() - if err != nil { - return nil, err - } - - client, err := resources.NewResourceGroupsClient(at.SubscriptionID(), token, &arm.ClientOptions{}) - if err != nil { - return nil, err - } - - pager := client.NewListPager(&resources.ResourceGroupsClientListOptions{}) - res := []interface{}{} - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - return nil, err - } - for _, rg := range page.Value { - mqlAzure, err := a.MotorRuntime.CreateResource("azure.resourcegroup", - "id", core.ToString(rg.ID), - "name", core.ToString(rg.Name), - "location", core.ToString(rg.Location), - "tags", azureTagsToInterface(rg.Tags), - "type", core.ToString(rg.Type), - "managedBy", core.ToString(rg.ManagedBy), - "provisioningState", core.ToString(rg.Properties.ProvisioningState), - ) - if err != nil { - return nil, err - } - res = append(res, mqlAzure) - } - } - - return res, nil -} - -func (a *mqlAzureResourcegroup) id() (string, error) { - return a.Id() -} diff --git a/resources/packs/azure/azure_rm.go b/resources/packs/azure/azure_rm.go deleted file mode 100644 index 23c6448868..0000000000 --- a/resources/packs/azure/azure_rm.go +++ /dev/null @@ -1,17 +0,0 @@ -package azure - -import ( - "go.mondoo.com/cnquery/resources/packs/core" -) - -func (a *mqlAzure) id() (string, error) { - return "azure", nil -} - -func azureTagsToInterface(data map[string]*string) map[string]interface{} { - labels := make(map[string]interface{}) - for key := range data { - labels[key] = core.ToString(data[key]) - } - return labels -} diff --git a/resources/packs/azure/azure_rm_compute.go b/resources/packs/azure/azure_rm_compute.go index a742c865dd..966f8aecac 100644 --- a/resources/packs/azure/azure_rm_compute.go +++ b/resources/packs/azure/azure_rm_compute.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "errors" + "fmt" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" compute "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute" @@ -13,11 +14,30 @@ import ( "go.mondoo.com/cnquery/resources/packs/core" ) -func (a *mqlAzureCompute) id() (string, error) { - return "azure.compute", nil +func (a *mqlAzureSubscriptionComputeService) init(args *resources.Args) (*resources.Args, AzureSubscriptionComputeService, error) { + if len(*args) > 0 { + return args, nil, nil + } + + at, err := azureTransport(a.MotorRuntime.Motor.Provider) + if err != nil { + return nil, nil, err + } + + (*args)["subscriptionId"] = at.SubscriptionID() + + return args, nil, nil +} + +func (a *mqlAzureSubscriptionComputeService) id() (string, error) { + subId, err := a.SubscriptionId() + if err != nil { + return "", err + } + return fmt.Sprintf("/subscriptions/%s/computeService", subId), nil } -func (a *mqlAzureCompute) GetDisks() ([]interface{}, error) { +func (a *mqlAzureSubscriptionComputeService) GetDisks() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -80,7 +100,7 @@ func diskToMql(runtime *resources.Runtime, disk compute.Disk) (resources.Resourc zones = append(zones, *z) } } - return runtime.CreateResource("azure.compute.disk", + return runtime.CreateResource("azure.subscription.computeService.disk", "id", core.ToString(disk.ID), "name", core.ToString(disk.Name), "location", core.ToString(disk.Location), @@ -94,11 +114,11 @@ func diskToMql(runtime *resources.Runtime, disk compute.Disk) (resources.Resourc ) } -func (a *mqlAzureComputeDisk) id() (string, error) { +func (a *mqlAzureSubscriptionComputeServiceDisk) id() (string, error) { return a.Id() } -func (a *mqlAzureCompute) GetVms() ([]interface{}, error) { +func (a *mqlAzureSubscriptionComputeService) GetVms() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -129,7 +149,7 @@ func (a *mqlAzureCompute) GetVms() ([]interface{}, error) { return nil, err } - mqlAzureVm, err := a.MotorRuntime.CreateResource("azure.compute.vm", + mqlAzureVm, err := a.MotorRuntime.CreateResource("azure.subscription.computeService.vm", "id", core.ToString(vm.ID), "name", core.ToString(vm.Name), "location", core.ToString(vm.Location), @@ -147,11 +167,11 @@ func (a *mqlAzureCompute) GetVms() ([]interface{}, error) { return res, nil } -func (a *mqlAzureComputeVm) id() (string, error) { +func (a *mqlAzureSubscriptionComputeServiceVm) id() (string, error) { return a.Id() } -func (a *mqlAzureComputeVm) GetExtensions() ([]interface{}, error) { +func (a *mqlAzureSubscriptionComputeServiceVm) GetExtensions() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -210,7 +230,7 @@ func (a *mqlAzureComputeVm) GetExtensions() ([]interface{}, error) { return res, nil } -func (a *mqlAzureComputeVm) GetOsDisk() (interface{}, error) { +func (a *mqlAzureSubscriptionComputeServiceVm) GetOsDisk() (interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -264,7 +284,7 @@ func (a *mqlAzureComputeVm) GetOsDisk() (interface{}, error) { return diskToMql(a.MotorRuntime, disk.Disk) } -func (a *mqlAzureComputeVm) GetDataDisks() ([]interface{}, error) { +func (a *mqlAzureSubscriptionComputeServiceVm) GetDataDisks() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err diff --git a/resources/packs/azure/azure_rm_keyvault.go b/resources/packs/azure/azure_rm_keyvault.go index a1302659f6..8bfe6a342a 100644 --- a/resources/packs/azure/azure_rm_keyvault.go +++ b/resources/packs/azure/azure_rm_keyvault.go @@ -14,19 +14,39 @@ import ( keyvault "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault" azure "go.mondoo.com/cnquery/motor/providers/microsoft/azure" + "go.mondoo.com/cnquery/resources" "go.mondoo.com/cnquery/resources/packs/core" ) +func (a *mqlAzureSubscriptionKeyvaultService) init(args *resources.Args) (*resources.Args, AzureSubscriptionKeyvaultService, error) { + if len(*args) > 0 { + return args, nil, nil + } + + at, err := azureTransport(a.MotorRuntime.Motor.Provider) + if err != nil { + return nil, nil, err + } + + (*args)["subscriptionId"] = at.SubscriptionID() + + return args, nil, nil +} + // see https://github.com/Azure/azure-sdk-for-go/issues/8224 // type AzureStorageAccountProperties keyvault_vault.KeyPermissions // NOTE: the resourcemanager keyvault sdk lacks some functionality/fields for secrets, keys, certs. // NOTE: instead we use the keyvault/az(certificates/keys/secrets) modules even though they are still in beta. // NOTE: lets track https://github.com/Azure/azure-sdk-for-go/issues/19412 and see if there's any guidance there once its solved -func (a *mqlAzureKeyvault) id() (string, error) { - return "azure.keyvault", nil +func (a *mqlAzureSubscriptionKeyvaultService) id() (string, error) { + subId, err := a.SubscriptionId() + if err != nil { + return "", err + } + return fmt.Sprintf("/subscriptions/%s/keyVaultService", subId), nil } -func (a *mqlAzureKeyvault) GetVaults() ([]interface{}, error) { +func (a *mqlAzureSubscriptionKeyvaultService) GetVaults() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -51,7 +71,7 @@ func (a *mqlAzureKeyvault) GetVaults() ([]interface{}, error) { return nil, err } for _, entry := range page.Value { - mqlAzure, err := a.MotorRuntime.CreateResource("azure.keyvault.vault", + mqlAzure, err := a.MotorRuntime.CreateResource("azure.subscription.keyvaultService.vault", "id", core.ToString(entry.ID), // TODO: temporary "vaultName", core.ToString(entry.Name), @@ -68,11 +88,11 @@ func (a *mqlAzureKeyvault) GetVaults() ([]interface{}, error) { return res, nil } -func (a *mqlAzureKeyvaultVault) id() (string, error) { +func (a *mqlAzureSubscriptionKeyvaultServiceVault) id() (string, error) { return a.Id() } -func (a *mqlAzureKeyvaultVault) GetVaultUri() (string, error) { +func (a *mqlAzureSubscriptionKeyvaultServiceVault) GetVaultUri() (string, error) { name, err := a.VaultName() if err != nil { return "", err @@ -81,7 +101,7 @@ func (a *mqlAzureKeyvaultVault) GetVaultUri() (string, error) { return KVUri, nil } -func (a *mqlAzureKeyvaultVault) GetKeys() ([]interface{}, error) { +func (a *mqlAzureSubscriptionKeyvaultServiceVault) GetKeys() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -111,7 +131,7 @@ func (a *mqlAzureKeyvaultVault) GetKeys() ([]interface{}, error) { } for _, entry := range page.Value { - mqlAzure, err := a.MotorRuntime.CreateResource("azure.keyvault.key", + mqlAzure, err := a.MotorRuntime.CreateResource("azure.subscription.keyvaultService.key", "kid", core.ToString((*string)(entry.KID)), "managed", core.ToBool(entry.Attributes.Enabled), "tags", azureTagsToInterface(entry.Tags), @@ -133,7 +153,7 @@ func (a *mqlAzureKeyvaultVault) GetKeys() ([]interface{}, error) { return res, nil } -func (a *mqlAzureKeyvaultVault) GetCertificates() ([]interface{}, error) { +func (a *mqlAzureSubscriptionKeyvaultServiceVault) GetCertificates() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -158,7 +178,7 @@ func (a *mqlAzureKeyvaultVault) GetCertificates() ([]interface{}, error) { return nil, err } for _, entry := range page.Value { - mqlAzure, err := a.MotorRuntime.CreateResource("azure.keyvault.certificate", + mqlAzure, err := a.MotorRuntime.CreateResource("azure.subscription.keyvaultService.certificate", "id", core.ToString((*string)(entry.ID)), "tags", azureTagsToInterface(entry.Tags), "x5t", hex.EncodeToString(entry.X509Thumbprint), @@ -179,7 +199,7 @@ func (a *mqlAzureKeyvaultVault) GetCertificates() ([]interface{}, error) { return res, nil } -func (a *mqlAzureKeyvaultVault) GetSecrets() ([]interface{}, error) { +func (a *mqlAzureSubscriptionKeyvaultServiceVault) GetSecrets() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -209,7 +229,7 @@ func (a *mqlAzureKeyvaultVault) GetSecrets() ([]interface{}, error) { return nil, err } for _, entry := range page.Value { - mqlAzure, err := a.MotorRuntime.CreateResource("azure.keyvault.secret", + mqlAzure, err := a.MotorRuntime.CreateResource("azure.subscription.keyvaultService.secret", "id", core.ToString((*string)(entry.ID)), "tags", azureTagsToInterface(entry.Tags), "contentType", core.ToString(entry.ContentType), @@ -230,7 +250,7 @@ func (a *mqlAzureKeyvaultVault) GetSecrets() ([]interface{}, error) { return res, nil } -func (a *mqlAzureKeyvaultVault) GetProperties() (map[string]interface{}, error) { +func (a *mqlAzureSubscriptionKeyvaultServiceVault) GetProperties() (map[string]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -270,7 +290,7 @@ func (a *mqlAzureKeyvaultVault) GetProperties() (map[string]interface{}, error) return core.JsonToDict(vault.Properties) } -func (a *mqlAzureKeyvaultVault) GetDiagnosticSettings() ([]interface{}, error) { +func (a *mqlAzureSubscriptionKeyvaultServiceVault) GetDiagnosticSettings() ([]interface{}, error) { // id is a azure resource id id, err := a.Id() if err != nil { @@ -281,11 +301,11 @@ func (a *mqlAzureKeyvaultVault) GetDiagnosticSettings() ([]interface{}, error) { return diagnosticsSettings(a.MotorRuntime, id) } -func (a *mqlAzureKeyvaultKey) id() (string, error) { +func (a *mqlAzureSubscriptionKeyvaultServiceKey) id() (string, error) { return a.Kid() } -func (a *mqlAzureKeyvaultKey) GetKeyName() (interface{}, error) { +func (a *mqlAzureSubscriptionKeyvaultServiceKey) GetKeyName() (interface{}, error) { // parse id "https://superdupervault.vault.azure.net/keys/sqltestkey" id, err := a.Kid() if err != nil { @@ -300,7 +320,7 @@ func (a *mqlAzureKeyvaultKey) GetKeyName() (interface{}, error) { return kvid.Name, nil } -func (a *mqlAzureKeyvaultKey) GetVersion() (interface{}, error) { +func (a *mqlAzureSubscriptionKeyvaultServiceKey) GetVersion() (interface{}, error) { id, err := a.Kid() if err != nil { return nil, err @@ -314,7 +334,7 @@ func (a *mqlAzureKeyvaultKey) GetVersion() (interface{}, error) { return kvid.Version, nil } -func (a *mqlAzureKeyvaultKey) GetVersions() ([]interface{}, error) { +func (a *mqlAzureSubscriptionKeyvaultServiceKey) GetVersions() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -354,7 +374,7 @@ func (a *mqlAzureKeyvaultKey) GetVersions() ([]interface{}, error) { return nil, err } for _, entry := range page.Value { - mqlAzure, err := a.MotorRuntime.CreateResource("azure.keyvault.key", + mqlAzure, err := a.MotorRuntime.CreateResource("azure.subscription.keyvaultService.key", "kid", core.ToString((*string)(entry.KID)), "managed", core.ToBool(entry.Attributes.Enabled), "tags", azureTagsToInterface(entry.Tags), @@ -376,12 +396,12 @@ func (a *mqlAzureKeyvaultKey) GetVersions() ([]interface{}, error) { return res, nil } -func (a *mqlAzureKeyvaultCertificate) id() (string, error) { +func (a *mqlAzureSubscriptionKeyvaultServiceCertificate) id() (string, error) { return a.Id() } // TODO: switch to name once the issue is solved in MQL -func (a *mqlAzureKeyvaultCertificate) GetCertName() (interface{}, error) { +func (a *mqlAzureSubscriptionKeyvaultServiceCertificate) GetCertName() (interface{}, error) { // parse id "https://superdupervault.vault.azure.net/certificates/testcertificate" id, err := a.Id() if err != nil { @@ -395,7 +415,7 @@ func (a *mqlAzureKeyvaultCertificate) GetCertName() (interface{}, error) { return kvid.Name, nil } -func (a *mqlAzureKeyvaultCertificate) GetVersion() (interface{}, error) { +func (a *mqlAzureSubscriptionKeyvaultServiceCertificate) GetVersion() (interface{}, error) { id, err := a.Id() if err != nil { return nil, err @@ -409,7 +429,7 @@ func (a *mqlAzureKeyvaultCertificate) GetVersion() (interface{}, error) { return kvid.Version, nil } -func (a *mqlAzureKeyvaultCertificate) GetX509() (interface{}, error) { +func (a *mqlAzureSubscriptionKeyvaultServiceCertificate) GetX509() (interface{}, error) { return nil, errors.New("not implemented") } @@ -439,7 +459,7 @@ func parseKeyVaultId(url string) (*keyvaultid, error) { }, nil } -func (a *mqlAzureKeyvaultCertificate) GetVersions() ([]interface{}, error) { +func (a *mqlAzureSubscriptionKeyvaultServiceCertificate) GetVersions() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -482,7 +502,7 @@ func (a *mqlAzureKeyvaultCertificate) GetVersions() ([]interface{}, error) { return nil, err } for _, entry := range page.Value { - mqlAzure, err := a.MotorRuntime.CreateResource("azure.keyvault.certificate", + mqlAzure, err := a.MotorRuntime.CreateResource("azure.subscription.keyvaultService.certificate", "id", core.ToString((*string)(entry.ID)), "tags", azureTagsToInterface(entry.Tags), "x5t", hex.EncodeToString(entry.X509Thumbprint), @@ -503,12 +523,12 @@ func (a *mqlAzureKeyvaultCertificate) GetVersions() ([]interface{}, error) { return res, nil } -func (a *mqlAzureKeyvaultSecret) id() (string, error) { +func (a *mqlAzureSubscriptionKeyvaultServiceSecret) id() (string, error) { return a.Id() } // TODO: switch to name once the issue is solved in MQL -func (a *mqlAzureKeyvaultSecret) GetSecretName() (interface{}, error) { +func (a *mqlAzureSubscriptionKeyvaultServiceSecret) GetSecretName() (interface{}, error) { // parse id "https://superdupervault.vault.azure.net/certificates/testcertificate" id, err := a.Id() if err != nil { @@ -523,7 +543,7 @@ func (a *mqlAzureKeyvaultSecret) GetSecretName() (interface{}, error) { return kvid.Name, nil } -func (a *mqlAzureKeyvaultSecret) GetVersion() (interface{}, error) { +func (a *mqlAzureSubscriptionKeyvaultServiceSecret) GetVersion() (interface{}, error) { id, err := a.Id() if err != nil { return nil, err @@ -537,7 +557,7 @@ func (a *mqlAzureKeyvaultSecret) GetVersion() (interface{}, error) { return kvid.Version, nil } -func (a *mqlAzureKeyvaultSecret) GetVersions() ([]interface{}, error) { +func (a *mqlAzureSubscriptionKeyvaultServiceSecret) GetVersions() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -583,7 +603,7 @@ func (a *mqlAzureKeyvaultSecret) GetVersions() ([]interface{}, error) { return nil, err } for _, entry := range page.Value { - mqlAzure, err := a.MotorRuntime.CreateResource("azure.keyvault.secret", + mqlAzure, err := a.MotorRuntime.CreateResource("azure.subscription.keyvaultService.secret", "id", core.ToString((*string)(entry.ID)), "tags", azureTagsToInterface(entry.Tags), "contentType", core.ToString(entry.ContentType), diff --git a/resources/packs/azure/azure_rm_mariadb.go b/resources/packs/azure/azure_rm_mariadb.go index 380b68cff0..47a7c9ef22 100644 --- a/resources/packs/azure/azure_rm_mariadb.go +++ b/resources/packs/azure/azure_rm_mariadb.go @@ -2,27 +2,48 @@ package azure import ( "context" + "fmt" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" mariadb "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mariadb/armmariadb" azure "go.mondoo.com/cnquery/motor/providers/microsoft/azure" + "go.mondoo.com/cnquery/resources" "go.mondoo.com/cnquery/resources/packs/core" ) -func (a *mqlAzureMariadb) id() (string, error) { - return "azure.mariadb", nil +func (a *mqlAzureSubscriptionMariadbService) init(args *resources.Args) (*resources.Args, AzureSubscriptionMariadbService, error) { + if len(*args) > 0 { + return args, nil, nil + } + + at, err := azureTransport(a.MotorRuntime.Motor.Provider) + if err != nil { + return nil, nil, err + } + + (*args)["subscriptionId"] = at.SubscriptionID() + + return args, nil, nil +} + +func (a *mqlAzureSubscriptionMariadbService) id() (string, error) { + subId, err := a.SubscriptionId() + if err != nil { + return "", err + } + return fmt.Sprintf("/subscriptions/%s/mariaDbService", subId), nil } -func (a *mqlAzureMariadbServer) id() (string, error) { +func (a *mqlAzureSubscriptionMariadbServiceServer) id() (string, error) { return a.Id() } -func (a *mqlAzureMariadbDatabase) id() (string, error) { +func (a *mqlAzureSubscriptionMariadbServiceDatabase) id() (string, error) { return a.Id() } -func (a *mqlAzureMariadb) GetServers() ([]interface{}, error) { +func (a *mqlAzureSubscriptionMariadbService) GetServers() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -51,7 +72,7 @@ func (a *mqlAzureMariadb) GetServers() ([]interface{}, error) { return nil, err } - mqlAzureDbServer, err := a.MotorRuntime.CreateResource("azure.mariadb.server", + mqlAzureDbServer, err := a.MotorRuntime.CreateResource("azure.subscription.mariadbService.server", "id", core.ToString(dbServer.ID), "name", core.ToString(dbServer.Name), "location", core.ToString(dbServer.Location), @@ -68,7 +89,7 @@ func (a *mqlAzureMariadb) GetServers() ([]interface{}, error) { return res, nil } -func (a *mqlAzureMariadbServer) GetConfiguration() ([]interface{}, error) { +func (a *mqlAzureSubscriptionMariadbServiceServer) GetConfiguration() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -109,7 +130,7 @@ func (a *mqlAzureMariadbServer) GetConfiguration() ([]interface{}, error) { return nil, err } for _, entry := range page.Value { - mqlAzureConfiguration, err := a.MotorRuntime.CreateResource("azure.sql.configuration", + mqlAzureConfiguration, err := a.MotorRuntime.CreateResource("azure.subscription.sqlService.configuration", "id", core.ToString(entry.ID), "name", core.ToString(entry.Name), "type", core.ToString(entry.Type), @@ -129,7 +150,7 @@ func (a *mqlAzureMariadbServer) GetConfiguration() ([]interface{}, error) { return res, nil } -func (a *mqlAzureMariadbServer) GetDatabases() ([]interface{}, error) { +func (a *mqlAzureSubscriptionMariadbServiceServer) GetDatabases() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -169,7 +190,7 @@ func (a *mqlAzureMariadbServer) GetDatabases() ([]interface{}, error) { return nil, err } for _, entry := range page.Value { - mqlAzureDatabase, err := a.MotorRuntime.CreateResource("azure.mariadb.database", + mqlAzureDatabase, err := a.MotorRuntime.CreateResource("azure.subscription.mariadbService.database", "id", core.ToString(entry.ID), "name", core.ToString(entry.Name), "type", core.ToString(entry.Type), @@ -186,7 +207,7 @@ func (a *mqlAzureMariadbServer) GetDatabases() ([]interface{}, error) { return res, nil } -func (a *mqlAzureMariadbServer) GetFirewallRules() ([]interface{}, error) { +func (a *mqlAzureSubscriptionMariadbServiceServer) GetFirewallRules() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -227,7 +248,7 @@ func (a *mqlAzureMariadbServer) GetFirewallRules() ([]interface{}, error) { return nil, err } for _, entry := range page.Value { - mqlAzureConfiguration, err := a.MotorRuntime.CreateResource("azure.sql.firewallrule", + mqlAzureConfiguration, err := a.MotorRuntime.CreateResource("azure.subscription.sqlService.firewallrule", "id", core.ToString(entry.ID), "name", core.ToString(entry.Name), "type", core.ToString(entry.Type), diff --git a/resources/packs/azure/azure_rm_monitor.go b/resources/packs/azure/azure_rm_monitor.go index 3132304582..7de7267046 100644 --- a/resources/packs/azure/azure_rm_monitor.go +++ b/resources/packs/azure/azure_rm_monitor.go @@ -2,6 +2,7 @@ package azure import ( "context" + "fmt" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" monitor "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor" @@ -9,11 +10,30 @@ import ( "go.mondoo.com/cnquery/resources/packs/core" ) -func (a *mqlAzureMonitor) id() (string, error) { - return "azure.monitor", nil +func (a *mqlAzureSubscriptionMonitorService) init(args *resources.Args) (*resources.Args, AzureSubscriptionMonitorService, error) { + if len(*args) > 0 { + return args, nil, nil + } + + at, err := azureTransport(a.MotorRuntime.Motor.Provider) + if err != nil { + return nil, nil, err + } + + (*args)["subscriptionId"] = at.SubscriptionID() + + return args, nil, nil +} + +func (a *mqlAzureSubscriptionMonitorService) id() (string, error) { + subId, err := a.SubscriptionId() + if err != nil { + return "", err + } + return fmt.Sprintf("/subscriptions/%s/monitorService", subId), nil } -func (a *mqlAzureMonitor) GetLogProfiles() ([]interface{}, error) { +func (a *mqlAzureSubscriptionMonitorService) GetLogProfiles() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -47,7 +67,7 @@ func (a *mqlAzureMonitor) GetLogProfiles() ([]interface{}, error) { var mqlAzureStorageAccount interface{} if entry.Properties != nil && entry.Properties.StorageAccountID != nil { // the resource fetches the data itself - mqlAzureStorageAccount, err = a.MotorRuntime.CreateResource("azure.storage.account", + mqlAzureStorageAccount, err = a.MotorRuntime.CreateResource("azure.subscription.storageService.account", "id", core.ToString(entry.Properties.StorageAccountID), ) if err != nil { @@ -55,7 +75,7 @@ func (a *mqlAzureMonitor) GetLogProfiles() ([]interface{}, error) { } } - mqlAzure, err := a.MotorRuntime.CreateResource("azure.monitor.logprofile", + mqlAzure, err := a.MotorRuntime.CreateResource("azure.subscription.monitorService.logprofile", "id", core.ToString(entry.ID), "name", core.ToString(entry.Name), "location", core.ToString(entry.Location), @@ -73,7 +93,7 @@ func (a *mqlAzureMonitor) GetLogProfiles() ([]interface{}, error) { return res, nil } -func (a *mqlAzureMonitor) GetDiagnosticSettings() ([]interface{}, error) { +func (a *mqlAzureSubscriptionMonitorService) GetDiagnosticSettings() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -81,19 +101,19 @@ func (a *mqlAzureMonitor) GetDiagnosticSettings() ([]interface{}, error) { return diagnosticsSettings(a.MotorRuntime, "/subscriptions/"+at.SubscriptionID()) } -func (a *mqlAzureMonitor) GetActivityLog() (interface{}, error) { - return a.MotorRuntime.CreateResource("azure.monitor.activitylog") +func (a *mqlAzureSubscriptionMonitorService) GetActivityLog() (interface{}, error) { + return a.MotorRuntime.CreateResource("azure.subscription.monitorService.activitylog") } -func (a *mqlAzureMonitorActivitylog) id() (string, error) { - return "azure.monitor.activitylog", nil +func (a *mqlAzureSubscriptionMonitorServiceActivitylog) id() (string, error) { + return "azure.subscription.monitorService.activitylog", nil } -func (a *mqlAzureMonitorActivitylogAlert) id() (string, error) { +func (a *mqlAzureSubscriptionMonitorServiceActivitylogAlert) id() (string, error) { return a.Id() } -func (a *mqlAzureMonitorActivitylog) GetAlerts() ([]interface{}, error) { +func (a *mqlAzureSubscriptionMonitorServiceActivitylog) GetAlerts() ([]interface{}, error) { // fetch the details at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { @@ -181,7 +201,7 @@ func (a *mqlAzureMonitorActivitylog) GetAlerts() ([]interface{}, error) { } conditionsDict = append(conditionsDict, dict) } - alert, err := a.MotorRuntime.CreateResource("azure.monitor.activitylog.alert", + alert, err := a.MotorRuntime.CreateResource("azure.subscription.monitorService.activitylog.alert", "conditions", conditionsDict, "id", core.ToString(entry.ID), "name", core.ToString(entry.Name), @@ -201,7 +221,7 @@ func (a *mqlAzureMonitorActivitylog) GetAlerts() ([]interface{}, error) { return res, nil } -func (a *mqlAzureMonitorLogprofile) id() (string, error) { +func (a *mqlAzureSubscriptionMonitorServiceLogprofile) id() (string, error) { return a.Id() } @@ -238,7 +258,7 @@ func diagnosticsSettings(runtime *resources.Runtime, id string) ([]interface{}, var mqlAzureStorageAccount interface{} if entry.Properties != nil && entry.Properties.StorageAccountID != nil { // the resource fetches the data itself - mqlAzureStorageAccount, err = runtime.CreateResource("azure.storage.account", + mqlAzureStorageAccount, err = runtime.CreateResource("azure.subscription.storageService.account", "id", core.ToString(entry.Properties.StorageAccountID), ) if err != nil { @@ -246,7 +266,7 @@ func diagnosticsSettings(runtime *resources.Runtime, id string) ([]interface{}, } } - mqlAzure, err := runtime.CreateResource("azure.monitor.diagnosticsetting", + mqlAzure, err := runtime.CreateResource("azure.subscription.monitorService.diagnosticsetting", "id", core.ToString(entry.ID), "name", core.ToString(entry.Name), "type", core.ToString(entry.Type), @@ -263,6 +283,6 @@ func diagnosticsSettings(runtime *resources.Runtime, id string) ([]interface{}, return res, nil } -func (a *mqlAzureMonitorDiagnosticsetting) id() (string, error) { +func (a *mqlAzureSubscriptionMonitorServiceDiagnosticsetting) id() (string, error) { return a.Id() } diff --git a/resources/packs/azure/azure_rm_mysql.go b/resources/packs/azure/azure_rm_mysql.go index 062f6a67ac..9978506d01 100644 --- a/resources/packs/azure/azure_rm_mysql.go +++ b/resources/packs/azure/azure_rm_mysql.go @@ -2,31 +2,52 @@ package azure import ( "context" + "fmt" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" mysql "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysql" flexible "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" azure "go.mondoo.com/cnquery/motor/providers/microsoft/azure" + "go.mondoo.com/cnquery/resources" "go.mondoo.com/cnquery/resources/packs/core" ) -func (a *mqlAzureMysql) id() (string, error) { - return "azure.mysql", nil +func (a *mqlAzureSubscriptionMysqlService) init(args *resources.Args) (*resources.Args, AzureSubscriptionMysqlService, error) { + if len(*args) > 0 { + return args, nil, nil + } + + at, err := azureTransport(a.MotorRuntime.Motor.Provider) + if err != nil { + return nil, nil, err + } + + (*args)["subscriptionId"] = at.SubscriptionID() + + return args, nil, nil +} + +func (a *mqlAzureSubscriptionMysqlService) id() (string, error) { + subId, err := a.SubscriptionId() + if err != nil { + return "", err + } + return fmt.Sprintf("/subscriptions/%s/mySqlService", subId), nil } -func (a *mqlAzureMysqlServer) id() (string, error) { +func (a *mqlAzureSubscriptionMysqlServiceServer) id() (string, error) { return a.Id() } -func (a *mqlAzureMysqlFlexibleServer) id() (string, error) { +func (a *mqlAzureSubscriptionMysqlServiceFlexibleServer) id() (string, error) { return a.Id() } -func (a *mqlAzureMysqlDatabase) id() (string, error) { +func (a *mqlAzureSubscriptionMysqlServiceDatabase) id() (string, error) { return a.Id() } -func (a *mqlAzureMysql) GetServers() ([]interface{}, error) { +func (a *mqlAzureSubscriptionMysqlService) GetServers() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -55,7 +76,7 @@ func (a *mqlAzureMysql) GetServers() ([]interface{}, error) { return nil, err } - mqlAzureDbServer, err := a.MotorRuntime.CreateResource("azure.mysql.server", + mqlAzureDbServer, err := a.MotorRuntime.CreateResource("azure.subscription.mysqlService.server", "id", core.ToString(dbServer.ID), "name", core.ToString(dbServer.Name), "location", core.ToString(dbServer.Location), @@ -72,7 +93,7 @@ func (a *mqlAzureMysql) GetServers() ([]interface{}, error) { return res, nil } -func (a *mqlAzureMysql) GetFlexibleServers() ([]interface{}, error) { +func (a *mqlAzureSubscriptionMysqlService) GetFlexibleServers() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -101,7 +122,7 @@ func (a *mqlAzureMysql) GetFlexibleServers() ([]interface{}, error) { return nil, err } - mqlAzureDbServer, err := a.MotorRuntime.CreateResource("azure.mysql.flexibleServer", + mqlAzureDbServer, err := a.MotorRuntime.CreateResource("azure.subscription.mysqlService.flexibleServer", "id", core.ToString(dbServer.ID), "name", core.ToString(dbServer.Name), "location", core.ToString(dbServer.Location), @@ -118,7 +139,7 @@ func (a *mqlAzureMysql) GetFlexibleServers() ([]interface{}, error) { return res, nil } -func (a *mqlAzureMysqlServer) GetConfiguration() ([]interface{}, error) { +func (a *mqlAzureSubscriptionMysqlServiceServer) GetConfiguration() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -158,7 +179,7 @@ func (a *mqlAzureMysqlServer) GetConfiguration() ([]interface{}, error) { return nil, err } for _, entry := range page.Value { - mqlAzureConfiguration, err := a.MotorRuntime.CreateResource("azure.sql.configuration", + mqlAzureConfiguration, err := a.MotorRuntime.CreateResource("azure.subscription.sqlService.configuration", "id", core.ToString(entry.ID), "name", core.ToString(entry.Name), "type", core.ToString(entry.Type), @@ -178,7 +199,7 @@ func (a *mqlAzureMysqlServer) GetConfiguration() ([]interface{}, error) { return res, nil } -func (a *mqlAzureMysqlServer) GetDatabases() ([]interface{}, error) { +func (a *mqlAzureSubscriptionMysqlServiceServer) GetDatabases() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -218,7 +239,7 @@ func (a *mqlAzureMysqlServer) GetDatabases() ([]interface{}, error) { return nil, err } for _, entry := range page.Value { - mqlAzureDatabase, err := a.MotorRuntime.CreateResource("azure.mysql.database", + mqlAzureDatabase, err := a.MotorRuntime.CreateResource("azure.subscription.mysqlService.database", "id", core.ToString(entry.ID), "name", core.ToString(entry.Name), "type", core.ToString(entry.Type), @@ -235,7 +256,7 @@ func (a *mqlAzureMysqlServer) GetDatabases() ([]interface{}, error) { return res, nil } -func (a *mqlAzureMysqlFlexibleServer) GetDatabases() ([]interface{}, error) { +func (a *mqlAzureSubscriptionMysqlServiceFlexibleServer) GetDatabases() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -275,7 +296,7 @@ func (a *mqlAzureMysqlFlexibleServer) GetDatabases() ([]interface{}, error) { return nil, err } for _, entry := range page.Value { - mqlAzureDatabase, err := a.MotorRuntime.CreateResource("azure.mysql.database", + mqlAzureDatabase, err := a.MotorRuntime.CreateResource("azure.subscription.mysqlService.database", "id", core.ToString(entry.ID), "name", core.ToString(entry.Name), "type", core.ToString(entry.Type), @@ -292,7 +313,7 @@ func (a *mqlAzureMysqlFlexibleServer) GetDatabases() ([]interface{}, error) { return res, nil } -func (a *mqlAzureMysqlServer) GetFirewallRules() ([]interface{}, error) { +func (a *mqlAzureSubscriptionMysqlServiceServer) GetFirewallRules() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -332,7 +353,7 @@ func (a *mqlAzureMysqlServer) GetFirewallRules() ([]interface{}, error) { return nil, err } for _, entry := range page.Value { - mqlAzureConfiguration, err := a.MotorRuntime.CreateResource("azure.sql.firewallrule", + mqlAzureConfiguration, err := a.MotorRuntime.CreateResource("azure.subscription.sqlService.firewallrule", "id", core.ToString(entry.ID), "name", core.ToString(entry.Name), "type", core.ToString(entry.Type), @@ -349,7 +370,7 @@ func (a *mqlAzureMysqlServer) GetFirewallRules() ([]interface{}, error) { return res, nil } -func (a *mqlAzureMysqlFlexibleServer) GetConfiguration() ([]interface{}, error) { +func (a *mqlAzureSubscriptionMysqlServiceFlexibleServer) GetConfiguration() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -389,7 +410,7 @@ func (a *mqlAzureMysqlFlexibleServer) GetConfiguration() ([]interface{}, error) return nil, err } for _, entry := range page.Value { - mqlAzureConfiguration, err := a.MotorRuntime.CreateResource("azure.sql.configuration", + mqlAzureConfiguration, err := a.MotorRuntime.CreateResource("azure.subscription.sqlService.configuration", "id", core.ToString(entry.ID), "name", core.ToString(entry.Name), "type", core.ToString(entry.Type), @@ -409,7 +430,7 @@ func (a *mqlAzureMysqlFlexibleServer) GetConfiguration() ([]interface{}, error) return res, nil } -func (a *mqlAzureMysqlFlexibleServer) GetFirewallRules() ([]interface{}, error) { +func (a *mqlAzureSubscriptionMysqlServiceFlexibleServer) GetFirewallRules() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -449,7 +470,7 @@ func (a *mqlAzureMysqlFlexibleServer) GetFirewallRules() ([]interface{}, error) return nil, err } for _, entry := range page.Value { - mqlAzureConfiguration, err := a.MotorRuntime.CreateResource("azure.sql.firewallrule", + mqlAzureConfiguration, err := a.MotorRuntime.CreateResource("azure.subscription.sqlService.firewallrule", "id", core.ToString(entry.ID), "name", core.ToString(entry.Name), "type", core.ToString(entry.Type), diff --git a/resources/packs/azure/azure_rm_network.go b/resources/packs/azure/azure_rm_network.go index a3acedc98f..23b0f62b55 100644 --- a/resources/packs/azure/azure_rm_network.go +++ b/resources/packs/azure/azure_rm_network.go @@ -3,6 +3,7 @@ package azure import ( "context" "errors" + "fmt" "strings" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" @@ -12,11 +13,30 @@ import ( "go.mondoo.com/cnquery/resources/packs/core" ) -func (a *mqlAzureNetwork) id() (string, error) { - return "azure.network", nil +func (a *mqlAzureSubscriptionNetworkService) init(args *resources.Args) (*resources.Args, AzureSubscriptionNetworkService, error) { + if len(*args) > 0 { + return args, nil, nil + } + + at, err := azureTransport(a.MotorRuntime.Motor.Provider) + if err != nil { + return nil, nil, err + } + + (*args)["subscriptionId"] = at.SubscriptionID() + + return args, nil, nil +} + +func (a *mqlAzureSubscriptionNetworkService) id() (string, error) { + subId, err := a.SubscriptionId() + if err != nil { + return "", err + } + return fmt.Sprintf("/subscriptions/%s/networkService", subId), nil } -func (a *mqlAzureNetwork) GetInterfaces() ([]interface{}, error) { +func (a *mqlAzureSubscriptionNetworkService) GetInterfaces() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -60,7 +80,7 @@ func azureIfaceToMql(runtime *resources.Runtime, iface network.Interface) (resou return nil, err } - return runtime.CreateResource("azure.network.interface", + return runtime.CreateResource("azure.subscription.networkService.interface", "id", core.ToString(iface.ID), "name", core.ToString(iface.Name), "location", core.ToString(iface.Location), @@ -71,7 +91,7 @@ func azureIfaceToMql(runtime *resources.Runtime, iface network.Interface) (resou ) } -func (a *mqlAzureNetwork) GetSecurityGroups() ([]interface{}, error) { +func (a *mqlAzureSubscriptionNetworkService) GetSecurityGroups() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -169,7 +189,7 @@ func azureSecGroupToMql(runtime *resources.Runtime, secGroup network.SecurityGro } } - return runtime.CreateResource("azure.network.securitygroup", + return runtime.CreateResource("azure.subscription.networkService.securityGroup", "id", core.ToString(secGroup.ID), "name", core.ToString(secGroup.Name), "location", core.ToString(secGroup.Location), @@ -201,7 +221,7 @@ func azureSecurityRuleToMql(runtime *resources.Runtime, secRule network.Security } } - return runtime.CreateResource("azure.network.securityrule", + return runtime.CreateResource("azure.subscription.networkService.securityrule", "id", core.ToString(secRule.ID), "name", core.ToString(secRule.Name), "etag", core.ToString(secRule.Etag), @@ -230,23 +250,23 @@ func parseAzureSecurityRulePortRange(portRange string) []AzureSecurityRulePortRa return res } -func (a *mqlAzureNetworkInterface) id() (string, error) { +func (a *mqlAzureSubscriptionNetworkServiceInterface) id() (string, error) { return a.Id() } -func (a *mqlAzureNetworkInterface) GetVm() (interface{}, error) { +func (a *mqlAzureSubscriptionNetworkServiceInterface) GetVm() (interface{}, error) { return nil, errors.New("not implemented") } -func (a *mqlAzureNetworkSecuritygroup) id() (string, error) { +func (a *mqlAzureSubscriptionNetworkServiceSecurityGroup) id() (string, error) { return a.Id() } -func (a *mqlAzureNetworkSecurityrule) id() (string, error) { +func (a *mqlAzureSubscriptionNetworkServiceSecurityrule) id() (string, error) { return a.Id() } -func (a *mqlAzureNetwork) GetWatchers() ([]interface{}, error) { +func (a *mqlAzureSubscriptionNetworkService) GetWatchers() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -275,7 +295,7 @@ func (a *mqlAzureNetwork) GetWatchers() ([]interface{}, error) { return nil, err } - mqlAzure, err := a.MotorRuntime.CreateResource("azure.network.watcher", + mqlAzure, err := a.MotorRuntime.CreateResource("azure.subscription.networkService.watcher", "id", core.ToString(watcher.ID), "name", core.ToString(watcher.Name), "location", core.ToString(watcher.Location), @@ -295,7 +315,7 @@ func (a *mqlAzureNetwork) GetWatchers() ([]interface{}, error) { return res, nil } -func (a *mqlAzureNetworkWatcher) GetFlowLogs() ([]interface{}, error) { +func (a *mqlAzureSubscriptionNetworkServiceWatcher) GetFlowLogs() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -362,7 +382,7 @@ func (a *mqlAzureNetworkWatcher) GetFlowLogs() ([]interface{}, error) { if err != nil { return nil, err } - mqlFlowLog, err := a.MotorRuntime.CreateResource("azure.network.watcher.flowlog", + mqlFlowLog, err := a.MotorRuntime.CreateResource("azure.subscription.networkService.watcher.flowlog", "id", core.ToString(flowLog.ID), "name", core.ToString(flowLog.Name), "location", core.ToString(flowLog.Location), @@ -389,10 +409,10 @@ func (a *mqlAzureNetworkWatcher) GetFlowLogs() ([]interface{}, error) { return res, nil } -func (a *mqlAzureNetworkWatcher) id() (string, error) { +func (a *mqlAzureSubscriptionNetworkServiceWatcher) id() (string, error) { return a.Id() } -func (a *mqlAzureNetworkWatcherFlowlog) id() (string, error) { +func (a *mqlAzureSubscriptionNetworkServiceWatcherFlowlog) id() (string, error) { return a.Id() } diff --git a/resources/packs/azure/azure_rm_postgres.go b/resources/packs/azure/azure_rm_postgres.go index fa932ad77c..d321b0de51 100644 --- a/resources/packs/azure/azure_rm_postgres.go +++ b/resources/packs/azure/azure_rm_postgres.go @@ -3,23 +3,44 @@ package azure import ( "context" "encoding/json" + "fmt" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" postgresql "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" azure "go.mondoo.com/cnquery/motor/providers/microsoft/azure" + "go.mondoo.com/cnquery/resources" "go.mondoo.com/cnquery/resources/packs/core" ) -func (a *mqlAzurePostgresql) id() (string, error) { - return "azure.postgresql", nil +func (a *mqlAzureSubscriptionPostgresqlService) init(args *resources.Args) (*resources.Args, AzureSubscriptionPostgresqlService, error) { + if len(*args) > 0 { + return args, nil, nil + } + + at, err := azureTransport(a.MotorRuntime.Motor.Provider) + if err != nil { + return nil, nil, err + } + + (*args)["subscriptionId"] = at.SubscriptionID() + + return args, nil, nil +} + +func (a *mqlAzureSubscriptionPostgresqlService) id() (string, error) { + subId, err := a.SubscriptionId() + if err != nil { + return "", err + } + return fmt.Sprintf("/subscriptions/%s/computeService", subId), nil } -func (a *mqlAzurePostgresqlDatabase) id() (string, error) { +func (a *mqlAzureSubscriptionPostgresqlServiceDatabase) id() (string, error) { return a.Id() } -func (a *mqlAzurePostgresql) GetServers() ([]interface{}, error) { +func (a *mqlAzureSubscriptionPostgresqlService) GetServers() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -56,7 +77,7 @@ func (a *mqlAzurePostgresql) GetServers() ([]interface{}, error) { return nil, err } - mqlAzureDbServer, err := a.MotorRuntime.CreateResource("azure.postgresql.server", + mqlAzureDbServer, err := a.MotorRuntime.CreateResource("azure.subscription.postgresqlService.server", "id", core.ToString(dbServer.ID), "name", core.ToString(dbServer.Name), "location", core.ToString(dbServer.Location), @@ -74,11 +95,11 @@ func (a *mqlAzurePostgresql) GetServers() ([]interface{}, error) { return res, nil } -func (a *mqlAzurePostgresqlServer) id() (string, error) { +func (a *mqlAzureSubscriptionPostgresqlServiceServer) id() (string, error) { return a.Id() } -func (a *mqlAzurePostgresqlServer) GetConfiguration() ([]interface{}, error) { +func (a *mqlAzureSubscriptionPostgresqlServiceServer) GetConfiguration() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -120,7 +141,7 @@ func (a *mqlAzurePostgresqlServer) GetConfiguration() ([]interface{}, error) { return nil, err } for _, entry := range page.Value { - mqlAzureConfiguration, err := a.MotorRuntime.CreateResource("azure.sql.configuration", + mqlAzureConfiguration, err := a.MotorRuntime.CreateResource("azure.subscription.sqlService.configuration", "id", core.ToString(entry.ID), "name", core.ToString(entry.Name), "type", core.ToString(entry.Type), @@ -141,7 +162,7 @@ func (a *mqlAzurePostgresqlServer) GetConfiguration() ([]interface{}, error) { return res, nil } -func (a *mqlAzurePostgresqlServer) GetDatabases() ([]interface{}, error) { +func (a *mqlAzureSubscriptionPostgresqlServiceServer) GetDatabases() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -181,7 +202,7 @@ func (a *mqlAzurePostgresqlServer) GetDatabases() ([]interface{}, error) { return nil, err } for _, entry := range page.Value { - mqlAzureDatabase, err := a.MotorRuntime.CreateResource("azure.postgresql.database", + mqlAzureDatabase, err := a.MotorRuntime.CreateResource("azure.subscription.postgresqlService.database", "id", core.ToString(entry.ID), "name", core.ToString(entry.Name), "type", core.ToString(entry.Type), @@ -198,7 +219,7 @@ func (a *mqlAzurePostgresqlServer) GetDatabases() ([]interface{}, error) { return res, nil } -func (a *mqlAzurePostgresqlServer) GetFirewallRules() ([]interface{}, error) { +func (a *mqlAzureSubscriptionPostgresqlServiceServer) GetFirewallRules() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -239,7 +260,7 @@ func (a *mqlAzurePostgresqlServer) GetFirewallRules() ([]interface{}, error) { return nil, err } for _, entry := range page.Value { - mqlAzureConfiguration, err := a.MotorRuntime.CreateResource("azure.sql.firewallrule", + mqlAzureConfiguration, err := a.MotorRuntime.CreateResource("azure.subscription.sqlService.firewallrule", "id", core.ToString(entry.ID), "name", core.ToString(entry.Name), "type", core.ToString(entry.Type), diff --git a/resources/packs/azure/azure_rm_resources.go b/resources/packs/azure/azure_rm_resources.go deleted file mode 100644 index f6518c7af7..0000000000 --- a/resources/packs/azure/azure_rm_resources.go +++ /dev/null @@ -1,84 +0,0 @@ -package azure - -import ( - "context" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - resources "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources" - "go.mondoo.com/cnquery/resources/packs/core" -) - -func (a *mqlAzure) GetResources() ([]interface{}, error) { - at, err := azureTransport(a.MotorRuntime.Motor.Provider) - if err != nil { - return nil, err - } - - ctx := context.Background() - token, err := at.GetTokenCredential() - if err != nil { - return nil, err - } - - client, err := resources.NewClient(at.SubscriptionID(), token, &arm.ClientOptions{}) - if err != nil { - return nil, err - } - - pager := client.NewListPager(&resources.ClientListOptions{}) - res := []interface{}{} - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - return nil, err - } - for _, resource := range page.Value { - - // NOTE: properties not not properly filled, therefore you would need to ask each individual resource: - // https://docs.microsoft.com/en-us/rest/api/resources/resources/getbyid - // In order to make it happen you need to support each individual type and their api version. Therefore - // we should not support that via the resource api but instead make sure those properties are properly - // exposed by the typed resources - sku, err := core.JsonToDict(resource.SKU) - if err != nil { - return nil, err - } - - plan, err := core.JsonToDict(resource.Plan) - if err != nil { - return nil, err - } - - identity, err := core.JsonToDict(resource.Identity) - if err != nil { - return nil, err - } - - mqlAzure, err := a.MotorRuntime.CreateResource("azure.resource", - "id", core.ToString(resource.ID), - "name", core.ToString(resource.Name), - "kind", core.ToString(resource.Kind), - "location", core.ToString(resource.Location), - "tags", azureTagsToInterface(resource.Tags), - "type", core.ToString(resource.Type), - "managedBy", core.ToString(resource.ManagedBy), - "sku", sku, - "plan", plan, - "identity", identity, - "provisioningState", core.ToString(resource.ProvisioningState), - "createdTime", resource.CreatedTime, - "changedTime", resource.ChangedTime, - ) - if err != nil { - return nil, err - } - res = append(res, mqlAzure) - } - } - - return res, nil -} - -func (a *mqlAzureResource) id() (string, error) { - return a.Id() -} diff --git a/resources/packs/azure/azure_rm_sql.go b/resources/packs/azure/azure_rm_sql.go index 07fa892d91..92b5cfee5d 100644 --- a/resources/packs/azure/azure_rm_sql.go +++ b/resources/packs/azure/azure_rm_sql.go @@ -3,31 +3,52 @@ package azure import ( "context" "errors" + "fmt" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" sql "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" "github.com/rs/zerolog/log" azure "go.mondoo.com/cnquery/motor/providers/microsoft/azure" + "go.mondoo.com/cnquery/resources" "go.mondoo.com/cnquery/resources/packs/core" ) -func (a *mqlAzureSql) id() (string, error) { - return "azure.sql", nil +func (a *mqlAzureSubscriptionSqlService) init(args *resources.Args) (*resources.Args, AzureSubscriptionSqlService, error) { + if len(*args) > 0 { + return args, nil, nil + } + + at, err := azureTransport(a.MotorRuntime.Motor.Provider) + if err != nil { + return nil, nil, err + } + + (*args)["subscriptionId"] = at.SubscriptionID() + + return args, nil, nil +} + +func (a *mqlAzureSubscriptionSqlService) id() (string, error) { + subId, err := a.SubscriptionId() + if err != nil { + return "", err + } + return fmt.Sprintf("/subscriptions/%s/sqlService", subId), nil } -func (a *mqlAzureSqlConfiguration) id() (string, error) { +func (a *mqlAzureSubscriptionSqlServiceConfiguration) id() (string, error) { return a.Id() } -func (a *mqlAzureSqlFirewallrule) id() (string, error) { +func (a *mqlAzureSubscriptionSqlServiceFirewallrule) id() (string, error) { return a.Id() } -func (a *mqlAzureSqlServerAdministrator) id() (string, error) { +func (a *mqlAzureSubscriptionSqlServiceServerAdministrator) id() (string, error) { return a.Id() } -func (a *mqlAzureSql) GetServers() ([]interface{}, error) { +func (a *mqlAzureSubscriptionSqlService) GetServers() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -56,7 +77,7 @@ func (a *mqlAzureSql) GetServers() ([]interface{}, error) { return nil, err } - mqlAzureDbServer, err := a.MotorRuntime.CreateResource("azure.sql.server", + mqlAzureDbServer, err := a.MotorRuntime.CreateResource("azure.subscription.sqlService.server", "id", core.ToString(dbServer.ID), "name", core.ToString(dbServer.Name), "location", core.ToString(dbServer.Location), @@ -74,11 +95,11 @@ func (a *mqlAzureSql) GetServers() ([]interface{}, error) { return res, nil } -func (a *mqlAzureSqlServer) id() (string, error) { +func (a *mqlAzureSubscriptionSqlServiceServer) id() (string, error) { return a.Id() } -func (a *mqlAzureSqlServer) GetDatabases() ([]interface{}, error) { +func (a *mqlAzureSubscriptionSqlServiceServer) GetDatabases() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -118,7 +139,7 @@ func (a *mqlAzureSqlServer) GetDatabases() ([]interface{}, error) { return nil, err } for _, entry := range page.Value { - mqlAzureDatabase, err := a.MotorRuntime.CreateResource("azure.sql.database", + mqlAzureDatabase, err := a.MotorRuntime.CreateResource("azure.subscription.sqlService.database", "id", core.ToString(entry.ID), "name", core.ToString(entry.Name), "type", core.ToString(entry.Type), @@ -152,7 +173,7 @@ func (a *mqlAzureSqlServer) GetDatabases() ([]interface{}, error) { return res, nil } -func (a *mqlAzureSqlServer) GetThreatDetectionPolicy() (interface{}, error) { +func (a *mqlAzureSubscriptionSqlServiceServer) GetThreatDetectionPolicy() (interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -191,11 +212,11 @@ func (a *mqlAzureSqlServer) GetThreatDetectionPolicy() (interface{}, error) { return core.JsonToDict(threatPolicy.Properties) } -func (a *mqlAzureSqlServerVulnerabilityassessmentsettings) id() (string, error) { +func (a *mqlAzureSubscriptionSqlServiceServerVulnerabilityassessmentsettings) id() (string, error) { return a.Id() } -func (a *mqlAzureSqlServer) GetVulnerabilityAssessmentSettings() (interface{}, error) { +func (a *mqlAzureSubscriptionSqlServiceServer) GetVulnerabilityAssessmentSettings() (interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -231,7 +252,7 @@ func (a *mqlAzureSqlServer) GetVulnerabilityAssessmentSettings() (interface{}, e if err != nil { return nil, err } - return a.MotorRuntime.CreateResource("azure.sql.server.vulnerabilityassessmentsettings", + return a.MotorRuntime.CreateResource("azure.subscription.sqlService.server.vulnerabilityassessmentsettings", "id", core.ToString(vaSettings.ID), "name", core.ToString(vaSettings.Name), "type", core.ToString(vaSettings.Type), @@ -244,7 +265,7 @@ func (a *mqlAzureSqlServer) GetVulnerabilityAssessmentSettings() (interface{}, e ) } -func (a *mqlAzureSqlServer) GetFirewallRules() ([]interface{}, error) { +func (a *mqlAzureSubscriptionSqlServiceServer) GetFirewallRules() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -286,7 +307,7 @@ func (a *mqlAzureSqlServer) GetFirewallRules() ([]interface{}, error) { } for _, entry := range page.Value { - mqlAzureConfiguration, err := a.MotorRuntime.CreateResource("azure.sql.firewallrule", + mqlAzureConfiguration, err := a.MotorRuntime.CreateResource("azure.subscription.sqlService.firewallrule", "id", core.ToString(entry.ID), "name", core.ToString(entry.Name), "type", core.ToString(entry.Type), @@ -302,7 +323,7 @@ func (a *mqlAzureSqlServer) GetFirewallRules() ([]interface{}, error) { return res, nil } -func (a *mqlAzureSqlServer) GetAzureAdAdministrators() ([]interface{}, error) { +func (a *mqlAzureSubscriptionSqlServiceServer) GetAzureAdAdministrators() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -342,7 +363,7 @@ func (a *mqlAzureSqlServer) GetAzureAdAdministrators() ([]interface{}, error) { return nil, err } for _, entry := range page.Value { - mqlAzureSqlAdministrator, err := a.MotorRuntime.CreateResource("azure.sql.server.administrator", + mqlAzureSqlAdministrator, err := a.MotorRuntime.CreateResource("azure.subscription.sqlService.server.administrator", "id", core.ToString(entry.ID), "name", core.ToString(entry.Name), "type", core.ToString(entry.Type), @@ -361,7 +382,7 @@ func (a *mqlAzureSqlServer) GetAzureAdAdministrators() ([]interface{}, error) { return res, nil } -func (a *mqlAzureSqlServer) GetConnectionPolicy() (map[string]interface{}, error) { +func (a *mqlAzureSubscriptionSqlServiceServer) GetConnectionPolicy() (map[string]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -401,7 +422,7 @@ func (a *mqlAzureSqlServer) GetConnectionPolicy() (map[string]interface{}, error return core.JsonToDict(policy.Properties) } -func (a *mqlAzureSqlServer) GetAuditingPolicy() (map[string]interface{}, error) { +func (a *mqlAzureSubscriptionSqlServiceServer) GetAuditingPolicy() (map[string]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -441,7 +462,7 @@ func (a *mqlAzureSqlServer) GetAuditingPolicy() (map[string]interface{}, error) return core.JsonToDict(policy.ServerBlobAuditingPolicy.Properties) } -func (a *mqlAzureSqlServer) GetSecurityAlertPolicy() (map[string]interface{}, error) { +func (a *mqlAzureSubscriptionSqlServiceServer) GetSecurityAlertPolicy() (map[string]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -481,7 +502,7 @@ func (a *mqlAzureSqlServer) GetSecurityAlertPolicy() (map[string]interface{}, er return core.JsonToDict(policy.ServerSecurityAlertPolicy.Properties) } -func (a *mqlAzureSqlServer) GetEncryptionProtector() (map[string]interface{}, error) { +func (a *mqlAzureSubscriptionSqlServiceServer) GetEncryptionProtector() (map[string]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -521,11 +542,11 @@ func (a *mqlAzureSqlServer) GetEncryptionProtector() (map[string]interface{}, er return core.JsonToDict(policy.EncryptionProtector.Properties) } -func (a *mqlAzureSqlDatabase) id() (string, error) { +func (a *mqlAzureSubscriptionSqlServiceDatabase) id() (string, error) { return a.Id() } -func (a *mqlAzureSqlDatabase) GetUsage() ([]interface{}, error) { +func (a *mqlAzureSubscriptionSqlServiceDatabase) GetUsage() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -570,7 +591,7 @@ func (a *mqlAzureSqlDatabase) GetUsage() ([]interface{}, error) { return nil, err } for _, entry := range page.Value { - mqlAzureSqlUsage, err := a.MotorRuntime.CreateResource("azure.sql.databaseusage", + mqlAzureSqlUsage, err := a.MotorRuntime.CreateResource("azure.subscription.sqlService.databaseusage", "id", id+"/metrics/"+core.ToString(entry.Name), "name", core.ToString(entry.Name), "resourceName", core.ToString(entry.Name), @@ -590,15 +611,15 @@ func (a *mqlAzureSqlDatabase) GetUsage() ([]interface{}, error) { return res, nil } -func (a *mqlAzureSqlDatabaseusage) id() (string, error) { +func (a *mqlAzureSubscriptionSqlServiceDatabaseusage) id() (string, error) { return a.Id() } -func (a *mqlAzureSqlDatabaseusage) GetNextResetTime() (interface{}, error) { +func (a *mqlAzureSubscriptionSqlServiceDatabaseusage) GetNextResetTime() (interface{}, error) { return nil, errors.New("deprecated, no longer supported") } -func (a *mqlAzureSqlDatabase) GetAdvisor() ([]interface{}, error) { +func (a *mqlAzureSubscriptionSqlServiceDatabase) GetAdvisor() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -666,7 +687,7 @@ func (a *mqlAzureSqlDatabase) GetAdvisor() ([]interface{}, error) { return res, nil } -func (a *mqlAzureSqlDatabase) GetThreatDetectionPolicy() (map[string]interface{}, error) { +func (a *mqlAzureSubscriptionSqlServiceDatabase) GetThreatDetectionPolicy() (map[string]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -712,7 +733,7 @@ func (a *mqlAzureSqlDatabase) GetThreatDetectionPolicy() (map[string]interface{} return core.JsonToDict(policy.DatabaseSecurityAlertPolicy.Properties) } -func (a *mqlAzureSqlDatabase) GetConnectionPolicy() (map[string]interface{}, error) { +func (a *mqlAzureSubscriptionSqlServiceDatabase) GetConnectionPolicy() (map[string]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -752,7 +773,7 @@ func (a *mqlAzureSqlDatabase) GetConnectionPolicy() (map[string]interface{}, err return core.JsonToDict(policy.ServerConnectionPolicy.Properties) } -func (a *mqlAzureSqlDatabase) GetAuditingPolicy() (map[string]interface{}, error) { +func (a *mqlAzureSubscriptionSqlServiceDatabase) GetAuditingPolicy() (map[string]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -798,7 +819,7 @@ func (a *mqlAzureSqlDatabase) GetAuditingPolicy() (map[string]interface{}, error return core.JsonToDict(policy.DatabaseBlobAuditingPolicy.Properties) } -func (a *mqlAzureSqlDatabase) GetTransparentDataEncryption() (map[string]interface{}, error) { +func (a *mqlAzureSubscriptionSqlServiceDatabase) GetTransparentDataEncryption() (map[string]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -844,22 +865,22 @@ func (a *mqlAzureSqlDatabase) GetTransparentDataEncryption() (map[string]interfa return core.JsonToDict(policy.LogicalDatabaseTransparentDataEncryption.Properties) } -func (a *mqlAzureSqlDatabase) GetCurrentServiceObjectiveId() (interface{}, error) { +func (a *mqlAzureSubscriptionSqlServiceDatabase) GetCurrentServiceObjectiveId() (interface{}, error) { return nil, errors.New("deprecated, use 'serviceLevelObjective'") } -func (a *mqlAzureSqlDatabase) GetContainmentState() (interface{}, error) { +func (a *mqlAzureSubscriptionSqlServiceDatabase) GetContainmentState() (interface{}, error) { return nil, errors.New("deprecated, no longer supported") } -func (a *mqlAzureSqlDatabase) GetRequestedServiceObjectiveId() (interface{}, error) { +func (a *mqlAzureSubscriptionSqlServiceDatabase) GetRequestedServiceObjectiveId() (interface{}, error) { return nil, errors.New("deprecated, use 'requestedServiceObjectiveName'") } -func (a *mqlAzureSqlDatabase) GetRecommendedIndex() (interface{}, error) { +func (a *mqlAzureSubscriptionSqlServiceDatabase) GetRecommendedIndex() (interface{}, error) { return nil, errors.New("deprecated, use 'advisor.recommendedActions'") } -func (a *mqlAzureSqlDatabase) GetServiceTierAdvisors() (interface{}, error) { +func (a *mqlAzureSubscriptionSqlServiceDatabase) GetServiceTierAdvisors() (interface{}, error) { return nil, errors.New("deprecated, no longer supported") } diff --git a/resources/packs/azure/azure_rm_storage.go b/resources/packs/azure/azure_rm_storage.go index a877ec721c..ea31d9f20a 100644 --- a/resources/packs/azure/azure_rm_storage.go +++ b/resources/packs/azure/azure_rm_storage.go @@ -14,8 +14,27 @@ import ( "go.mondoo.com/cnquery/resources/packs/core" ) -func (a *mqlAzureStorage) id() (string, error) { - return "azure.storage", nil +func (a *mqlAzureSubscriptionStorageService) init(args *resources.Args) (*resources.Args, AzureSubscriptionStorageService, error) { + if len(*args) > 0 { + return args, nil, nil + } + + at, err := azureTransport(a.MotorRuntime.Motor.Provider) + if err != nil { + return nil, nil, err + } + + (*args)["subscriptionId"] = at.SubscriptionID() + + return args, nil, nil +} + +func (a *mqlAzureSubscriptionStorageService) id() (string, error) { + subId, err := a.SubscriptionId() + if err != nil { + return "", err + } + return fmt.Sprintf("/subscriptions/%s/storageService", subId), nil } // see https://github.com/Azure/azure-sdk-for-go/issues/8224 @@ -24,7 +43,7 @@ type ( Kind storage.Kind ) -func (a *mqlAzureStorage) GetAccounts() ([]interface{}, error) { +func (a *mqlAzureSubscriptionStorageService) GetAccounts() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -72,7 +91,7 @@ func (a *mqlAzureStorage) GetAccounts() ([]interface{}, error) { if account.Kind != nil { kind = string(*account.Kind) } - mqlAzure, err := a.MotorRuntime.CreateResource("azure.storage.account", + mqlAzure, err := a.MotorRuntime.CreateResource("azure.subscription.storageService.account", "id", core.ToString(account.ID), "name", core.ToString(account.Name), "location", core.ToString(account.Location), @@ -93,11 +112,11 @@ func (a *mqlAzureStorage) GetAccounts() ([]interface{}, error) { return res, nil } -func (a *mqlAzureStorageAccount) id() (string, error) { +func (a *mqlAzureSubscriptionStorageServiceAccount) id() (string, error) { return a.Id() } -func (a *mqlAzureStorageAccount) init(args *resources.Args) (*resources.Args, AzureStorageAccount, error) { +func (a *mqlAzureSubscriptionStorageServiceAccount) init(args *resources.Args) (*resources.Args, AzureSubscriptionStorageServiceAccount, error) { if len(*args) > 2 { return args, nil, nil } @@ -179,7 +198,7 @@ func (a *mqlAzureStorageAccount) init(args *resources.Args) (*resources.Args, Az return args, nil, nil } -func (a *mqlAzureStorageAccount) GetContainers() ([]interface{}, error) { +func (a *mqlAzureSubscriptionStorageServiceAccount) GetContainers() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -227,7 +246,7 @@ func (a *mqlAzureStorageAccount) GetContainers() ([]interface{}, error) { return nil, err } - mqlAzure, err := a.MotorRuntime.CreateResource("azure.storage.container", + mqlAzure, err := a.MotorRuntime.CreateResource("azure.subscription.storageService.account.container", "id", core.ToString(container.ID), "name", core.ToString(container.Name), "etag", core.ToString(container.Etag), @@ -244,7 +263,7 @@ func (a *mqlAzureStorageAccount) GetContainers() ([]interface{}, error) { return res, nil } -func (a *mqlAzureStorageAccount) GetDataProtection() (interface{}, error) { +func (a *mqlAzureSubscriptionStorageServiceAccount) GetDataProtection() (interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -298,7 +317,7 @@ func (a *mqlAzureStorageAccount) GetDataProtection() (interface{}, error) { if properties.BlobServiceProperties.BlobServiceProperties.ContainerDeleteRetentionPolicy != nil { containerRetentionDays = core.ToInt64From32(properties.BlobServiceProperties.BlobServiceProperties.ContainerDeleteRetentionPolicy.Days) } - return a.MotorRuntime.CreateResource("azure.storage.account.dataProtection", + return a.MotorRuntime.CreateResource("azure.subscription.storageService.account.dataProtection", "storageAccountId", id, "blobSoftDeletionEnabled", blobSoftDeletionEnabled, "blobRetentionDays", blobRetentionDays, @@ -307,7 +326,7 @@ func (a *mqlAzureStorageAccount) GetDataProtection() (interface{}, error) { ) } -func (a *mqlAzureStorageAccount) GetQueueProperties() (interface{}, error) { +func (a *mqlAzureSubscriptionStorageServiceAccount) GetQueueProperties() (interface{}, error) { props, err := a.getServiceStorageProperties("queue") if err != nil { return nil, err @@ -319,7 +338,7 @@ func (a *mqlAzureStorageAccount) GetQueueProperties() (interface{}, error) { return toMqlServiceStorageProperties(a.MotorRuntime, props.ServiceProperties, "queue", parentId) } -func (a *mqlAzureStorageAccount) GetTableProperties() (interface{}, error) { +func (a *mqlAzureSubscriptionStorageServiceAccount) GetTableProperties() (interface{}, error) { props, err := a.getServiceStorageProperties("table") if err != nil { return nil, err @@ -331,7 +350,7 @@ func (a *mqlAzureStorageAccount) GetTableProperties() (interface{}, error) { return toMqlServiceStorageProperties(a.MotorRuntime, props.ServiceProperties, "table", parentId) } -func (a *mqlAzureStorageAccount) GetBlobProperties() (interface{}, error) { +func (a *mqlAzureSubscriptionStorageServiceAccount) GetBlobProperties() (interface{}, error) { props, err := a.getServiceStorageProperties("blob") if err != nil { return nil, err @@ -343,11 +362,11 @@ func (a *mqlAzureStorageAccount) GetBlobProperties() (interface{}, error) { return toMqlServiceStorageProperties(a.MotorRuntime, props.ServiceProperties, "blob", parentId) } -func (a *mqlAzureStorageContainer) id() (string, error) { +func (a *mqlAzureSubscriptionStorageServiceAccountContainer) id() (string, error) { return a.Id() } -func (a *mqlAzureStorageAccount) getServiceStorageProperties(serviceType string) (table.GetPropertiesResponse, error) { +func (a *mqlAzureSubscriptionStorageServiceAccount) getServiceStorageProperties(serviceType string) (table.GetPropertiesResponse, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return table.GetPropertiesResponse{}, err @@ -389,11 +408,11 @@ func (a *mqlAzureStorageAccount) getServiceStorageProperties(serviceType string) return props, nil } -func (a *mqlAzureStorageAccountBlobServiceProperties) id() (string, error) { +func (a *mqlAzureSubscriptionStorageServiceAccountBlobServiceProperties) id() (string, error) { return a.Id() } -func (a *mqlAzureStorageAccountDataProtection) id() (string, error) { +func (a *mqlAzureSubscriptionStorageServiceAccountDataProtection) id() (string, error) { storageAccId, err := a.StorageAccountId() if err != nil { return "", err @@ -401,35 +420,35 @@ func (a *mqlAzureStorageAccountDataProtection) id() (string, error) { return fmt.Sprintf("%s/dataProtection", storageAccId), nil } -func (a *mqlAzureStorageAccountTableServiceProperties) id() (string, error) { +func (a *mqlAzureSubscriptionStorageServiceAccountTableServiceProperties) id() (string, error) { return a.Id() } -func (a *mqlAzureStorageAccountQueueServiceProperties) id() (string, error) { +func (a *mqlAzureSubscriptionStorageServiceAccountQueueServiceProperties) id() (string, error) { return a.Id() } -func (a *mqlAzureStorageAccountServicePropertiesLogging) id() (string, error) { +func (a *mqlAzureSubscriptionStorageServiceAccountServicePropertiesLogging) id() (string, error) { return a.Id() } -func (a *mqlAzureStorageAccountServicePropertiesMetrics) id() (string, error) { +func (a *mqlAzureSubscriptionStorageServiceAccountServicePropertiesMetrics) id() (string, error) { return a.Id() } -func (a *mqlAzureStorageAccountServicePropertiesRetentionPolicy) id() (string, error) { +func (a *mqlAzureSubscriptionStorageServiceAccountServicePropertiesRetentionPolicy) id() (string, error) { return a.Id() } func toMqlServiceStorageProperties(runtime *resources.Runtime, props table.ServiceProperties, serviceType, parentId string) (interface{}, error) { - loggingRetentionPolicy, err := runtime.CreateResource("azure.storage.account.service.properties.retentionPolicy", + loggingRetentionPolicy, err := runtime.CreateResource("azure.subscription.storageService.account.service.properties.retentionPolicy", "id", fmt.Sprintf("%s/%s/properties/logging/retentionPolicy", parentId, serviceType), "retentionDays", core.ToInt64From32(props.Logging.RetentionPolicy.Days), "enabled", core.ToBool(props.Logging.RetentionPolicy.Enabled)) if err != nil { return nil, err } - logging, err := runtime.CreateResource("azure.storage.account.service.properties.logging", + logging, err := runtime.CreateResource("azure.subscription.storageService.account.service.properties.logging", "retentionPolicy", loggingRetentionPolicy, "id", fmt.Sprintf("%s/%s/properties/logging", parentId, serviceType), "delete", core.ToBool(props.Logging.Delete), @@ -440,7 +459,7 @@ func toMqlServiceStorageProperties(runtime *resources.Runtime, props table.Servi if err != nil { return nil, err } - minuteMetricsRetentionPolicy, err := runtime.CreateResource("azure.storage.account.service.properties.retentionPolicy", + minuteMetricsRetentionPolicy, err := runtime.CreateResource("azure.subscription.storageService.account.service.properties.retentionPolicy", "id", fmt.Sprintf("%s/%s/properties/minuteMetrics/retentionPolicy", parentId, serviceType), "retentionDays", core.ToInt64From32(props.MinuteMetrics.RetentionPolicy.Days), "enabled", core.ToBool(props.MinuteMetrics.Enabled), @@ -448,7 +467,7 @@ func toMqlServiceStorageProperties(runtime *resources.Runtime, props table.Servi if err != nil { return nil, err } - minuteMetrics, err := runtime.CreateResource("azure.storage.account.service.properties.metrics", + minuteMetrics, err := runtime.CreateResource("azure.subscription.storageService.account.service.properties.metrics", "id", fmt.Sprintf("%s/%s/properties/minuteMetrics/", parentId, serviceType), "retentionPolicy", minuteMetricsRetentionPolicy, "enabled", core.ToBool(props.MinuteMetrics.Enabled), @@ -458,7 +477,7 @@ func toMqlServiceStorageProperties(runtime *resources.Runtime, props table.Servi if err != nil { return nil, err } - hourMetricsRetentionPolicy, err := runtime.CreateResource("azure.storage.account.service.properties.retentionPolicy", + hourMetricsRetentionPolicy, err := runtime.CreateResource("azure.subscription.storageService.account.service.properties.retentionPolicy", "id", fmt.Sprintf("%s/%s/properties/hourMetrics/retentionPolicy", parentId, serviceType), "retentionDays", core.ToInt64From32(props.HourMetrics.RetentionPolicy.Days), "enabled", core.ToBool(props.HourMetrics.Enabled), @@ -466,7 +485,7 @@ func toMqlServiceStorageProperties(runtime *resources.Runtime, props table.Servi if err != nil { return nil, err } - hourMetrics, err := runtime.CreateResource("azure.storage.account.service.properties.metrics", + hourMetrics, err := runtime.CreateResource("azure.subscription.storageService.account.service.properties.metrics", "id", fmt.Sprintf("%s/%s/properties/hourMetrics", parentId, serviceType), "retentionPolicy", hourMetricsRetentionPolicy, "enabled", core.ToBool(props.HourMetrics.Enabled), @@ -476,7 +495,7 @@ func toMqlServiceStorageProperties(runtime *resources.Runtime, props table.Servi if err != nil { return nil, err } - settings, err := runtime.CreateResource(fmt.Sprintf("azure.storage.account.%sService.properties", serviceType), + settings, err := runtime.CreateResource(fmt.Sprintf("azure.subscription.storageService.account.%sService.properties", serviceType), "id", fmt.Sprintf("%s/%s/properties", parentId, serviceType), "minuteMetrics", minuteMetrics, "hourMetrics", hourMetrics, diff --git a/resources/packs/azure/azure_rm_web.go b/resources/packs/azure/azure_rm_web.go index a0b794dfa1..d086cb9fce 100644 --- a/resources/packs/azure/azure_rm_web.go +++ b/resources/packs/azure/azure_rm_web.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "errors" + "fmt" "regexp" "strconv" "strings" @@ -12,14 +13,34 @@ import ( web "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice" "github.com/rs/zerolog/log" azure "go.mondoo.com/cnquery/motor/providers/microsoft/azure" + "go.mondoo.com/cnquery/resources" "go.mondoo.com/cnquery/resources/packs/core" ) -func (a *mqlAzureWeb) id() (string, error) { - return "azure.web", nil +func (a *mqlAzureSubscriptionWebService) init(args *resources.Args) (*resources.Args, AzureSubscriptionWebService, error) { + if len(*args) > 0 { + return args, nil, nil + } + + at, err := azureTransport(a.MotorRuntime.Motor.Provider) + if err != nil { + return nil, nil, err + } + + (*args)["subscriptionId"] = at.SubscriptionID() + + return args, nil, nil +} + +func (a *mqlAzureSubscriptionWebService) id() (string, error) { + subId, err := a.SubscriptionId() + if err != nil { + return "", err + } + return fmt.Sprintf("/subscriptions/%s/webService", subId), nil } -func (a *mqlAzureWeb) GetApps() ([]interface{}, error) { +func (a *mqlAzureSubscriptionWebService) GetApps() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -53,7 +74,7 @@ func (a *mqlAzureWeb) GetApps() ([]interface{}, error) { return nil, err } - mqlAzure, err := a.MotorRuntime.CreateResource("azure.web.appsite", + mqlAzure, err := a.MotorRuntime.CreateResource("azure.subscription.webService.appsite", "id", core.ToString(entry.ID), "name", core.ToString(entry.Name), "location", core.ToString(entry.Location), @@ -104,7 +125,7 @@ func isPlatformEol(platform string, version string) bool { } // all runtimes that are returned here are not EOL and are supported -func (a *mqlAzureWeb) GetAvailableRuntimes() ([]interface{}, error) { +func (a *mqlAzureSubscriptionWebService) GetAvailableRuntimes() ([]interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -232,11 +253,11 @@ func (a *mqlAzureWeb) GetAvailableRuntimes() ([]interface{}, error) { return res, nil } -func (a *mqlAzureWebAppsite) id() (string, error) { +func (a *mqlAzureSubscriptionWebServiceAppsite) id() (string, error) { return a.Id() } -func (a *mqlAzureWebAppsite) GetConfiguration() (interface{}, error) { +func (a *mqlAzureSubscriptionWebServiceAppsite) GetConfiguration() (interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -280,7 +301,7 @@ func (a *mqlAzureWebAppsite) GetConfiguration() (interface{}, error) { return nil, err } - return a.MotorRuntime.CreateResource("azure.web.appsiteconfig", + return a.MotorRuntime.CreateResource("azure.subscription.webService.appsiteconfig", "id", core.ToString(entry.ID), "name", core.ToString(entry.Name), "kind", core.ToString(entry.Kind), @@ -289,7 +310,7 @@ func (a *mqlAzureWebAppsite) GetConfiguration() (interface{}, error) { ) } -func (a *mqlAzureWebAppsite) GetAuthenticationSettings() (interface{}, error) { +func (a *mqlAzureSubscriptionWebServiceAppsite) GetAuthenticationSettings() (interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -333,7 +354,7 @@ func (a *mqlAzureWebAppsite) GetAuthenticationSettings() (interface{}, error) { return nil, err } - return a.MotorRuntime.CreateResource("azure.web.appsiteauthsettings", + return a.MotorRuntime.CreateResource("azure.subscription.webService.appsiteauthsettings", "id", core.ToString(entry.ID), "name", core.ToString(entry.Name), "kind", core.ToString(entry.Kind), @@ -342,7 +363,7 @@ func (a *mqlAzureWebAppsite) GetAuthenticationSettings() (interface{}, error) { ) } -func (a *mqlAzureWebAppsite) GetApplicationSettings() (interface{}, error) { +func (a *mqlAzureSubscriptionWebServiceAppsite) GetApplicationSettings() (interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -389,7 +410,7 @@ func (a *mqlAzureWebAppsite) GetApplicationSettings() (interface{}, error) { return res, nil } -func (a *mqlAzureWebAppsite) GetMetadata() (interface{}, error) { +func (a *mqlAzureSubscriptionWebServiceAppsite) GetMetadata() (interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -436,7 +457,7 @@ func (a *mqlAzureWebAppsite) GetMetadata() (interface{}, error) { return res, nil } -func (a *mqlAzureWebAppsite) GetConnectionSettings() (interface{}, error) { +func (a *mqlAzureSubscriptionWebServiceAppsite) GetConnectionSettings() (interface{}, error) { at, err := azureTransport(a.MotorRuntime.Motor.Provider) if err != nil { return nil, err @@ -489,7 +510,7 @@ func (a *mqlAzureWebAppsite) GetConnectionSettings() (interface{}, error) { return res, nil } -func (a *mqlAzureWebAppsite) GetStack() (map[string]interface{}, error) { +func (a *mqlAzureSubscriptionWebServiceAppsite) GetStack() (map[string]interface{}, error) { config, err := a.Configuration() if err != nil { return nil, err @@ -581,11 +602,11 @@ func (a *mqlAzureWebAppsite) GetStack() (map[string]interface{}, error) { // fetch available runtimes and check if they are included // if they are included, leverage their additional properties // if they are not included they are either eol or custom - obj, err := a.MotorRuntime.CreateResource("azure.web") + obj, err := a.MotorRuntime.CreateResource("azure.subscription.webService") if err != nil { return nil, err } - azureWeb := obj.(AzureWeb) + azureWeb := obj.(AzureSubscriptionWebService) runtimes, err := azureWeb.AvailableRuntimes() if err != nil { return nil, err @@ -618,10 +639,10 @@ func (a *mqlAzureWebAppsite) GetStack() (map[string]interface{}, error) { return core.JsonToDict(runtime) } -func (a *mqlAzureWebAppsiteconfig) id() (string, error) { +func (a *mqlAzureSubscriptionWebServiceAppsiteconfig) id() (string, error) { return a.Id() } -func (a *mqlAzureWebAppsiteauthsettings) id() (string, error) { +func (a *mqlAzureSubscriptionWebServiceAppsiteauthsettings) id() (string, error) { return a.Id() } diff --git a/resources/packs/azure/azure_subscription.go b/resources/packs/azure/azure_subscription.go new file mode 100644 index 0000000000..884b74696a --- /dev/null +++ b/resources/packs/azure/azure_subscription.go @@ -0,0 +1,296 @@ +package azure + +import ( + "context" + "errors" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + subscriptions "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armsubscriptions" + + azureres "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources" + "go.mondoo.com/cnquery/resources" + "go.mondoo.com/cnquery/resources/packs/core" +) + +func (a *mqlAzureSubscription) init(args *resources.Args) (*resources.Args, AzureSubscription, error) { + if len(*args) > 2 { + return args, nil, nil + } + + at, err := azureTransport(a.MotorRuntime.Motor.Provider) + if err != nil { + return nil, nil, err + } + + token, err := at.GetTokenCredential() + if err != nil { + return nil, nil, err + } + subscriptionsC, err := subscriptions.NewClient(token, &arm.ClientOptions{}) + if err != nil { + return nil, nil, err + } + ctx := context.Background() + resp, err := subscriptionsC.Get(ctx, at.SubscriptionID(), &subscriptions.ClientGetOptions{}) + if err != nil { + return nil, nil, err + } + + managedByTenants := []interface{}{} + for _, t := range resp.ManagedByTenants { + if t != nil { + managedByTenants = append(managedByTenants, core.ToString((*string)(t.TenantID))) + } + } + + subPolicies, err := core.JsonToDict(resp.SubscriptionPolicies) + if err != nil { + return nil, nil, err + } + + (*args)["id"] = core.ToString(resp.ID) + (*args)["name"] = core.ToString(resp.DisplayName) + (*args)["tenantId"] = core.ToString(resp.TenantID) + (*args)["tags"] = azureTagsToInterface(resp.Tags) + (*args)["state"] = core.ToString((*string)(resp.State)) + (*args)["subscriptionId"] = core.ToString(resp.SubscriptionID) + (*args)["authorizationSource"] = core.ToString(resp.AuthorizationSource) + (*args)["managedByTenants"] = managedByTenants + (*args)["subscriptionsPolicies"] = subPolicies + + return args, nil, nil +} + +func (a *mqlAzureSubscription) id() (string, error) { + return a.Id() +} + +func (a *mqlAzureSubscription) GetResourceGroups() ([]interface{}, error) { + at, err := azureTransport(a.MotorRuntime.Motor.Provider) + if err != nil { + return nil, err + } + + ctx := context.Background() + token, err := at.GetTokenCredential() + if err != nil { + return nil, err + } + + subId, err := a.SubscriptionId() + if err != nil { + return nil, err + } + + client, err := azureres.NewResourceGroupsClient(subId, token, &arm.ClientOptions{}) + if err != nil { + return nil, err + } + + pager := client.NewListPager(&azureres.ResourceGroupsClientListOptions{}) + res := []interface{}{} + for pager.More() { + page, err := pager.NextPage(ctx) + if err != nil { + return nil, err + } + for _, rg := range page.Value { + mqlAzure, err := a.MotorRuntime.CreateResource("azure.subscription.resourcegroup", + "id", core.ToString(rg.ID), + "name", core.ToString(rg.Name), + "location", core.ToString(rg.Location), + "tags", azureTagsToInterface(rg.Tags), + "type", core.ToString(rg.Type), + "managedBy", core.ToString(rg.ManagedBy), + "provisioningState", core.ToString(rg.Properties.ProvisioningState), + ) + if err != nil { + return nil, err + } + res = append(res, mqlAzure) + } + } + + return res, nil +} + +func (a *mqlAzureSubscriptionResourcegroup) id() (string, error) { + return a.Id() +} + +func (a *mqlAzureSubscription) GetCompute() (interface{}, error) { + return a.MotorRuntime.CreateResource("azure.subscription.computeService") +} + +func (a *mqlAzureSubscription) GetNetwork() (interface{}, error) { + return a.MotorRuntime.CreateResource("azure.subscription.networkService") +} + +func (a *mqlAzureSubscription) GetStorage() (interface{}, error) { + return a.MotorRuntime.CreateResource("azure.subscription.storageService") +} + +func (a *mqlAzureSubscription) GetWeb() (interface{}, error) { + return a.MotorRuntime.CreateResource("azure.subscription.webService") +} + +func (a *mqlAzureSubscription) GetSql() (interface{}, error) { + return a.MotorRuntime.CreateResource("azure.subscription.sqlService") +} + +func (a *mqlAzureSubscription) GetMySql() (interface{}, error) { + return a.MotorRuntime.CreateResource("azure.subscription.mysqlService") +} + +func (a *mqlAzureSubscription) GetPostgreSql() (interface{}, error) { + return a.MotorRuntime.CreateResource("azure.subscription.postgresqlService") +} + +func (a *mqlAzureSubscription) GetMariaDb() (interface{}, error) { + return a.MotorRuntime.CreateResource("azure.subscription.mariadbService") +} + +func (a *mqlAzureSubscription) GetKeyVault() (interface{}, error) { + return a.MotorRuntime.CreateResource("azure.subscription.keyvaultService") +} + +func (a *mqlAzureSubscription) GetAuthorization() (interface{}, error) { + return a.MotorRuntime.CreateResource("azure.subscription.authorizationService") +} + +func (a *mqlAzureSubscription) GetMonitor() (interface{}, error) { + return a.MotorRuntime.CreateResource("azure.subscription.monitorService") +} + +func (a *mqlAzureSubscription) GetCloudDefender() (interface{}, error) { + return a.MotorRuntime.CreateResource("azure.subscription.cloudDefenderService") +} + +func (a *mqlAzureSubscription) GetId() (string, error) { + // placeholder to convince MQL that this is an optional field + // should never be called since the data is initialized in init + return "", errors.New("not implemented") +} + +func (a *mqlAzureSubscription) GetSubscriptionId() (string, error) { + // placeholder to convince MQL that this is an optional field + // should never be called since the data is initialized in init + return "", errors.New("not implemented") +} + +func (a *mqlAzureSubscription) GetName() (string, error) { + // placeholder to convince MQL that this is an optional field + // should never be called since the data is initialized in init + return "", errors.New("not implemented") +} + +func (a *mqlAzureSubscription) GetTenantId() (string, error) { + // placeholder to convince MQL that this is an optional field + // should never be called since the data is initialized in init + return "", errors.New("not implemented") +} + +func (a *mqlAzureSubscription) GetManagedByTenants() (string, error) { + // placeholder to convince MQL that this is an optional field + // should never be called since the data is initialized in init + return "", errors.New("not implemented") +} + +func (a *mqlAzureSubscription) GetTags() (string, error) { + // placeholder to convince MQL that this is an optional field + // should never be called since the data is initialized in init + return "", errors.New("not implemented") +} + +func (a *mqlAzureSubscription) GetAuthorizationSource() (string, error) { + // placeholder to convince MQL that this is an optional field + // should never be called since the data is initialized in init + return "", errors.New("not implemented") +} + +func (a *mqlAzureSubscription) GetSubscriptionsPolicies() (map[string]interface{}, error) { + // placeholder to convince MQL that this is an optional field + // should never be called since the data is initialized in init + return nil, errors.New("not implemented") +} + +func (a *mqlAzureSubscription) GetState() (map[string]interface{}, error) { + // placeholder to convince MQL that this is an optional field + // should never be called since the data is initialized in init + return nil, errors.New("not implemented") +} + +func (a *mqlAzureSubscription) GetResources() ([]interface{}, error) { + at, err := azureTransport(a.MotorRuntime.Motor.Provider) + if err != nil { + return nil, err + } + + ctx := context.Background() + token, err := at.GetTokenCredential() + if err != nil { + return nil, err + } + + client, err := azureres.NewClient(at.SubscriptionID(), token, &arm.ClientOptions{}) + if err != nil { + return nil, err + } + + pager := client.NewListPager(&azureres.ClientListOptions{}) + res := []interface{}{} + for pager.More() { + page, err := pager.NextPage(ctx) + if err != nil { + return nil, err + } + for _, resource := range page.Value { + + // NOTE: properties not not properly filled, therefore you would need to ask each individual resource: + // https://docs.microsoft.com/en-us/rest/api/resources/resources/getbyid + // In order to make it happen you need to support each individual type and their api version. Therefore + // we should not support that via the resource api but instead make sure those properties are properly + // exposed by the typed resources + sku, err := core.JsonToDict(resource.SKU) + if err != nil { + return nil, err + } + + plan, err := core.JsonToDict(resource.Plan) + if err != nil { + return nil, err + } + + identity, err := core.JsonToDict(resource.Identity) + if err != nil { + return nil, err + } + + mqlAzure, err := a.MotorRuntime.CreateResource("azure.subscription.resource", + "id", core.ToString(resource.ID), + "name", core.ToString(resource.Name), + "kind", core.ToString(resource.Kind), + "location", core.ToString(resource.Location), + "tags", azureTagsToInterface(resource.Tags), + "type", core.ToString(resource.Type), + "managedBy", core.ToString(resource.ManagedBy), + "sku", sku, + "plan", plan, + "identity", identity, + "provisioningState", core.ToString(resource.ProvisioningState), + "createdTime", resource.CreatedTime, + "changedTime", resource.ChangedTime, + ) + if err != nil { + return nil, err + } + res = append(res, mqlAzure) + } + } + + return res, nil +} + +func (a *mqlAzureSubscriptionResource) id() (string, error) { + return a.Id() +} diff --git a/resources/packs/azure/info/azure.lr.json b/resources/packs/azure/info/azure.lr.json index 95d049004e..d102a02c97 100644 --- a/resources/packs/azure/info/azure.lr.json +++ b/resources/packs/azure/info/azure.lr.json @@ -1 +1 @@ -{"resources":{"azure":{"id":"azure","name":"azure","fields":{"resourceGroups":{"name":"resourceGroups","type":"\u0019\u001bazure.resourcegroup","title":"Get all the resource groups in a subscription"},"resources":{"name":"resources","type":"\u0019\u001bazure.resource","title":"Get all the resources in a subscription"}},"title":"Azure Resources"},"azure.authorization":{"id":"azure.authorization","name":"azure.authorization","fields":{"roleDefinitions":{"name":"roleDefinitions","type":"\u0019\u001bazure.authorization.roleDefinition","title":"Role definitions for the Azure subscription"}},"title":"Azure Authorization"},"azure.authorization.roleDefinition":{"id":"azure.authorization.roleDefinition","name":"azure.authorization.roleDefinition","fields":{"description":{"name":"description","type":"\u0007","is_mandatory":true,"title":"Description of the role definition"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"ID of the role definition"},"isCustom":{"name":"isCustom","type":"\u0004","is_mandatory":true,"title":"Whether the role definition is manually created"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Name of the role definition"},"permissions":{"name":"permissions","type":"\u0019\u001bazure.authorization.roleDefinition.permission","is_mandatory":true,"title":"Permissions that are attached to the role definition"},"scopes":{"name":"scopes","type":"\u0019\u0007","is_mandatory":true,"title":"Scopes for which the role definition applies"}},"title":"Azure Role Definition","defaults":"id name scopes"},"azure.authorization.roleDefinition.permission":{"id":"azure.authorization.roleDefinition.permission","name":"azure.authorization.roleDefinition.permission","fields":{"allowedActions":{"name":"allowedActions","type":"\u0019\u0007","is_mandatory":true,"title":"List of allowed actions that are attached to the permission"},"allowedDataActions":{"name":"allowedDataActions","type":"\u0019\u0007","is_mandatory":true,"title":"List of allowed data actions that are attached to the permission"},"deniedActions":{"name":"deniedActions","type":"\u0019\u0007","is_mandatory":true,"title":"List of denied actions that are attached to the permission"},"deniedDataActions":{"name":"deniedDataActions","type":"\u0019\u0007","is_mandatory":true,"title":"List of denied data actions that are attached to the permission"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"ID of the permission"}},"title":"Azure Role Definition Permission","private":true,"defaults":"allowedActions deniedActions"},"azure.cloudDefender":{"id":"azure.cloudDefender","name":"azure.cloudDefender","fields":{"defenderForContainers":{"name":"defenderForContainers","type":"\n","title":"List of Defender For Container components and whether they are enabled"},"defenderForServers":{"name":"defenderForServers","type":"\n","title":"List of Defender For Server components and whether they are enabled"},"monitoringAgentAutoProvision":{"name":"monitoringAgentAutoProvision","type":"\u0004","title":"Whether the monitoring agent is automatically provisioned on new VMs"},"securityContacts":{"name":"securityContacts","type":"\u0019\u001bazure.cloudDefender.securityContact","title":"List of configured security contacts"}},"title":"Azure Microsoft Cloud Defender"},"azure.cloudDefender.securityContact":{"id":"azure.cloudDefender.securityContact","name":"azure.cloudDefender.securityContact","fields":{"alertNotifications":{"name":"alertNotifications","type":"\n","is_mandatory":true,"title":"Alerts notification settings"},"emails":{"name":"emails","type":"\u0019\u0007","is_mandatory":true,"title":"Emails that receive security alerts"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"ID of the security contact"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Name of the security contact"},"notificationsByRole":{"name":"notificationsByRole","type":"\n","is_mandatory":true,"title":"Notifications by role settings"}},"title":"Azure Microsoft Cloud Defender Security Contact","private":true},"azure.compute":{"id":"azure.compute","name":"azure.compute","fields":{"disks":{"name":"disks","type":"\u0019\u001bazure.compute.disk","title":"Lists all the disks under a subscription"},"vms":{"name":"vms","type":"\u0019\u001bazure.compute.vm","title":"Lists all compute instances"}},"title":"Azure Compute"},"azure.compute.disk":{"id":"azure.compute.disk","name":"azure.compute.disk","fields":{"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Disk resource id"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Disk resource location"},"managedBy":{"name":"managedBy","type":"\u0007","is_mandatory":true,"title":"A relative URI containing the ID of the VM that has the disk attached"},"managedByExtended":{"name":"managedByExtended","type":"\u0019\u0007","is_mandatory":true,"title":"List of relative URIs containing the IDs of the VMs that have the disk attached"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Disk resource name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Disk resource properties"},"sku":{"name":"sku","type":"\n","is_mandatory":true,"title":"The disk sku name and tier"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Disk resource tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Disk resource type"},"zones":{"name":"zones","type":"\u0019\u0007","is_mandatory":true,"title":"The logical zone list for disk"}},"title":"Azure Disk Resource","private":true,"defaults":"id name location"},"azure.compute.vm":{"id":"azure.compute.vm","name":"azure.compute.vm","fields":{"dataDisks":{"name":"dataDisks","type":"\u0019\u001bazure.compute.disk","title":"VM compute data disk"},"extensions":{"name":"extensions","type":"\u0019\n","title":"VM extension"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"VM ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"VM location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"VM name"},"osDisk":{"name":"osDisk","type":"\u001bazure.compute.disk","title":"VM compute disk"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"VM properties"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"VM tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"VM type"}},"title":"Azure Compute Virtual Machine","private":true,"defaults":"id name location "},"azure.keyvault":{"id":"azure.keyvault","name":"azure.keyvault","fields":{"vaults":{"name":"vaults","type":"\u0019\u001bazure.keyvault.vault","title":"List of Azure key vaults"}},"title":"Azure Key Vault"},"azure.keyvault.certificate":{"id":"azure.keyvault.certificate","name":"azure.keyvault.certificate","fields":{"certName":{"name":"certName","type":"\u0007","title":"Certificate name"},"created":{"name":"created","type":"\t","is_mandatory":true,"title":"Certificate creation time"},"enabled":{"name":"enabled","type":"\u0004","is_mandatory":true,"title":"Whether certificate is enabled"},"expires":{"name":"expires","type":"\t","is_mandatory":true,"title":"Certificate expiration date"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Certificate ID"},"notBefore":{"name":"notBefore","type":"\t","is_mandatory":true,"title":"Certificate not before date"},"recoveryLevel":{"name":"recoveryLevel","type":"\u0007","is_mandatory":true,"title":"Certificate recovery level"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Certificate tags"},"updated":{"name":"updated","type":"\t","is_mandatory":true,"title":"Certificate last update time"},"version":{"name":"version","type":"\u0007","title":"Certificate version"},"versions":{"name":"versions","type":"\u0019\u001bazure.keyvault.certificate","title":"List of certificate versions"},"x5t":{"name":"x5t","type":"\u0007","is_mandatory":true,"title":"Certificate x5t"}},"title":"Azure Key Vault Certificate","private":true,"defaults":"id certName"},"azure.keyvault.key":{"id":"azure.keyvault.key","name":"azure.keyvault.key","fields":{"created":{"name":"created","type":"\t","is_mandatory":true,"title":"Key creation time"},"enabled":{"name":"enabled","type":"\u0004","is_mandatory":true,"title":"Whether key is enabled"},"expires":{"name":"expires","type":"\t","is_mandatory":true,"title":"Key expiration date"},"keyName":{"name":"keyName","type":"\u0007","title":"Key name"},"kid":{"name":"kid","type":"\u0007","is_mandatory":true,"title":"Key ID"},"managed":{"name":"managed","type":"\u0004","is_mandatory":true,"title":"Whether key is managed"},"notBefore":{"name":"notBefore","type":"\t","is_mandatory":true,"title":"Key not before date"},"recoveryLevel":{"name":"recoveryLevel","type":"\u0007","is_mandatory":true,"title":"Key recovery level"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Key tags"},"updated":{"name":"updated","type":"\t","is_mandatory":true,"title":"Key last update time"},"version":{"name":"version","type":"\u0007","title":"Key version"},"versions":{"name":"versions","type":"\u0019\u001bazure.keyvault.key","title":"List of key versions"}},"title":"Azure Key Vault Key","private":true,"defaults":"kid keyName"},"azure.keyvault.secret":{"id":"azure.keyvault.secret","name":"azure.keyvault.secret","fields":{"contentType":{"name":"contentType","type":"\u0007","is_mandatory":true,"title":"Secret content type"},"created":{"name":"created","type":"\t","is_mandatory":true,"title":"Secret creation date"},"enabled":{"name":"enabled","type":"\u0004","is_mandatory":true,"title":"Whether secret is enabled"},"expires":{"name":"expires","type":"\t","is_mandatory":true,"title":"Secret expiration date"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Secret ID"},"managed":{"name":"managed","type":"\u0004","is_mandatory":true,"title":"Whether secret is managed"},"notBefore":{"name":"notBefore","type":"\t","is_mandatory":true,"title":"Secret notBefore date"},"secretName":{"name":"secretName","type":"\u0007","title":"Secret name"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Secret tags"},"updated":{"name":"updated","type":"\t","is_mandatory":true,"title":"Secret last updated date"},"version":{"name":"version","type":"\u0007","title":"Secret version"},"versions":{"name":"versions","type":"\u0019\u001bazure.keyvault.secret","title":"List of secret versions"}},"title":"Azure Key Vault Secret","private":true,"defaults":"id secretName"},"azure.keyvault.vault":{"id":"azure.keyvault.vault","name":"azure.keyvault.vault","fields":{"certificates":{"name":"certificates","type":"\u0019\u001bazure.keyvault.certificate","title":"Key Vault certificates"},"diagnosticSettings":{"name":"diagnosticSettings","type":"\u0019\u001bazure.monitor.diagnosticsetting","title":"Key Vault diagnostic settings"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Key Vault ID"},"keys":{"name":"keys","type":"\u0019\u001bazure.keyvault.key","title":"Key Vault keys"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Key Vault location"},"properties":{"name":"properties","type":"\n","title":"Key Vault properties"},"secrets":{"name":"secrets","type":"\u0019\u001bazure.keyvault.secret","title":"Key Vault secrets"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Key Vault tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Key Vault type"},"vaultName":{"name":"vaultName","type":"\u0007","is_mandatory":true,"title":"Key Vault name"},"vaultUri":{"name":"vaultUri","type":"\u0007","title":"Key Vault URL"}},"title":"Azure Key Vault Vault","private":true,"defaults":"id vaultName location"},"azure.mariadb":{"id":"azure.mariadb","name":"azure.mariadb","fields":{"servers":{"name":"servers","type":"\u0019\u001bazure.mariadb.server","title":"List of MariaDB servers"}},"title":"Azure Database for MariaDB"},"azure.mariadb.database":{"id":"azure.mariadb.database","name":"azure.mariadb.database","fields":{"charset":{"name":"charset","type":"\u0007","is_mandatory":true,"title":"MariaDB database charset"},"collation":{"name":"collation","type":"\u0007","is_mandatory":true,"title":"MariaDB database collation"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"MariaDB database ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"MariaDB database name"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"MariaDB database type"}},"title":"Azure Database for MariaDB Database","private":true,"defaults":"id name"},"azure.mariadb.server":{"id":"azure.mariadb.server","name":"azure.mariadb.server","fields":{"configuration":{"name":"configuration","type":"\u0019\u001bazure.sql.configuration","title":"MariaDB server configuration"},"databases":{"name":"databases","type":"\u0019\u001bazure.mariadb.database","title":"MariaDB server databases"},"firewallRules":{"name":"firewallRules","type":"\u0019\u001bazure.sql.firewallrule","title":"MariaDB server firewall rules"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"MariaDB server ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"MariaDB server location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"MariaDB server name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"MariaDB server properties"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"MariaDB server tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"MariaDB server type"}},"title":"Azure Database for MariaDB Server","private":true,"defaults":"id name location"},"azure.monitor":{"id":"azure.monitor","name":"azure.monitor","fields":{"activityLog":{"name":"activityLog","type":"\u001bazure.monitor.activitylog","title":"Activity log for the monitor"},"diagnosticSettings":{"name":"diagnosticSettings","type":"\u0019\u001bazure.monitor.diagnosticsetting","title":"List of diagnostic settings for the subscription"},"logProfiles":{"name":"logProfiles","type":"\u0019\u001bazure.monitor.logprofile","title":"List of log profiles"}},"title":"Azure Monitor"},"azure.monitor.activitylog":{"id":"azure.monitor.activitylog","name":"azure.monitor.activitylog","fields":{"alerts":{"name":"alerts","type":"\u0019\u001bazure.monitor.activitylog.alert","title":"List of activity log alerts"}},"title":"Azure Monitor Activity Log","private":true},"azure.monitor.activitylog.alert":{"id":"azure.monitor.activitylog.alert","name":"azure.monitor.activitylog.alert","fields":{"actions":{"name":"actions","type":"\u0019\n","is_mandatory":true,"title":"Actions that activate when the conditions are met"},"conditions":{"name":"conditions","type":"\u0019\n","is_mandatory":true,"title":"Conditions for the activity log alert, all of which must be met"},"description":{"name":"description","type":"\u0007","is_mandatory":true,"title":"Description of the activity log alert"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"ID of the activity log alert"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Location of the alert"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Name of the activity log alert"},"scopes":{"name":"scopes","type":"\u0019\u0007","is_mandatory":true,"title":"List of resource IDs that must be present to trigger the alert"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Tags of the alert"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Type of the activity log alert"}},"title":"Azure Monitor Activity Log Alert","private":true},"azure.monitor.diagnosticsetting":{"id":"azure.monitor.diagnosticsetting","name":"azure.monitor.diagnosticsetting","fields":{"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Diagnostic setting ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Diagnostic setting name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Diagnostic setting properties"},"storageAccount":{"name":"storageAccount","type":"\u001bazure.storage.account","is_mandatory":true,"title":"Diagnostic setting storage account"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Diagnostic setting type"}},"title":"Azure Monitor Diagnostic Setting","private":true,"defaults":"id name"},"azure.monitor.logprofile":{"id":"azure.monitor.logprofile","name":"azure.monitor.logprofile","fields":{"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Log profile ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Log profile location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Log profile name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Log profile properties"},"storageAccount":{"name":"storageAccount","type":"\u001bazure.storage.account","is_mandatory":true,"title":"Log profile storage account"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Log profile tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Log profile type"}},"title":"Azure Monitor Log Profile","private":true,"defaults":"id name location"},"azure.mysql":{"id":"azure.mysql","name":"azure.mysql","fields":{"flexibleServers":{"name":"flexibleServers","type":"\u0019\u001bazure.mysql.flexibleServer","title":"List of Flexible MySQL servers"},"servers":{"name":"servers","type":"\u0019\u001bazure.mysql.server","title":"List of MySQL servers"}},"title":"Azure Database for MySQL"},"azure.mysql.database":{"id":"azure.mysql.database","name":"azure.mysql.database","fields":{"charset":{"name":"charset","type":"\u0007","is_mandatory":true,"title":"MySQL database charset"},"collation":{"name":"collation","type":"\u0007","is_mandatory":true,"title":"MySQL database collation"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"MySQL database ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"MySQL database name"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"MySQL database type"}},"title":"Azure Database for MySQL Database","private":true,"defaults":"id name"},"azure.mysql.flexibleServer":{"id":"azure.mysql.flexibleServer","name":"azure.mysql.flexibleServer","fields":{"configuration":{"name":"configuration","type":"\u0019\u001bazure.sql.configuration","title":"MySQL flexible server configuration"},"databases":{"name":"databases","type":"\u0019\u001bazure.mysql.database","title":"MySQL flexible server databases"},"firewallRules":{"name":"firewallRules","type":"\u0019\u001bazure.sql.firewallrule","title":"MySQL flexible server firewall rules"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"MySQL flexible server ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"MySQL flexible server location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"MySQL flexible server name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"MySQL flexible server properties"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"MySQL flexible server tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"MySQL flexible server type"}},"title":"Azure Database for MySQL Flexible Server","private":true,"defaults":"id name location"},"azure.mysql.server":{"id":"azure.mysql.server","name":"azure.mysql.server","fields":{"configuration":{"name":"configuration","type":"\u0019\u001bazure.sql.configuration","title":"MySQL server configuration"},"databases":{"name":"databases","type":"\u0019\u001bazure.mysql.database","title":"MySQL server databases"},"firewallRules":{"name":"firewallRules","type":"\u0019\u001bazure.sql.firewallrule","title":"MySQL server firewall rules"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"MySQL server ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"MySQL server location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"MySQL server name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"MySQL server properties"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"MySQL server tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"MySQL server type"}},"title":"Azure Database for MySQL Server","private":true,"defaults":"id name location"},"azure.network":{"id":"azure.network","name":"azure.network","fields":{"interfaces":{"name":"interfaces","type":"\u0019\u001bazure.network.interface","title":"List of network interfaces"},"securityGroups":{"name":"securityGroups","type":"\u0019\u001bazure.network.securitygroup","title":"List of network security groups"},"watchers":{"name":"watchers","type":"\u0019\u001bazure.network.watcher","title":"List of network watchers"}},"title":"Azure Network"},"azure.network.interface":{"id":"azure.network.interface","name":"azure.network.interface","fields":{"etag":{"name":"etag","type":"\u0007","is_mandatory":true,"title":"Network interface etag"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Network interface ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Network interface name"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Network interface name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Network interface properties"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Network interface tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Network interface type"},"vm":{"name":"vm","type":"\u001bazure.compute.vm","title":"Network interface compute vm"}},"title":"Azure Network Interface","private":true,"defaults":"id name location"},"azure.network.securitygroup":{"id":"azure.network.securitygroup","name":"azure.network.securitygroup","fields":{"defaultSecurityRules":{"name":"defaultSecurityRules","type":"\u0019\u001bazure.network.securityrule","is_mandatory":true,"title":"Security group default security rules"},"etag":{"name":"etag","type":"\u0007","is_mandatory":true,"title":"Security group etag"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Security group ID"},"interfaces":{"name":"interfaces","type":"\u0019\u001bazure.network.interface","is_mandatory":true,"title":"Security group interfaces"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Security group location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Security group name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Security group properties"},"securityRules":{"name":"securityRules","type":"\u0019\u001bazure.network.securityrule","is_mandatory":true,"title":"Security group rules"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Security group tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Security group type"}},"title":"Azure Network Security Group","private":true,"defaults":"id name location"},"azure.network.securityrule":{"id":"azure.network.securityrule","name":"azure.network.securityrule","fields":{"destinationPortRange":{"name":"destinationPortRange","type":"\u0019\n","is_mandatory":true,"title":"Security rule destination port range"},"etag":{"name":"etag","type":"\u0007","is_mandatory":true,"title":"Security rule etag"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Security rule ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Security rule name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Security rule properties"}},"title":"Azure Network Security Rule","private":true,"defaults":"id name"},"azure.network.watcher":{"id":"azure.network.watcher","name":"azure.network.watcher","fields":{"etag":{"name":"etag","type":"\u0007","is_mandatory":true,"title":"Network watcher etag"},"flowLogs":{"name":"flowLogs","type":"\u0019\u001bazure.network.watcher.flowlog","title":"Network watcher flow logs"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Network watcher ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Network watcher location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Network watcher name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Network watcher properties"},"provisioningState":{"name":"provisioningState","type":"\u0007","is_mandatory":true,"title":"Network watcher provisioning state"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Network watcher tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Network watcher type"}},"title":"Azure Network Watcher","private":true,"defaults":"name location"},"azure.network.watcher.flowlog":{"id":"azure.network.watcher.flowlog","name":"azure.network.watcher.flowlog","fields":{"analytics":{"name":"analytics","type":"\n","is_mandatory":true,"title":"Network watcher flow log analytics"},"enabled":{"name":"enabled","type":"\u0004","is_mandatory":true,"title":"whether the network watcher flow log is enabled"},"etag":{"name":"etag","type":"\u0007","is_mandatory":true,"title":"Network watcher flow log etag"},"format":{"name":"format","type":"\u0007","is_mandatory":true,"title":"Network watcher flow log format"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Network watcher flow log ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Network watcher flow log location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Network watcher flow log name"},"provisioningState":{"name":"provisioningState","type":"\u0007","is_mandatory":true,"title":"Network watcher flow log provisioning state"},"retentionPolicy":{"name":"retentionPolicy","type":"\n","is_mandatory":true,"title":"Network watcher flow log retention policy"},"storageAccountId":{"name":"storageAccountId","type":"\u0007","is_mandatory":true,"title":"Network watcher flow log storage account identifier"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Network watcher flow log tags"},"targetResourceGuid":{"name":"targetResourceGuid","type":"\u0007","is_mandatory":true,"title":"Network watcher flow log target resource guid"},"targetResourceId":{"name":"targetResourceId","type":"\u0007","is_mandatory":true,"title":"Network watcher flow log target resource identifier"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Network watcher flow log type"},"version":{"name":"version","type":"\u0005","is_mandatory":true,"title":"Network watcher flow log version"}},"title":"Azure Network Watcher Flow Log","private":true,"defaults":"name location"},"azure.postgresql":{"id":"azure.postgresql","name":"azure.postgresql","fields":{"servers":{"name":"servers","type":"\u0019\u001bazure.postgresql.server","title":"List of PostgreSQL servers"}},"title":"Azure Database for PostgreSQL"},"azure.postgresql.database":{"id":"azure.postgresql.database","name":"azure.postgresql.database","fields":{"charset":{"name":"charset","type":"\u0007","is_mandatory":true,"title":"PostgreSQL database charset"},"collation":{"name":"collation","type":"\u0007","is_mandatory":true,"title":"PostgreSQL database collation"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"PostgreSQL database ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"PostgreSQL database name"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"PostgreSQL database type"}},"title":"Azure Database for PostgreSQL Database","private":true,"defaults":"id name"},"azure.postgresql.server":{"id":"azure.postgresql.server","name":"azure.postgresql.server","fields":{"configuration":{"name":"configuration","type":"\u0019\u001bazure.sql.configuration","title":"PostgreSQL server configuration"},"databases":{"name":"databases","type":"\u0019\u001bazure.postgresql.database","title":"PostgreSQL server databases"},"firewallRules":{"name":"firewallRules","type":"\u0019\u001bazure.sql.firewallrule","title":"PostgreSQL server firewall rules"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"PostgreSQL server ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"PostgreSQL server location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"PostgreSQL server name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"PostgreSQL server properties"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"PostgreSQL server tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"PostgreSQL server type"}},"title":"Azure Database for PostgreSQL Server","private":true,"defaults":"id name location"},"azure.resource":{"id":"azure.resource","name":"azure.resource","fields":{"changedTime":{"name":"changedTime","type":"\t","is_mandatory":true,"title":"Resource change time"},"createdTime":{"name":"createdTime","type":"\t","is_mandatory":true,"title":"Resource create time"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Resource ID"},"identity":{"name":"identity","type":"\n","is_mandatory":true,"title":"Resource identity"},"kind":{"name":"kind","type":"\u0007","is_mandatory":true,"title":"Resource kind"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Resource location"},"managedBy":{"name":"managedBy","type":"\u0007","is_mandatory":true,"title":"Resource managed by"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Resource name"},"plan":{"name":"plan","type":"\n","is_mandatory":true,"title":"Resource plan"},"provisioningState":{"name":"provisioningState","type":"\u0007","is_mandatory":true,"title":"Resource provisioning state"},"sku":{"name":"sku","type":"\n","is_mandatory":true,"title":"Resource SKU"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Resource tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Resource type"}},"title":"Azure Resource","private":true,"defaults":"id name location"},"azure.resourcegroup":{"id":"azure.resourcegroup","name":"azure.resourcegroup","fields":{"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Resource Group ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Resource Group location"},"managedBy":{"name":"managedBy","type":"\u0007","is_mandatory":true,"title":"Resource Group managed by"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Resource Group name"},"provisioningState":{"name":"provisioningState","type":"\u0007","is_mandatory":true,"title":"Resource Group provisioning state"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Resource Group tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Resource Group type"}},"title":"Azure Resource Group","private":true,"defaults":"name location"},"azure.sql":{"id":"azure.sql","name":"azure.sql","fields":{"servers":{"name":"servers","type":"\u0019\u001bazure.sql.server","title":"List of SQL servers"}},"title":"Azure SQL"},"azure.sql.configuration":{"id":"azure.sql.configuration","name":"azure.sql.configuration","fields":{"allowedValues":{"name":"allowedValues","type":"\u0007","is_mandatory":true,"title":"SQL configuration allowed values"},"dataType":{"name":"dataType","type":"\u0007","is_mandatory":true,"title":"SQL configuration data type"},"defaultValue":{"name":"defaultValue","type":"\u0007","is_mandatory":true,"title":"SQL configuration default value"},"description":{"name":"description","type":"\u0007","is_mandatory":true,"title":"SQL configuration description"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"SQL configuration ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"SQL configuration name"},"source":{"name":"source","type":"\u0007","is_mandatory":true,"title":"SQL configuration source"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"SQL configuration type"},"value":{"name":"value","type":"\u0007","is_mandatory":true,"title":"SQL configuration value"}},"title":"Azure SQL Configuration","private":true,"defaults":"id name"},"azure.sql.database":{"id":"azure.sql.database","name":"azure.sql.database","fields":{"advisor":{"name":"advisor","type":"\u0019\n","title":"SQL database advisor"},"auditingPolicy":{"name":"auditingPolicy","type":"\n","title":"SQL database auditing policy"},"collation":{"name":"collation","type":"\u0007","is_mandatory":true,"title":"SQL database collation"},"connectionPolicy":{"name":"connectionPolicy","type":"\n","title":"SQL database connection policy"},"containmentState":{"name":"containmentState","type":"\u0005","title":"Deprecated"},"createMode":{"name":"createMode","type":"\u0007","is_mandatory":true,"title":"SQL database create mode"},"creationDate":{"name":"creationDate","type":"\t","is_mandatory":true,"title":"SQL database create date"},"currentServiceObjectiveId":{"name":"currentServiceObjectiveId","type":"\u0007","title":"Deprecated. Use `serviceLevelObjective` instead."},"databaseId":{"name":"databaseId","type":"\u0007","is_mandatory":true,"title":"Database ID"},"defaultSecondaryLocation":{"name":"defaultSecondaryLocation","type":"\u0007","is_mandatory":true,"title":"SQL database default secondary location"},"earliestRestoreDate":{"name":"earliestRestoreDate","type":"\t","is_mandatory":true,"title":"SQL database earliest restore date"},"edition":{"name":"edition","type":"\u0007","is_mandatory":true,"title":"SQL database edition"},"elasticPoolName":{"name":"elasticPoolName","type":"\u0007","is_mandatory":true,"title":"SQL database elastic pool name"},"failoverGroupId":{"name":"failoverGroupId","type":"\u0007","is_mandatory":true,"title":"SQL database failover group ID"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"SQL database ID"},"maxSizeBytes":{"name":"maxSizeBytes","type":"\u0005","is_mandatory":true,"title":"SQL database max byte size"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"SQL database name"},"readScale":{"name":"readScale","type":"\u0007","is_mandatory":true,"title":"SQL database read scale"},"recommendedIndex":{"name":"recommendedIndex","type":"\n","title":"Deprecated. Use `advisor.recommendedActions` instead."},"recoveryServicesRecoveryPointResourceId":{"name":"recoveryServicesRecoveryPointResourceId","type":"\u0007","is_mandatory":true,"title":"SQL database recovery services recovery point ID"},"requestedServiceObjectiveId":{"name":"requestedServiceObjectiveId","type":"\u0007","title":"Deprecated. Use `requestedServiceObjectiveName` instead."},"requestedServiceObjectiveName":{"name":"requestedServiceObjectiveName","type":"\u0007","is_mandatory":true,"title":"SQL database requested objective name"},"restorePointInTime":{"name":"restorePointInTime","type":"\t","is_mandatory":true,"title":"SQL database restore point"},"sampleName":{"name":"sampleName","type":"\u0007","is_mandatory":true,"title":"SQL database sample name"},"serviceLevelObjective":{"name":"serviceLevelObjective","type":"\u0007","is_mandatory":true,"title":"SQL database service level objective"},"serviceTierAdvisors":{"name":"serviceTierAdvisors","type":"\n","title":"Deprecated"},"sourceDatabaseDeletionDate":{"name":"sourceDatabaseDeletionDate","type":"\t","is_mandatory":true,"title":"SQL database deletion date"},"sourceDatabaseId":{"name":"sourceDatabaseId","type":"\u0007","is_mandatory":true,"title":"SQL database source database ID"},"status":{"name":"status","type":"\u0007","is_mandatory":true,"title":"SQL database status"},"threatDetectionPolicy":{"name":"threatDetectionPolicy","type":"\n","title":"SQL database threat detection policy"},"transparentDataEncryption":{"name":"transparentDataEncryption","type":"\n","title":"SQL database transparent data encryption"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"SQL database type"},"usage":{"name":"usage","type":"\u0019\u001bazure.sql.databaseusage","title":"SQL database usage"},"zoneRedundant":{"name":"zoneRedundant","type":"\u0004","is_mandatory":true,"title":"Whether SQL server is zone redundant"}},"title":"Azure SQL Server Database","private":true,"defaults":"id name"},"azure.sql.databaseusage":{"id":"azure.sql.databaseusage","name":"azure.sql.databaseusage","fields":{"currentValue":{"name":"currentValue","type":"\u0006","is_mandatory":true,"title":"Database usage current value"},"displayName":{"name":"displayName","type":"\u0007","is_mandatory":true,"title":"Database usage display name"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Database usage ID"},"limit":{"name":"limit","type":"\u0006","is_mandatory":true,"title":"Database usage limit"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Database usage name"},"nextResetTime":{"name":"nextResetTime","type":"\t","title":"Deprecated"},"resourceName":{"name":"resourceName","type":"\u0007","is_mandatory":true,"title":"Database usage resource name"},"unit":{"name":"unit","type":"\u0007","is_mandatory":true,"title":"Database usage unit"}},"title":"Azure SQL Database Usage","private":true,"defaults":"id name"},"azure.sql.firewallrule":{"id":"azure.sql.firewallrule","name":"azure.sql.firewallrule","fields":{"endIpAddress":{"name":"endIpAddress","type":"\u0007","is_mandatory":true,"title":"SQL firewall rule end IP address"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"SQL firewall rule ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"SQL firewall rule name"},"startIpAddress":{"name":"startIpAddress","type":"\u0007","is_mandatory":true,"title":"SQL firewall rule start IP address"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"SQL firewall rule type"}},"title":"Azure SQL Firewall Rule","private":true,"defaults":"id name"},"azure.sql.server":{"id":"azure.sql.server","name":"azure.sql.server","fields":{"auditingPolicy":{"name":"auditingPolicy","type":"\n","title":"SQL server auditing policy"},"azureAdAdministrators":{"name":"azureAdAdministrators","type":"\u0019\u001bazure.sql.server.administrator","title":"SQL server AD administrators"},"connectionPolicy":{"name":"connectionPolicy","type":"\n","title":"SQL server connection policy"},"databases":{"name":"databases","type":"\u0019\u001bazure.sql.database","title":"SQL server databases"},"encryptionProtector":{"name":"encryptionProtector","type":"\n","title":"SQL server encryption protector"},"firewallRules":{"name":"firewallRules","type":"\u0019\u001bazure.sql.firewallrule","title":"SQL server firewall rules"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"SQL server ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"SQL server location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"SQL server name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"SQL server properties"},"securityAlertPolicy":{"name":"securityAlertPolicy","type":"\n","title":"SQL server security alert policy"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"SQL server tags"},"threatDetectionPolicy":{"name":"threatDetectionPolicy","type":"\n","title":"SQL server threat detection policy"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"SQL server type"},"vulnerabilityAssessmentSettings":{"name":"vulnerabilityAssessmentSettings","type":"\u001bazure.sql.server.vulnerabilityassessmentsettings","title":"SQL server vulnerability assessment settings"}},"title":"Azure SQL Server","private":true,"defaults":"name location"},"azure.sql.server.administrator":{"id":"azure.sql.server.administrator","name":"azure.sql.server.administrator","fields":{"administratorType":{"name":"administratorType","type":"\u0007","is_mandatory":true,"title":"SQL administrator type"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"SQL administrator ID"},"login":{"name":"login","type":"\u0007","is_mandatory":true,"title":"SQL administrator login"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"SQL administrator name"},"sid":{"name":"sid","type":"\u0007","is_mandatory":true,"title":"SQL administrator subscription ID"},"tenantId":{"name":"tenantId","type":"\u0007","is_mandatory":true,"title":"SQL administrator tenant ID"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"SQL administrator type"}},"title":"Azure SQL Server Administrator","private":true,"defaults":"id name"},"azure.sql.server.vulnerabilityassessmentsettings":{"id":"azure.sql.server.vulnerabilityassessmentsettings","name":"azure.sql.server.vulnerabilityassessmentsettings","fields":{"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"ID of the vulnerability assessment"},"mailSubscriptionAdmins":{"name":"mailSubscriptionAdmins","type":"\u0004","is_mandatory":true,"title":"Whether the schedule scan notification is also sent to the subscription administrators"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Name of the vulnerability assessment"},"recurringScanEmails":{"name":"recurringScanEmails","type":"\u0019\u0007","is_mandatory":true,"title":"Specifies an array of e-mail addresses to which the scan notification is sent"},"recurringScanEnabled":{"name":"recurringScanEnabled","type":"\u0004","is_mandatory":true,"title":"Indicates whether recurring scan is enabled"},"storageAccountAccessKey":{"name":"storageAccountAccessKey","type":"\u0007","is_mandatory":true,"title":"Identifier key of the storage account for vulnerability assessment scan results"},"storageContainerPath":{"name":"storageContainerPath","type":"\u0007","is_mandatory":true,"title":"Blob storage container path to hold the scan results"},"storageContainerSasKey":{"name":"storageContainerSasKey","type":"\u0007","is_mandatory":true,"title":"Shared access signature key that has write access to the blob container specified in 'storageContainerPath'"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Type of the vulnerability assessment"}},"title":"Azure SQL Server Vulnerability Assessment Settings","private":true},"azure.storage":{"id":"azure.storage","name":"azure.storage","fields":{"accounts":{"name":"accounts","type":"\u0019\u001bazure.storage.account","title":"List of storage accounts"}},"title":"Azure Storage"},"azure.storage.account":{"id":"azure.storage.account","name":"azure.storage.account","fields":{"blobProperties":{"name":"blobProperties","type":"\u001bazure.storage.account.blobService.properties","title":"Storage account blob properties"},"containers":{"name":"containers","type":"\u0019\u001bazure.storage.container","title":"Storage account containers"},"dataProtection":{"name":"dataProtection","type":"\u001bazure.storage.account.dataProtection","title":"Storage account data protection"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Storage account ID"},"identity":{"name":"identity","type":"\n","is_mandatory":true,"title":"Storage account identity"},"kind":{"name":"kind","type":"\u0007","is_mandatory":true,"title":"Storage account kind"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Storage account location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Storage account name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Storage account properties"},"queueProperties":{"name":"queueProperties","type":"\u001bazure.storage.account.queueService.properties","title":"Storage account queue properties"},"sku":{"name":"sku","type":"\n","is_mandatory":true,"title":"Storage account sku"},"tableProperties":{"name":"tableProperties","type":"\u001bazure.storage.account.tableService.properties","title":"Storage account table properties"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Storage account tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Storage account type"}},"title":"Azure Storage Account","private":true,"defaults":"id name location"},"azure.storage.account.blobService.properties":{"id":"azure.storage.account.blobService.properties","name":"azure.storage.account.blobService.properties","fields":{"hourMetrics":{"name":"hourMetrics","type":"\u001bazure.storage.account.service.properties.metrics","is_mandatory":true,"title":"Hourly metrics properties"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"ID of the service"},"logging":{"name":"logging","type":"\u001bazure.storage.account.service.properties.logging","is_mandatory":true,"title":"Logging properties"},"minuteMetrics":{"name":"minuteMetrics","type":"\u001bazure.storage.account.service.properties.metrics","is_mandatory":true,"title":"Minute metrics properties"}},"title":"Azure Storage Account Blob Service Properties","private":true},"azure.storage.account.dataProtection":{"id":"azure.storage.account.dataProtection","name":"azure.storage.account.dataProtection","fields":{"blobRetentionDays":{"name":"blobRetentionDays","type":"\u0005","is_mandatory":true,"title":"Retention period in days for deleted blobs"},"blobSoftDeletionEnabled":{"name":"blobSoftDeletionEnabled","type":"\u0004","is_mandatory":true,"title":"Whether soft deletion of blobs is enabled"},"containerRetentionDays":{"name":"containerRetentionDays","type":"\u0005","is_mandatory":true,"title":"Retention period in days for deleted containers"},"containerSoftDeletionEnabled":{"name":"containerSoftDeletionEnabled","type":"\u0004","is_mandatory":true,"title":"Whether soft deletion of containers is enabled"},"storageAccountId":{"name":"storageAccountId","type":"\u0007","is_mandatory":true,"title":"ID of the storage account"}},"title":"Azure Storage Account Data Protection","private":true},"azure.storage.account.queueService.properties":{"id":"azure.storage.account.queueService.properties","name":"azure.storage.account.queueService.properties","fields":{"hourMetrics":{"name":"hourMetrics","type":"\u001bazure.storage.account.service.properties.metrics","is_mandatory":true,"title":"Hourly metrics properties"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"ID of the service"},"logging":{"name":"logging","type":"\u001bazure.storage.account.service.properties.logging","is_mandatory":true,"title":"Logging properties"},"minuteMetrics":{"name":"minuteMetrics","type":"\u001bazure.storage.account.service.properties.metrics","is_mandatory":true,"title":"Minute metrics properties"}},"title":"Azure Storage Account Queue Service Properties","private":true},"azure.storage.account.service.properties.logging":{"id":"azure.storage.account.service.properties.logging","name":"azure.storage.account.service.properties.logging","fields":{"delete":{"name":"delete","type":"\u0004","is_mandatory":true,"title":"Whether delete requests are being logged"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"ID of the logging configuration"},"read":{"name":"read","type":"\u0004","is_mandatory":true,"title":"Whether read requests are being logged"},"retentionPolicy":{"name":"retentionPolicy","type":"\u001bazure.storage.account.service.properties.retentionPolicy","is_mandatory":true,"title":"Retention policy for the logging metrics"},"version":{"name":"version","type":"\u0007","is_mandatory":true,"title":"Logging version"},"write":{"name":"write","type":"\u0004","is_mandatory":true,"title":"Whether write requests are being logged"}},"title":"Azure Storage Account Service Properties Logging","private":true},"azure.storage.account.service.properties.metrics":{"id":"azure.storage.account.service.properties.metrics","name":"azure.storage.account.service.properties.metrics","fields":{"enabled":{"name":"enabled","type":"\u0004","is_mandatory":true,"title":"Whether the metrics are enabled"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"ID of the metrics"},"includeAPIs":{"name":"includeAPIs","type":"\u0004","is_mandatory":true,"title":"Whether metrics generate summary statistics for called API operations"},"retentionPolicy":{"name":"retentionPolicy","type":"\u001bazure.storage.account.service.properties.retentionPolicy","is_mandatory":true,"title":"Retention policy for the metrics"},"version":{"name":"version","type":"\u0007","is_mandatory":true,"title":"Version of the metrics"}},"title":"Azure Storage Account Service Properties Metrics","private":true},"azure.storage.account.service.properties.retentionPolicy":{"id":"azure.storage.account.service.properties.retentionPolicy","name":"azure.storage.account.service.properties.retentionPolicy","fields":{"enabled":{"name":"enabled","type":"\u0004","is_mandatory":true,"title":"Whether a retention policy is enabled for the Azure Storage"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"ID of the retention policy"},"retentionDays":{"name":"retentionDays","type":"\u0005","is_mandatory":true,"title":"Number of days that metrics or logging data is retained"}},"title":"Azure Storage Account Service Properties Retention Policy","private":true},"azure.storage.account.tableService.properties":{"id":"azure.storage.account.tableService.properties","name":"azure.storage.account.tableService.properties","fields":{"hourMetrics":{"name":"hourMetrics","type":"\u001bazure.storage.account.service.properties.metrics","is_mandatory":true,"title":"Hourly metrics properties"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"ID of the service"},"logging":{"name":"logging","type":"\u001bazure.storage.account.service.properties.logging","is_mandatory":true,"title":"Logging properties"},"minuteMetrics":{"name":"minuteMetrics","type":"\u001bazure.storage.account.service.properties.metrics","is_mandatory":true,"title":"Minute metrics properties"}},"title":"Azure Storage Account Table Service Properties","private":true},"azure.storage.container":{"id":"azure.storage.container","name":"azure.storage.container","fields":{"etag":{"name":"etag","type":"\u0007","is_mandatory":true,"title":"Storage container etag"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Storage container ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Storage container name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Storage container properties"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Storage container type"}},"title":"Azure Storage Container","private":true,"defaults":"id name"},"azure.web":{"id":"azure.web","name":"azure.web","fields":{"apps":{"name":"apps","type":"\u0019\u001bazure.web.appsite","title":"List of web apps"},"availableRuntimes":{"name":"availableRuntimes","type":"\u0019\n","title":"Available runtimes"}},"title":"Azure Web"},"azure.web.appsite":{"id":"azure.web.appsite","name":"azure.web.appsite","fields":{"applicationSettings":{"name":"applicationSettings","type":"\n","title":"Appsite application settings"},"authenticationSettings":{"name":"authenticationSettings","type":"\u001bazure.web.appsiteauthsettings","title":"Appsite authentication settings"},"configuration":{"name":"configuration","type":"\u001bazure.web.appsiteconfig","title":"Appsite configuration"},"connectionSettings":{"name":"connectionSettings","type":"\n","title":"Appsite connection settings"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Appsite ID"},"identity":{"name":"identity","type":"\n","is_mandatory":true,"title":"Appsite identity"},"kind":{"name":"kind","type":"\u0007","is_mandatory":true,"title":"Appsite kind"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Appsite location"},"metadata":{"name":"metadata","type":"\n","title":"Appsite metadata"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Appsite name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Appsite properties"},"stack":{"name":"stack","type":"\n","title":"Appsite stack"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Appsite tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Appsite type"}},"title":"Azure Web App Site","private":true,"defaults":"id name location"},"azure.web.appsiteauthsettings":{"id":"azure.web.appsiteauthsettings","name":"azure.web.appsiteauthsettings","fields":{"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Auth settings ID"},"kind":{"name":"kind","type":"\u0007","is_mandatory":true,"title":"Auth settings kind"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Auth settings name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Auth settings properties"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Auth settings type"}},"title":"Azure AppSite Authentication Settings","private":true,"defaults":"id name"},"azure.web.appsiteconfig":{"id":"azure.web.appsiteconfig","name":"azure.web.appsiteconfig","fields":{"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Appsite config ID"},"kind":{"name":"kind","type":"\u0007","is_mandatory":true,"title":"Appsite config kind"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Appsite config name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Appsite config properties"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Appsite config type"}},"title":"Azure AppSite Config","private":true,"defaults":"id name"},"azuread":{"id":"azuread","name":"azuread","fields":{"applications":{"name":"applications","type":"\u0019\u001bazuread.application","title":"Deprecated. Use `microsoft.application` instead."},"domains":{"name":"domains","type":"\u0019\u001bazuread.domain","title":"Deprecated. Use `microsoft.domain` instead."},"groups":{"name":"groups","type":"\u0019\u001bazuread.group","title":"Deprecated. Use microsoft.group"},"servicePrincipals":{"name":"servicePrincipals","type":"\u0019\u001bazuread.serviceprincipal","title":"Deprecated. Use `microsoft.serviceprincipal` instead."},"users":{"name":"users","type":"\u0019\u001bazuread.user","title":"Deprecated. Use `microsoft.user` instead."}},"title":"Azure Active Directory (deprecated, use microsoft resource pack instead)"},"azuread.application":{"id":"azuread.application","name":"azuread.application","fields":{"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Application ID"}},"title":"Deprecated. Use `microsoft.application` instead","private":true,"defaults":"id"},"azuread.domain":{"id":"azuread.domain","name":"azuread.domain","fields":{"authenticationType":{"name":"authenticationType","type":"\u0007","is_mandatory":true,"title":"Domain authentication type"},"isDefault":{"name":"isDefault","type":"\u0004","is_mandatory":true,"title":"Whether domain is default"},"isVerified":{"name":"isVerified","type":"\u0004","is_mandatory":true,"title":"Whether domain is verified"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Domain name"},"properties":{"name":"properties","type":"\n","title":"Deprecated"}},"title":"Azure Active Directory Domain (deprecated, use microsoft.domain instead)","private":true,"defaults":"name"},"azuread.group":{"id":"azuread.group","name":"azuread.group","fields":{"displayName":{"name":"displayName","type":"\u0007","is_mandatory":true,"title":"Group display name"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Group ID"},"mail":{"name":"mail","type":"\u0007","is_mandatory":true,"title":"Group email"},"mailEnabled":{"name":"mailEnabled","type":"\u0004","is_mandatory":true,"title":"Whether mail is enabled for group"},"mailNickname":{"name":"mailNickname","type":"\u0007","is_mandatory":true,"title":"Group nickname"},"members":{"name":"members","type":"\u0019\u001bazuread.user","title":"Group members"},"objectType":{"name":"objectType","type":"\u0007","title":"Deprecated"},"properties":{"name":"properties","type":"\n","title":"Deprecated"},"securityEnabled":{"name":"securityEnabled","type":"\u0004","is_mandatory":true,"title":"Whether security is enabled for group"}},"title":"Azure Active Directory Group (deprecated, use microsoft.group instead)","private":true,"defaults":"displayName"},"azuread.serviceprincipal":{"id":"azuread.serviceprincipal","name":"azuread.serviceprincipal","fields":{"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Service principal ID"}},"title":"Deprecated. Use `microsoft.serviceprincipal` instead.","private":true,"defaults":"id"},"azuread.user":{"id":"azuread.user","name":"azuread.user","fields":{"accountEnabled":{"name":"accountEnabled","type":"\u0004","is_mandatory":true,"title":"User account status"},"displayName":{"name":"displayName","type":"\u0007","is_mandatory":true,"title":"User display name"},"givenName":{"name":"givenName","type":"\u0007","is_mandatory":true,"title":"User given name"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"User id"},"mail":{"name":"mail","type":"\u0007","is_mandatory":true,"title":"User email"},"mailNickname":{"name":"mailNickname","type":"\u0007","is_mandatory":true,"title":"User mail nickname"},"objectType":{"name":"objectType","type":"\u0007","title":"Deprecated"},"properties":{"name":"properties","type":"\n","title":"Deprecated"},"surname":{"name":"surname","type":"\u0007","is_mandatory":true,"title":"User surname"},"userPrincipalName":{"name":"userPrincipalName","type":"\u0007","is_mandatory":true,"title":"User principal name"},"userType":{"name":"userType","type":"\u0007","is_mandatory":true,"title":"Azure Directory user type"}},"title":"Azure Active Directory User (deprecated, use microsoft.user instead)","private":true,"defaults":"id displayName"},"azurerm":{"id":"azure","name":"azure","fields":{"resourceGroups":{"name":"resourceGroups","type":"\u0019\u001bazure.resourcegroup","title":"Get all the resource groups in a subscription"},"resources":{"name":"resources","type":"\u0019\u001bazure.resource","title":"Get all the resources in a subscription"}},"title":"Azure Resources"},"azurerm.compute":{"id":"azure.compute","name":"azure.compute","fields":{"disks":{"name":"disks","type":"\u0019\u001bazure.compute.disk","title":"Lists all the disks under a subscription"},"vms":{"name":"vms","type":"\u0019\u001bazure.compute.vm","title":"Lists all compute instances"}},"title":"Azure Compute"},"azurerm.compute.disk":{"id":"azure.compute.disk","name":"azure.compute.disk","fields":{"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Disk resource id"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Disk resource location"},"managedBy":{"name":"managedBy","type":"\u0007","is_mandatory":true,"title":"A relative URI containing the ID of the VM that has the disk attached"},"managedByExtended":{"name":"managedByExtended","type":"\u0019\u0007","is_mandatory":true,"title":"List of relative URIs containing the IDs of the VMs that have the disk attached"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Disk resource name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Disk resource properties"},"sku":{"name":"sku","type":"\n","is_mandatory":true,"title":"The disk sku name and tier"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Disk resource tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Disk resource type"},"zones":{"name":"zones","type":"\u0019\u0007","is_mandatory":true,"title":"The logical zone list for disk"}},"title":"Azure Disk Resource","private":true,"defaults":"id name location"},"azurerm.compute.vm":{"id":"azure.compute.vm","name":"azure.compute.vm","fields":{"dataDisks":{"name":"dataDisks","type":"\u0019\u001bazure.compute.disk","title":"VM compute data disk"},"extensions":{"name":"extensions","type":"\u0019\n","title":"VM extension"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"VM ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"VM location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"VM name"},"osDisk":{"name":"osDisk","type":"\u001bazure.compute.disk","title":"VM compute disk"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"VM properties"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"VM tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"VM type"}},"title":"Azure Compute Virtual Machine","private":true,"defaults":"id name location "},"azurerm.keyvault":{"id":"azure.keyvault","name":"azure.keyvault","fields":{"vaults":{"name":"vaults","type":"\u0019\u001bazure.keyvault.vault","title":"List of Azure key vaults"}},"title":"Azure Key Vault"},"azurerm.keyvault.certificate":{"id":"azure.keyvault.certificate","name":"azure.keyvault.certificate","fields":{"certName":{"name":"certName","type":"\u0007","title":"Certificate name"},"created":{"name":"created","type":"\t","is_mandatory":true,"title":"Certificate creation time"},"enabled":{"name":"enabled","type":"\u0004","is_mandatory":true,"title":"Whether certificate is enabled"},"expires":{"name":"expires","type":"\t","is_mandatory":true,"title":"Certificate expiration date"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Certificate ID"},"notBefore":{"name":"notBefore","type":"\t","is_mandatory":true,"title":"Certificate not before date"},"recoveryLevel":{"name":"recoveryLevel","type":"\u0007","is_mandatory":true,"title":"Certificate recovery level"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Certificate tags"},"updated":{"name":"updated","type":"\t","is_mandatory":true,"title":"Certificate last update time"},"version":{"name":"version","type":"\u0007","title":"Certificate version"},"versions":{"name":"versions","type":"\u0019\u001bazure.keyvault.certificate","title":"List of certificate versions"},"x5t":{"name":"x5t","type":"\u0007","is_mandatory":true,"title":"Certificate x5t"}},"title":"Azure Key Vault Certificate","private":true,"defaults":"id certName"},"azurerm.keyvault.key":{"id":"azure.keyvault.key","name":"azure.keyvault.key","fields":{"created":{"name":"created","type":"\t","is_mandatory":true,"title":"Key creation time"},"enabled":{"name":"enabled","type":"\u0004","is_mandatory":true,"title":"Whether key is enabled"},"expires":{"name":"expires","type":"\t","is_mandatory":true,"title":"Key expiration date"},"keyName":{"name":"keyName","type":"\u0007","title":"Key name"},"kid":{"name":"kid","type":"\u0007","is_mandatory":true,"title":"Key ID"},"managed":{"name":"managed","type":"\u0004","is_mandatory":true,"title":"Whether key is managed"},"notBefore":{"name":"notBefore","type":"\t","is_mandatory":true,"title":"Key not before date"},"recoveryLevel":{"name":"recoveryLevel","type":"\u0007","is_mandatory":true,"title":"Key recovery level"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Key tags"},"updated":{"name":"updated","type":"\t","is_mandatory":true,"title":"Key last update time"},"version":{"name":"version","type":"\u0007","title":"Key version"},"versions":{"name":"versions","type":"\u0019\u001bazure.keyvault.key","title":"List of key versions"}},"title":"Azure Key Vault Key","private":true,"defaults":"kid keyName"},"azurerm.keyvault.secret":{"id":"azure.keyvault.secret","name":"azure.keyvault.secret","fields":{"contentType":{"name":"contentType","type":"\u0007","is_mandatory":true,"title":"Secret content type"},"created":{"name":"created","type":"\t","is_mandatory":true,"title":"Secret creation date"},"enabled":{"name":"enabled","type":"\u0004","is_mandatory":true,"title":"Whether secret is enabled"},"expires":{"name":"expires","type":"\t","is_mandatory":true,"title":"Secret expiration date"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Secret ID"},"managed":{"name":"managed","type":"\u0004","is_mandatory":true,"title":"Whether secret is managed"},"notBefore":{"name":"notBefore","type":"\t","is_mandatory":true,"title":"Secret notBefore date"},"secretName":{"name":"secretName","type":"\u0007","title":"Secret name"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Secret tags"},"updated":{"name":"updated","type":"\t","is_mandatory":true,"title":"Secret last updated date"},"version":{"name":"version","type":"\u0007","title":"Secret version"},"versions":{"name":"versions","type":"\u0019\u001bazure.keyvault.secret","title":"List of secret versions"}},"title":"Azure Key Vault Secret","private":true,"defaults":"id secretName"},"azurerm.keyvault.vault":{"id":"azure.keyvault.vault","name":"azure.keyvault.vault","fields":{"certificates":{"name":"certificates","type":"\u0019\u001bazure.keyvault.certificate","title":"Key Vault certificates"},"diagnosticSettings":{"name":"diagnosticSettings","type":"\u0019\u001bazure.monitor.diagnosticsetting","title":"Key Vault diagnostic settings"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Key Vault ID"},"keys":{"name":"keys","type":"\u0019\u001bazure.keyvault.key","title":"Key Vault keys"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Key Vault location"},"properties":{"name":"properties","type":"\n","title":"Key Vault properties"},"secrets":{"name":"secrets","type":"\u0019\u001bazure.keyvault.secret","title":"Key Vault secrets"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Key Vault tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Key Vault type"},"vaultName":{"name":"vaultName","type":"\u0007","is_mandatory":true,"title":"Key Vault name"},"vaultUri":{"name":"vaultUri","type":"\u0007","title":"Key Vault URL"}},"title":"Azure Key Vault Vault","private":true,"defaults":"id vaultName location"},"azurerm.mariadb":{"id":"azure.mariadb","name":"azure.mariadb","fields":{"servers":{"name":"servers","type":"\u0019\u001bazure.mariadb.server","title":"List of MariaDB servers"}},"title":"Azure Database for MariaDB"},"azurerm.mariadb.database":{"id":"azure.mariadb.database","name":"azure.mariadb.database","fields":{"charset":{"name":"charset","type":"\u0007","is_mandatory":true,"title":"MariaDB database charset"},"collation":{"name":"collation","type":"\u0007","is_mandatory":true,"title":"MariaDB database collation"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"MariaDB database ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"MariaDB database name"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"MariaDB database type"}},"title":"Azure Database for MariaDB Database","private":true,"defaults":"id name"},"azurerm.mariadb.server":{"id":"azure.mariadb.server","name":"azure.mariadb.server","fields":{"configuration":{"name":"configuration","type":"\u0019\u001bazure.sql.configuration","title":"MariaDB server configuration"},"databases":{"name":"databases","type":"\u0019\u001bazure.mariadb.database","title":"MariaDB server databases"},"firewallRules":{"name":"firewallRules","type":"\u0019\u001bazure.sql.firewallrule","title":"MariaDB server firewall rules"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"MariaDB server ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"MariaDB server location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"MariaDB server name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"MariaDB server properties"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"MariaDB server tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"MariaDB server type"}},"title":"Azure Database for MariaDB Server","private":true,"defaults":"id name location"},"azurerm.monitor":{"id":"azure.monitor","name":"azure.monitor","fields":{"activityLog":{"name":"activityLog","type":"\u001bazure.monitor.activitylog","title":"Activity log for the monitor"},"diagnosticSettings":{"name":"diagnosticSettings","type":"\u0019\u001bazure.monitor.diagnosticsetting","title":"List of diagnostic settings for the subscription"},"logProfiles":{"name":"logProfiles","type":"\u0019\u001bazure.monitor.logprofile","title":"List of log profiles"}},"title":"Azure Monitor"},"azurerm.monitor.diagnosticsetting":{"id":"azure.monitor.diagnosticsetting","name":"azure.monitor.diagnosticsetting","fields":{"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Diagnostic setting ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Diagnostic setting name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Diagnostic setting properties"},"storageAccount":{"name":"storageAccount","type":"\u001bazure.storage.account","is_mandatory":true,"title":"Diagnostic setting storage account"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Diagnostic setting type"}},"title":"Azure Monitor Diagnostic Setting","private":true,"defaults":"id name"},"azurerm.monitor.logprofile":{"id":"azure.monitor.logprofile","name":"azure.monitor.logprofile","fields":{"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Log profile ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Log profile location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Log profile name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Log profile properties"},"storageAccount":{"name":"storageAccount","type":"\u001bazure.storage.account","is_mandatory":true,"title":"Log profile storage account"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Log profile tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Log profile type"}},"title":"Azure Monitor Log Profile","private":true,"defaults":"id name location"},"azurerm.mysql":{"id":"azure.mysql","name":"azure.mysql","fields":{"flexibleServers":{"name":"flexibleServers","type":"\u0019\u001bazure.mysql.flexibleServer","title":"List of Flexible MySQL servers"},"servers":{"name":"servers","type":"\u0019\u001bazure.mysql.server","title":"List of MySQL servers"}},"title":"Azure Database for MySQL"},"azurerm.mysql.database":{"id":"azure.mysql.database","name":"azure.mysql.database","fields":{"charset":{"name":"charset","type":"\u0007","is_mandatory":true,"title":"MySQL database charset"},"collation":{"name":"collation","type":"\u0007","is_mandatory":true,"title":"MySQL database collation"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"MySQL database ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"MySQL database name"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"MySQL database type"}},"title":"Azure Database for MySQL Database","private":true,"defaults":"id name"},"azurerm.mysql.server":{"id":"azure.mysql.server","name":"azure.mysql.server","fields":{"configuration":{"name":"configuration","type":"\u0019\u001bazure.sql.configuration","title":"MySQL server configuration"},"databases":{"name":"databases","type":"\u0019\u001bazure.mysql.database","title":"MySQL server databases"},"firewallRules":{"name":"firewallRules","type":"\u0019\u001bazure.sql.firewallrule","title":"MySQL server firewall rules"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"MySQL server ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"MySQL server location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"MySQL server name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"MySQL server properties"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"MySQL server tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"MySQL server type"}},"title":"Azure Database for MySQL Server","private":true,"defaults":"id name location"},"azurerm.network":{"id":"azure.network","name":"azure.network","fields":{"interfaces":{"name":"interfaces","type":"\u0019\u001bazure.network.interface","title":"List of network interfaces"},"securityGroups":{"name":"securityGroups","type":"\u0019\u001bazure.network.securitygroup","title":"List of network security groups"},"watchers":{"name":"watchers","type":"\u0019\u001bazure.network.watcher","title":"List of network watchers"}},"title":"Azure Network"},"azurerm.network.interface":{"id":"azure.network.interface","name":"azure.network.interface","fields":{"etag":{"name":"etag","type":"\u0007","is_mandatory":true,"title":"Network interface etag"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Network interface ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Network interface name"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Network interface name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Network interface properties"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Network interface tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Network interface type"},"vm":{"name":"vm","type":"\u001bazure.compute.vm","title":"Network interface compute vm"}},"title":"Azure Network Interface","private":true,"defaults":"id name location"},"azurerm.network.securitygroup":{"id":"azure.network.securitygroup","name":"azure.network.securitygroup","fields":{"defaultSecurityRules":{"name":"defaultSecurityRules","type":"\u0019\u001bazure.network.securityrule","is_mandatory":true,"title":"Security group default security rules"},"etag":{"name":"etag","type":"\u0007","is_mandatory":true,"title":"Security group etag"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Security group ID"},"interfaces":{"name":"interfaces","type":"\u0019\u001bazure.network.interface","is_mandatory":true,"title":"Security group interfaces"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Security group location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Security group name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Security group properties"},"securityRules":{"name":"securityRules","type":"\u0019\u001bazure.network.securityrule","is_mandatory":true,"title":"Security group rules"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Security group tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Security group type"}},"title":"Azure Network Security Group","private":true,"defaults":"id name location"},"azurerm.network.securityrule":{"id":"azure.network.securityrule","name":"azure.network.securityrule","fields":{"destinationPortRange":{"name":"destinationPortRange","type":"\u0019\n","is_mandatory":true,"title":"Security rule destination port range"},"etag":{"name":"etag","type":"\u0007","is_mandatory":true,"title":"Security rule etag"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Security rule ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Security rule name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Security rule properties"}},"title":"Azure Network Security Rule","private":true,"defaults":"id name"},"azurerm.network.watcher":{"id":"azure.network.watcher","name":"azure.network.watcher","fields":{"etag":{"name":"etag","type":"\u0007","is_mandatory":true,"title":"Network watcher etag"},"flowLogs":{"name":"flowLogs","type":"\u0019\u001bazure.network.watcher.flowlog","title":"Network watcher flow logs"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Network watcher ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Network watcher location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Network watcher name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Network watcher properties"},"provisioningState":{"name":"provisioningState","type":"\u0007","is_mandatory":true,"title":"Network watcher provisioning state"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Network watcher tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Network watcher type"}},"title":"Azure Network Watcher","private":true,"defaults":"name location"},"azurerm.postgresql":{"id":"azure.postgresql","name":"azure.postgresql","fields":{"servers":{"name":"servers","type":"\u0019\u001bazure.postgresql.server","title":"List of PostgreSQL servers"}},"title":"Azure Database for PostgreSQL"},"azurerm.postgresql.database":{"id":"azure.postgresql.database","name":"azure.postgresql.database","fields":{"charset":{"name":"charset","type":"\u0007","is_mandatory":true,"title":"PostgreSQL database charset"},"collation":{"name":"collation","type":"\u0007","is_mandatory":true,"title":"PostgreSQL database collation"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"PostgreSQL database ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"PostgreSQL database name"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"PostgreSQL database type"}},"title":"Azure Database for PostgreSQL Database","private":true,"defaults":"id name"},"azurerm.postgresql.server":{"id":"azure.postgresql.server","name":"azure.postgresql.server","fields":{"configuration":{"name":"configuration","type":"\u0019\u001bazure.sql.configuration","title":"PostgreSQL server configuration"},"databases":{"name":"databases","type":"\u0019\u001bazure.postgresql.database","title":"PostgreSQL server databases"},"firewallRules":{"name":"firewallRules","type":"\u0019\u001bazure.sql.firewallrule","title":"PostgreSQL server firewall rules"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"PostgreSQL server ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"PostgreSQL server location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"PostgreSQL server name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"PostgreSQL server properties"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"PostgreSQL server tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"PostgreSQL server type"}},"title":"Azure Database for PostgreSQL Server","private":true,"defaults":"id name location"},"azurerm.resource":{"id":"azure.resource","name":"azure.resource","fields":{"changedTime":{"name":"changedTime","type":"\t","is_mandatory":true,"title":"Resource change time"},"createdTime":{"name":"createdTime","type":"\t","is_mandatory":true,"title":"Resource create time"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Resource ID"},"identity":{"name":"identity","type":"\n","is_mandatory":true,"title":"Resource identity"},"kind":{"name":"kind","type":"\u0007","is_mandatory":true,"title":"Resource kind"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Resource location"},"managedBy":{"name":"managedBy","type":"\u0007","is_mandatory":true,"title":"Resource managed by"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Resource name"},"plan":{"name":"plan","type":"\n","is_mandatory":true,"title":"Resource plan"},"provisioningState":{"name":"provisioningState","type":"\u0007","is_mandatory":true,"title":"Resource provisioning state"},"sku":{"name":"sku","type":"\n","is_mandatory":true,"title":"Resource SKU"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Resource tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Resource type"}},"title":"Azure Resource","private":true,"defaults":"id name location"},"azurerm.sql":{"id":"azure.sql","name":"azure.sql","fields":{"servers":{"name":"servers","type":"\u0019\u001bazure.sql.server","title":"List of SQL servers"}},"title":"Azure SQL"},"azurerm.sql.configuration":{"id":"azure.sql.configuration","name":"azure.sql.configuration","fields":{"allowedValues":{"name":"allowedValues","type":"\u0007","is_mandatory":true,"title":"SQL configuration allowed values"},"dataType":{"name":"dataType","type":"\u0007","is_mandatory":true,"title":"SQL configuration data type"},"defaultValue":{"name":"defaultValue","type":"\u0007","is_mandatory":true,"title":"SQL configuration default value"},"description":{"name":"description","type":"\u0007","is_mandatory":true,"title":"SQL configuration description"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"SQL configuration ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"SQL configuration name"},"source":{"name":"source","type":"\u0007","is_mandatory":true,"title":"SQL configuration source"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"SQL configuration type"},"value":{"name":"value","type":"\u0007","is_mandatory":true,"title":"SQL configuration value"}},"title":"Azure SQL Configuration","private":true,"defaults":"id name"},"azurerm.sql.database":{"id":"azure.sql.database","name":"azure.sql.database","fields":{"advisor":{"name":"advisor","type":"\u0019\n","title":"SQL database advisor"},"auditingPolicy":{"name":"auditingPolicy","type":"\n","title":"SQL database auditing policy"},"collation":{"name":"collation","type":"\u0007","is_mandatory":true,"title":"SQL database collation"},"connectionPolicy":{"name":"connectionPolicy","type":"\n","title":"SQL database connection policy"},"containmentState":{"name":"containmentState","type":"\u0005","title":"Deprecated"},"createMode":{"name":"createMode","type":"\u0007","is_mandatory":true,"title":"SQL database create mode"},"creationDate":{"name":"creationDate","type":"\t","is_mandatory":true,"title":"SQL database create date"},"currentServiceObjectiveId":{"name":"currentServiceObjectiveId","type":"\u0007","title":"Deprecated. Use `serviceLevelObjective` instead."},"databaseId":{"name":"databaseId","type":"\u0007","is_mandatory":true,"title":"Database ID"},"defaultSecondaryLocation":{"name":"defaultSecondaryLocation","type":"\u0007","is_mandatory":true,"title":"SQL database default secondary location"},"earliestRestoreDate":{"name":"earliestRestoreDate","type":"\t","is_mandatory":true,"title":"SQL database earliest restore date"},"edition":{"name":"edition","type":"\u0007","is_mandatory":true,"title":"SQL database edition"},"elasticPoolName":{"name":"elasticPoolName","type":"\u0007","is_mandatory":true,"title":"SQL database elastic pool name"},"failoverGroupId":{"name":"failoverGroupId","type":"\u0007","is_mandatory":true,"title":"SQL database failover group ID"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"SQL database ID"},"maxSizeBytes":{"name":"maxSizeBytes","type":"\u0005","is_mandatory":true,"title":"SQL database max byte size"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"SQL database name"},"readScale":{"name":"readScale","type":"\u0007","is_mandatory":true,"title":"SQL database read scale"},"recommendedIndex":{"name":"recommendedIndex","type":"\n","title":"Deprecated. Use `advisor.recommendedActions` instead."},"recoveryServicesRecoveryPointResourceId":{"name":"recoveryServicesRecoveryPointResourceId","type":"\u0007","is_mandatory":true,"title":"SQL database recovery services recovery point ID"},"requestedServiceObjectiveId":{"name":"requestedServiceObjectiveId","type":"\u0007","title":"Deprecated. Use `requestedServiceObjectiveName` instead."},"requestedServiceObjectiveName":{"name":"requestedServiceObjectiveName","type":"\u0007","is_mandatory":true,"title":"SQL database requested objective name"},"restorePointInTime":{"name":"restorePointInTime","type":"\t","is_mandatory":true,"title":"SQL database restore point"},"sampleName":{"name":"sampleName","type":"\u0007","is_mandatory":true,"title":"SQL database sample name"},"serviceLevelObjective":{"name":"serviceLevelObjective","type":"\u0007","is_mandatory":true,"title":"SQL database service level objective"},"serviceTierAdvisors":{"name":"serviceTierAdvisors","type":"\n","title":"Deprecated"},"sourceDatabaseDeletionDate":{"name":"sourceDatabaseDeletionDate","type":"\t","is_mandatory":true,"title":"SQL database deletion date"},"sourceDatabaseId":{"name":"sourceDatabaseId","type":"\u0007","is_mandatory":true,"title":"SQL database source database ID"},"status":{"name":"status","type":"\u0007","is_mandatory":true,"title":"SQL database status"},"threatDetectionPolicy":{"name":"threatDetectionPolicy","type":"\n","title":"SQL database threat detection policy"},"transparentDataEncryption":{"name":"transparentDataEncryption","type":"\n","title":"SQL database transparent data encryption"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"SQL database type"},"usage":{"name":"usage","type":"\u0019\u001bazure.sql.databaseusage","title":"SQL database usage"},"zoneRedundant":{"name":"zoneRedundant","type":"\u0004","is_mandatory":true,"title":"Whether SQL server is zone redundant"}},"title":"Azure SQL Server Database","private":true,"defaults":"id name"},"azurerm.sql.databaseusage":{"id":"azure.sql.databaseusage","name":"azure.sql.databaseusage","fields":{"currentValue":{"name":"currentValue","type":"\u0006","is_mandatory":true,"title":"Database usage current value"},"displayName":{"name":"displayName","type":"\u0007","is_mandatory":true,"title":"Database usage display name"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Database usage ID"},"limit":{"name":"limit","type":"\u0006","is_mandatory":true,"title":"Database usage limit"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Database usage name"},"nextResetTime":{"name":"nextResetTime","type":"\t","title":"Deprecated"},"resourceName":{"name":"resourceName","type":"\u0007","is_mandatory":true,"title":"Database usage resource name"},"unit":{"name":"unit","type":"\u0007","is_mandatory":true,"title":"Database usage unit"}},"title":"Azure SQL Database Usage","private":true,"defaults":"id name"},"azurerm.sql.firewallrule":{"id":"azure.sql.firewallrule","name":"azure.sql.firewallrule","fields":{"endIpAddress":{"name":"endIpAddress","type":"\u0007","is_mandatory":true,"title":"SQL firewall rule end IP address"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"SQL firewall rule ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"SQL firewall rule name"},"startIpAddress":{"name":"startIpAddress","type":"\u0007","is_mandatory":true,"title":"SQL firewall rule start IP address"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"SQL firewall rule type"}},"title":"Azure SQL Firewall Rule","private":true,"defaults":"id name"},"azurerm.sql.server":{"id":"azure.sql.server","name":"azure.sql.server","fields":{"auditingPolicy":{"name":"auditingPolicy","type":"\n","title":"SQL server auditing policy"},"azureAdAdministrators":{"name":"azureAdAdministrators","type":"\u0019\u001bazure.sql.server.administrator","title":"SQL server AD administrators"},"connectionPolicy":{"name":"connectionPolicy","type":"\n","title":"SQL server connection policy"},"databases":{"name":"databases","type":"\u0019\u001bazure.sql.database","title":"SQL server databases"},"encryptionProtector":{"name":"encryptionProtector","type":"\n","title":"SQL server encryption protector"},"firewallRules":{"name":"firewallRules","type":"\u0019\u001bazure.sql.firewallrule","title":"SQL server firewall rules"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"SQL server ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"SQL server location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"SQL server name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"SQL server properties"},"securityAlertPolicy":{"name":"securityAlertPolicy","type":"\n","title":"SQL server security alert policy"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"SQL server tags"},"threatDetectionPolicy":{"name":"threatDetectionPolicy","type":"\n","title":"SQL server threat detection policy"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"SQL server type"},"vulnerabilityAssessmentSettings":{"name":"vulnerabilityAssessmentSettings","type":"\u001bazure.sql.server.vulnerabilityassessmentsettings","title":"SQL server vulnerability assessment settings"}},"title":"Azure SQL Server","private":true,"defaults":"name location"},"azurerm.sql.server.administrator":{"id":"azure.sql.server.administrator","name":"azure.sql.server.administrator","fields":{"administratorType":{"name":"administratorType","type":"\u0007","is_mandatory":true,"title":"SQL administrator type"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"SQL administrator ID"},"login":{"name":"login","type":"\u0007","is_mandatory":true,"title":"SQL administrator login"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"SQL administrator name"},"sid":{"name":"sid","type":"\u0007","is_mandatory":true,"title":"SQL administrator subscription ID"},"tenantId":{"name":"tenantId","type":"\u0007","is_mandatory":true,"title":"SQL administrator tenant ID"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"SQL administrator type"}},"title":"Azure SQL Server Administrator","private":true,"defaults":"id name"},"azurerm.storage":{"id":"azure.storage","name":"azure.storage","fields":{"accounts":{"name":"accounts","type":"\u0019\u001bazure.storage.account","title":"List of storage accounts"}},"title":"Azure Storage"},"azurerm.storage.account":{"id":"azure.storage.account","name":"azure.storage.account","fields":{"blobProperties":{"name":"blobProperties","type":"\u001bazure.storage.account.blobService.properties","title":"Storage account blob properties"},"containers":{"name":"containers","type":"\u0019\u001bazure.storage.container","title":"Storage account containers"},"dataProtection":{"name":"dataProtection","type":"\u001bazure.storage.account.dataProtection","title":"Storage account data protection"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Storage account ID"},"identity":{"name":"identity","type":"\n","is_mandatory":true,"title":"Storage account identity"},"kind":{"name":"kind","type":"\u0007","is_mandatory":true,"title":"Storage account kind"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Storage account location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Storage account name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Storage account properties"},"queueProperties":{"name":"queueProperties","type":"\u001bazure.storage.account.queueService.properties","title":"Storage account queue properties"},"sku":{"name":"sku","type":"\n","is_mandatory":true,"title":"Storage account sku"},"tableProperties":{"name":"tableProperties","type":"\u001bazure.storage.account.tableService.properties","title":"Storage account table properties"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Storage account tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Storage account type"}},"title":"Azure Storage Account","private":true,"defaults":"id name location"},"azurerm.storage.container":{"id":"azure.storage.container","name":"azure.storage.container","fields":{"etag":{"name":"etag","type":"\u0007","is_mandatory":true,"title":"Storage container etag"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Storage container ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Storage container name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Storage container properties"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Storage container type"}},"title":"Azure Storage Container","private":true,"defaults":"id name"},"azurerm.web":{"id":"azure.web","name":"azure.web","fields":{"apps":{"name":"apps","type":"\u0019\u001bazure.web.appsite","title":"List of web apps"},"availableRuntimes":{"name":"availableRuntimes","type":"\u0019\n","title":"Available runtimes"}},"title":"Azure Web"},"azurerm.web.appsite":{"id":"azure.web.appsite","name":"azure.web.appsite","fields":{"applicationSettings":{"name":"applicationSettings","type":"\n","title":"Appsite application settings"},"authenticationSettings":{"name":"authenticationSettings","type":"\u001bazure.web.appsiteauthsettings","title":"Appsite authentication settings"},"configuration":{"name":"configuration","type":"\u001bazure.web.appsiteconfig","title":"Appsite configuration"},"connectionSettings":{"name":"connectionSettings","type":"\n","title":"Appsite connection settings"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Appsite ID"},"identity":{"name":"identity","type":"\n","is_mandatory":true,"title":"Appsite identity"},"kind":{"name":"kind","type":"\u0007","is_mandatory":true,"title":"Appsite kind"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Appsite location"},"metadata":{"name":"metadata","type":"\n","title":"Appsite metadata"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Appsite name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Appsite properties"},"stack":{"name":"stack","type":"\n","title":"Appsite stack"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Appsite tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Appsite type"}},"title":"Azure Web App Site","private":true,"defaults":"id name location"},"azurerm.web.appsiteauthsettings":{"id":"azure.web.appsiteauthsettings","name":"azure.web.appsiteauthsettings","fields":{"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Auth settings ID"},"kind":{"name":"kind","type":"\u0007","is_mandatory":true,"title":"Auth settings kind"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Auth settings name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Auth settings properties"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Auth settings type"}},"title":"Azure AppSite Authentication Settings","private":true,"defaults":"id name"},"azurerm.web.appsiteconfig":{"id":"azure.web.appsiteconfig","name":"azure.web.appsiteconfig","fields":{"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Appsite config ID"},"kind":{"name":"kind","type":"\u0007","is_mandatory":true,"title":"Appsite config kind"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Appsite config name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Appsite config properties"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Appsite config type"}},"title":"Azure AppSite Config","private":true,"defaults":"id name"}}} \ No newline at end of file +{"resources":{"azure":{"id":"azure.subscription","name":"azure.subscription","fields":{"authorization":{"name":"authorization","type":"\u001bazure.subscription.authorizationService","title":"Get authorization resources inside the subscription"},"authorizationSource":{"name":"authorizationSource","type":"\u0007","title":"Subscription authorization source"},"cloudDefender":{"name":"cloudDefender","type":"\u001bazure.subscription.cloudDefenderService","title":"Get cloud defender resources inside the subscription"},"compute":{"name":"compute","type":"\u001bazure.subscription.computeService","title":"Get compute resources inside the subscription"},"id":{"name":"id","type":"\u0007","title":"Full resource identifier of the subscription"},"keyVault":{"name":"keyVault","type":"\u001bazure.subscription.keyvaultService","title":"Get key vault resources inside the subscription"},"managedByTenants":{"name":"managedByTenants","type":"\u0019\u0007","title":"List of tenants that manage the subscription"},"mariaDb":{"name":"mariaDb","type":"\u001bazure.subscription.mariadbService","title":"Get MariaDB resources inside the subscription"},"monitor":{"name":"monitor","type":"\u001bazure.subscription.monitorService","title":"Get monitor resources inside the subscription"},"mySql":{"name":"mySql","type":"\u001bazure.subscription.mysqlService","title":"Get MySQL resources inside the subscription"},"name":{"name":"name","type":"\u0007","title":"Name of the subscription"},"network":{"name":"network","type":"\u001bazure.subscription.networkService","title":"Get network resources inside the subscription"},"postgreSql":{"name":"postgreSql","type":"\u001bazure.subscription.postgresqlService","title":"Get PostgreSQL resources inside the subscription"},"resourceGroups":{"name":"resourceGroups","type":"\u0019\u001bazure.subscription.resourcegroup","title":"Get resource groups inside the subscription"},"resources":{"name":"resources","type":"\u0019\u001bazure.subscription.resource","title":"Get all the resources in a subscription"},"sql":{"name":"sql","type":"\u001bazure.subscription.sqlService","title":"Get SQL resources inside the subscription"},"state":{"name":"state","type":"\u0007","title":"Subscription state"},"storage":{"name":"storage","type":"\u001bazure.subscription.storageService","title":"Get storage resources inside the subscription"},"subscriptionId":{"name":"subscriptionId","type":"\u0007","title":"Subscription identifier"},"subscriptionsPolicies":{"name":"subscriptionsPolicies","type":"\n","title":"Subscription policies"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","title":"Subscription tags"},"tenantId":{"name":"tenantId","type":"\u0007","title":"Subscription tenant identifier"},"web":{"name":"web","type":"\u001bazure.subscription.webService","title":"Get web resources inside the subscription"}},"title":"Azure Subscription","defaults":"name"},"azure.authorization":{"id":"azure.subscription.authorizationService","name":"azure.subscription.authorizationService","fields":{"roleDefinitions":{"name":"roleDefinitions","type":"\u0019\u001bazure.subscription.authorizationService.roleDefinition","title":"Role definitions for the Azure subscription"},"subscriptionId":{"name":"subscriptionId","type":"\u0007","is_mandatory":true,"title":"The subscription identifier"}},"title":"Azure Authorization","private":true},"azure.authorization.roleDefinition":{"id":"azure.subscription.authorizationService.roleDefinition","name":"azure.subscription.authorizationService.roleDefinition","fields":{"description":{"name":"description","type":"\u0007","is_mandatory":true,"title":"Description of the role definition"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"ID of the role definition"},"isCustom":{"name":"isCustom","type":"\u0004","is_mandatory":true,"title":"Whether the role definition is manually created"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Name of the role definition"},"permissions":{"name":"permissions","type":"\u0019\u001bazure.subscription.authorizationService.roleDefinition.permission","is_mandatory":true,"title":"Permissions that are attached to the role definition"},"scopes":{"name":"scopes","type":"\u0019\u0007","is_mandatory":true,"title":"Scopes for which the role definition applies"}},"title":"Azure Role Definition","private":true,"defaults":"id name scopes"},"azure.authorization.roleDefinition.permission":{"id":"azure.subscription.authorizationService.roleDefinition.permission","name":"azure.subscription.authorizationService.roleDefinition.permission","fields":{"allowedActions":{"name":"allowedActions","type":"\u0019\u0007","is_mandatory":true,"title":"List of allowed actions that are attached to the permission"},"allowedDataActions":{"name":"allowedDataActions","type":"\u0019\u0007","is_mandatory":true,"title":"List of allowed data actions that are attached to the permission"},"deniedActions":{"name":"deniedActions","type":"\u0019\u0007","is_mandatory":true,"title":"List of denied actions that are attached to the permission"},"deniedDataActions":{"name":"deniedDataActions","type":"\u0019\u0007","is_mandatory":true,"title":"List of denied data actions that are attached to the permission"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"ID of the permission"}},"title":"Azure Role Definition Permission","private":true,"defaults":"allowedActions deniedActions"},"azure.cloudDefender":{"id":"azure.subscription.cloudDefenderService","name":"azure.subscription.cloudDefenderService","fields":{"defenderForContainers":{"name":"defenderForContainers","type":"\n","title":"List of Defender For Container components and whether they are enabled"},"defenderForServers":{"name":"defenderForServers","type":"\n","title":"List of Defender For Server components and whether they are enabled"},"monitoringAgentAutoProvision":{"name":"monitoringAgentAutoProvision","type":"\u0004","title":"Whether the monitoring agent is automatically provisioned on new VMs"},"securityContacts":{"name":"securityContacts","type":"\u0019\u001bazure.subscription.cloudDefenderService.securityContact","title":"List of configured security contacts"},"subscriptionId":{"name":"subscriptionId","type":"\u0007","is_mandatory":true,"title":"The subscription identifier"}},"title":"Azure Microsoft Cloud Defender","private":true},"azure.cloudDefender.securityContact":{"id":"azure.subscription.cloudDefenderService.securityContact","name":"azure.subscription.cloudDefenderService.securityContact","fields":{"alertNotifications":{"name":"alertNotifications","type":"\n","is_mandatory":true,"title":"Alerts notification settings"},"emails":{"name":"emails","type":"\u0019\u0007","is_mandatory":true,"title":"Emails that receive security alerts"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"ID of the security contact"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Name of the security contact"},"notificationsByRole":{"name":"notificationsByRole","type":"\n","is_mandatory":true,"title":"Notifications by role settings"}},"title":"Azure Microsoft Cloud Defender Security Contact","private":true},"azure.compute":{"id":"azure.subscription.computeService","name":"azure.subscription.computeService","fields":{"disks":{"name":"disks","type":"\u0019\u001bazure.subscription.computeService.disk","title":"Lists all the disks under a subscription"},"subscriptionId":{"name":"subscriptionId","type":"\u0007","is_mandatory":true,"title":"The subscription identifier"},"vms":{"name":"vms","type":"\u0019\u001bazure.subscription.computeService.vm","title":"Lists all compute instances"}},"title":"Azure Compute","private":true},"azure.compute.disk":{"id":"azure.subscription.computeService.disk","name":"azure.subscription.computeService.disk","fields":{"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Disk resource id"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Disk resource location"},"managedBy":{"name":"managedBy","type":"\u0007","is_mandatory":true,"title":"A relative URI containing the ID of the VM that has the disk attached"},"managedByExtended":{"name":"managedByExtended","type":"\u0019\u0007","is_mandatory":true,"title":"List of relative URIs containing the IDs of the VMs that have the disk attached"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Disk resource name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Disk resource properties"},"sku":{"name":"sku","type":"\n","is_mandatory":true,"title":"The disk sku name and tier"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Disk resource tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Disk resource type"},"zones":{"name":"zones","type":"\u0019\u0007","is_mandatory":true,"title":"The logical zone list for disk"}},"title":"Azure Disk Resource","private":true,"defaults":"id name location"},"azure.compute.vm":{"id":"azure.subscription.computeService.vm","name":"azure.subscription.computeService.vm","fields":{"dataDisks":{"name":"dataDisks","type":"\u0019\u001bazure.subscription.computeService.disk","title":"VM compute data disk"},"extensions":{"name":"extensions","type":"\u0019\n","title":"VM extension"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"VM ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"VM location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"VM name"},"osDisk":{"name":"osDisk","type":"\u001bazure.subscription.computeService.disk","title":"VM compute disk"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"VM properties"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"VM tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"VM type"}},"title":"Azure Compute Virtual Machine","private":true,"defaults":"id name location "},"azure.keyvault":{"id":"azure.subscription.keyvaultService","name":"azure.subscription.keyvaultService","fields":{"subscriptionId":{"name":"subscriptionId","type":"\u0007","is_mandatory":true,"title":"The subscription identifier"},"vaults":{"name":"vaults","type":"\u0019\u001bazure.subscription.keyvaultService.vault","title":"List of Azure key vaults"}},"title":"Azure Key Vault","private":true},"azure.keyvault.certificate":{"id":"azure.subscription.keyvaultService.certificate","name":"azure.subscription.keyvaultService.certificate","fields":{"certName":{"name":"certName","type":"\u0007","title":"Certificate name"},"created":{"name":"created","type":"\t","is_mandatory":true,"title":"Certificate creation time"},"enabled":{"name":"enabled","type":"\u0004","is_mandatory":true,"title":"Whether certificate is enabled"},"expires":{"name":"expires","type":"\t","is_mandatory":true,"title":"Certificate expiration date"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Certificate ID"},"notBefore":{"name":"notBefore","type":"\t","is_mandatory":true,"title":"Certificate not before date"},"recoveryLevel":{"name":"recoveryLevel","type":"\u0007","is_mandatory":true,"title":"Certificate recovery level"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Certificate tags"},"updated":{"name":"updated","type":"\t","is_mandatory":true,"title":"Certificate last update time"},"version":{"name":"version","type":"\u0007","title":"Certificate version"},"versions":{"name":"versions","type":"\u0019\u001bazure.subscription.keyvaultService.certificate","title":"List of certificate versions"},"x5t":{"name":"x5t","type":"\u0007","is_mandatory":true,"title":"Certificate x5t"}},"title":"Azure Key Vault Certificate","private":true,"defaults":"id certName"},"azure.keyvault.key":{"id":"azure.subscription.keyvaultService.key","name":"azure.subscription.keyvaultService.key","fields":{"created":{"name":"created","type":"\t","is_mandatory":true,"title":"Key creation time"},"enabled":{"name":"enabled","type":"\u0004","is_mandatory":true,"title":"Whether key is enabled"},"expires":{"name":"expires","type":"\t","is_mandatory":true,"title":"Key expiration date"},"keyName":{"name":"keyName","type":"\u0007","title":"Key name"},"kid":{"name":"kid","type":"\u0007","is_mandatory":true,"title":"Key ID"},"managed":{"name":"managed","type":"\u0004","is_mandatory":true,"title":"Whether key is managed"},"notBefore":{"name":"notBefore","type":"\t","is_mandatory":true,"title":"Key not before date"},"recoveryLevel":{"name":"recoveryLevel","type":"\u0007","is_mandatory":true,"title":"Key recovery level"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Key tags"},"updated":{"name":"updated","type":"\t","is_mandatory":true,"title":"Key last update time"},"version":{"name":"version","type":"\u0007","title":"Key version"},"versions":{"name":"versions","type":"\u0019\u001bazure.subscription.keyvaultService.key","title":"List of key versions"}},"title":"Azure Key Vault Key","private":true,"defaults":"kid keyName"},"azure.keyvault.secret":{"id":"azure.subscription.keyvaultService.secret","name":"azure.subscription.keyvaultService.secret","fields":{"contentType":{"name":"contentType","type":"\u0007","is_mandatory":true,"title":"Secret content type"},"created":{"name":"created","type":"\t","is_mandatory":true,"title":"Secret creation date"},"enabled":{"name":"enabled","type":"\u0004","is_mandatory":true,"title":"Whether secret is enabled"},"expires":{"name":"expires","type":"\t","is_mandatory":true,"title":"Secret expiration date"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Secret ID"},"managed":{"name":"managed","type":"\u0004","is_mandatory":true,"title":"Whether secret is managed"},"notBefore":{"name":"notBefore","type":"\t","is_mandatory":true,"title":"Secret notBefore date"},"secretName":{"name":"secretName","type":"\u0007","title":"Secret name"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Secret tags"},"updated":{"name":"updated","type":"\t","is_mandatory":true,"title":"Secret last updated date"},"version":{"name":"version","type":"\u0007","title":"Secret version"},"versions":{"name":"versions","type":"\u0019\u001bazure.subscription.keyvaultService.secret","title":"List of secret versions"}},"title":"Azure Key Vault Secret","private":true,"defaults":"id secretName"},"azure.keyvault.vault":{"id":"azure.subscription.keyvaultService.vault","name":"azure.subscription.keyvaultService.vault","fields":{"certificates":{"name":"certificates","type":"\u0019\u001bazure.subscription.keyvaultService.certificate","title":"Key Vault certificates"},"diagnosticSettings":{"name":"diagnosticSettings","type":"\u0019\u001bazure.subscription.monitorService.diagnosticsetting","title":"Key Vault diagnostic settings"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Key Vault ID"},"keys":{"name":"keys","type":"\u0019\u001bazure.subscription.keyvaultService.key","title":"Key Vault keys"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Key Vault location"},"properties":{"name":"properties","type":"\n","title":"Key Vault properties"},"secrets":{"name":"secrets","type":"\u0019\u001bazure.subscription.keyvaultService.secret","title":"Key Vault secrets"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Key Vault tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Key Vault type"},"vaultName":{"name":"vaultName","type":"\u0007","is_mandatory":true,"title":"Key Vault name"},"vaultUri":{"name":"vaultUri","type":"\u0007","title":"Key Vault URL"}},"title":"Azure Key Vault Vault","private":true,"defaults":"id vaultName location"},"azure.mariadb":{"id":"azure.subscription.mariadbService","name":"azure.subscription.mariadbService","fields":{"servers":{"name":"servers","type":"\u0019\u001bazure.subscription.mariadbService.server","title":"List of MariaDB servers"},"subscriptionId":{"name":"subscriptionId","type":"\u0007","is_mandatory":true,"title":"The subscription identifier"}},"title":"Azure Database for MariaDB","private":true},"azure.mariadb.database":{"id":"azure.subscription.mariadbService.database","name":"azure.subscription.mariadbService.database","fields":{"charset":{"name":"charset","type":"\u0007","is_mandatory":true,"title":"MariaDB database charset"},"collation":{"name":"collation","type":"\u0007","is_mandatory":true,"title":"MariaDB database collation"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"MariaDB database ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"MariaDB database name"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"MariaDB database type"}},"title":"Azure Database for MariaDB Database","private":true,"defaults":"id name"},"azure.mariadb.server":{"id":"azure.subscription.mariadbService.server","name":"azure.subscription.mariadbService.server","fields":{"configuration":{"name":"configuration","type":"\u0019\u001bazure.subscription.sqlService.configuration","title":"MariaDB server configuration"},"databases":{"name":"databases","type":"\u0019\u001bazure.subscription.mariadbService.database","title":"MariaDB server databases"},"firewallRules":{"name":"firewallRules","type":"\u0019\u001bazure.subscription.sqlService.firewallrule","title":"MariaDB server firewall rules"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"MariaDB server ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"MariaDB server location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"MariaDB server name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"MariaDB server properties"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"MariaDB server tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"MariaDB server type"}},"title":"Azure Database for MariaDB Server","private":true,"defaults":"id name location"},"azure.monitor":{"id":"azure.subscription.monitorService","name":"azure.subscription.monitorService","fields":{"activityLog":{"name":"activityLog","type":"\u001bazure.subscription.monitorService.activitylog","title":"Activity log for the monitor"},"diagnosticSettings":{"name":"diagnosticSettings","type":"\u0019\u001bazure.subscription.monitorService.diagnosticsetting","title":"List of diagnostic settings for the subscription"},"logProfiles":{"name":"logProfiles","type":"\u0019\u001bazure.subscription.monitorService.logprofile","title":"List of log profiles"},"subscriptionId":{"name":"subscriptionId","type":"\u0007","is_mandatory":true,"title":"The subscription identifier"}},"title":"Azure Monitor","private":true},"azure.monitor.activitylog":{"id":"azure.subscription.monitorService.activitylog","name":"azure.subscription.monitorService.activitylog","fields":{"alerts":{"name":"alerts","type":"\u0019\u001bazure.subscription.monitorService.activitylog.alert","title":"List of activity log alerts"}},"title":"Azure Monitor Activity Log","private":true},"azure.monitor.activitylog.alert":{"id":"azure.subscription.monitorService.activitylog.alert","name":"azure.subscription.monitorService.activitylog.alert","fields":{"actions":{"name":"actions","type":"\u0019\n","is_mandatory":true,"title":"Actions that activate when the conditions are met"},"conditions":{"name":"conditions","type":"\u0019\n","is_mandatory":true,"title":"Conditions for the activity log alert, all of which must be met"},"description":{"name":"description","type":"\u0007","is_mandatory":true,"title":"Description of the activity log alert"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"ID of the activity log alert"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Location of the alert"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Name of the activity log alert"},"scopes":{"name":"scopes","type":"\u0019\u0007","is_mandatory":true,"title":"List of resource IDs that must be present to trigger the alert"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Tags of the alert"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Type of the activity log alert"}},"title":"Azure Monitor Activity Log Alert","private":true},"azure.monitor.diagnosticsetting":{"id":"azure.subscription.monitorService.diagnosticsetting","name":"azure.subscription.monitorService.diagnosticsetting","fields":{"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Diagnostic setting ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Diagnostic setting name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Diagnostic setting properties"},"storageAccount":{"name":"storageAccount","type":"\u001bazure.subscription.storageService.account","is_mandatory":true,"title":"Diagnostic setting storage account"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Diagnostic setting type"}},"title":"Azure Monitor Diagnostic Setting","private":true,"defaults":"id name"},"azure.monitor.logprofile":{"id":"azure.subscription.monitorService.logprofile","name":"azure.subscription.monitorService.logprofile","fields":{"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Log profile ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Log profile location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Log profile name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Log profile properties"},"storageAccount":{"name":"storageAccount","type":"\u001bazure.subscription.storageService.account","is_mandatory":true,"title":"Log profile storage account"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Log profile tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Log profile type"}},"title":"Azure Monitor Log Profile","private":true,"defaults":"id name location"},"azure.mysql":{"id":"azure.subscription.mysqlService","name":"azure.subscription.mysqlService","fields":{"flexibleServers":{"name":"flexibleServers","type":"\u0019\u001bazure.subscription.mysqlService.flexibleServer","title":"List of Flexible MySQL servers"},"servers":{"name":"servers","type":"\u0019\u001bazure.subscription.mysqlService.server","title":"List of MySQL servers"},"subscriptionId":{"name":"subscriptionId","type":"\u0007","is_mandatory":true,"title":"The subscription identifier"}},"title":"Azure Database for MySQL","private":true},"azure.mysql.database":{"id":"azure.subscription.mysqlService.database","name":"azure.subscription.mysqlService.database","fields":{"charset":{"name":"charset","type":"\u0007","is_mandatory":true,"title":"MySQL database charset"},"collation":{"name":"collation","type":"\u0007","is_mandatory":true,"title":"MySQL database collation"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"MySQL database ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"MySQL database name"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"MySQL database type"}},"title":"Azure Database for MySQL Database","private":true,"defaults":"id name"},"azure.mysql.flexibleServer":{"id":"azure.subscription.mysqlService.flexibleServer","name":"azure.subscription.mysqlService.flexibleServer","fields":{"configuration":{"name":"configuration","type":"\u0019\u001bazure.subscription.sqlService.configuration","title":"MySQL flexible server configuration"},"databases":{"name":"databases","type":"\u0019\u001bazure.subscription.mysqlService.database","title":"MySQL flexible server databases"},"firewallRules":{"name":"firewallRules","type":"\u0019\u001bazure.subscription.sqlService.firewallrule","title":"MySQL flexible server firewall rules"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"MySQL flexible server ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"MySQL flexible server location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"MySQL flexible server name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"MySQL flexible server properties"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"MySQL flexible server tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"MySQL flexible server type"}},"title":"Azure Database for MySQL Flexible Server","private":true,"defaults":"id name location"},"azure.mysql.server":{"id":"azure.subscription.mysqlService.server","name":"azure.subscription.mysqlService.server","fields":{"configuration":{"name":"configuration","type":"\u0019\u001bazure.subscription.sqlService.configuration","title":"MySQL server configuration"},"databases":{"name":"databases","type":"\u0019\u001bazure.subscription.mysqlService.database","title":"MySQL server databases"},"firewallRules":{"name":"firewallRules","type":"\u0019\u001bazure.subscription.sqlService.firewallrule","title":"MySQL server firewall rules"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"MySQL server ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"MySQL server location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"MySQL server name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"MySQL server properties"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"MySQL server tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"MySQL server type"}},"title":"Azure Database for MySQL Server","private":true,"defaults":"id name location"},"azure.network":{"id":"azure.subscription.networkService","name":"azure.subscription.networkService","fields":{"interfaces":{"name":"interfaces","type":"\u0019\u001bazure.subscription.networkService.interface","title":"List of network interfaces"},"securityGroups":{"name":"securityGroups","type":"\u0019\u001bazure.subscription.networkService.securityGroup","title":"List of network security groups"},"subscriptionId":{"name":"subscriptionId","type":"\u0007","is_mandatory":true,"title":"The subscription identifier"},"watchers":{"name":"watchers","type":"\u0019\u001bazure.subscription.networkService.watcher","title":"List of network watchers"}},"title":"Azure Network","private":true},"azure.network.interface":{"id":"azure.subscription.networkService.interface","name":"azure.subscription.networkService.interface","fields":{"etag":{"name":"etag","type":"\u0007","is_mandatory":true,"title":"Network interface etag"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Network interface ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Network interface name"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Network interface name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Network interface properties"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Network interface tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Network interface type"},"vm":{"name":"vm","type":"\u001bazure.subscription.computeService.vm","title":"Network interface compute vm"}},"title":"Azure Network Interface","private":true,"defaults":"id name location"},"azure.network.securitygroup":{"id":"azure.subscription.networkService.securityGroup","name":"azure.subscription.networkService.securityGroup","fields":{"defaultSecurityRules":{"name":"defaultSecurityRules","type":"\u0019\u001bazure.subscription.networkService.securityrule","is_mandatory":true,"title":"Security group default security rules"},"etag":{"name":"etag","type":"\u0007","is_mandatory":true,"title":"Security group etag"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Security group ID"},"interfaces":{"name":"interfaces","type":"\u0019\u001bazure.subscription.networkService.interface","is_mandatory":true,"title":"Security group interfaces"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Security group location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Security group name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Security group properties"},"securityRules":{"name":"securityRules","type":"\u0019\u001bazure.subscription.networkService.securityrule","is_mandatory":true,"title":"Security group rules"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Security group tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Security group type"}},"title":"Azure Network Security Group","private":true,"defaults":"id name location"},"azure.network.securityrule":{"id":"azure.subscription.networkService.securityrule","name":"azure.subscription.networkService.securityrule","fields":{"destinationPortRange":{"name":"destinationPortRange","type":"\u0019\n","is_mandatory":true,"title":"Security rule destination port range"},"etag":{"name":"etag","type":"\u0007","is_mandatory":true,"title":"Security rule etag"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Security rule ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Security rule name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Security rule properties"}},"title":"Azure Network Security Rule","private":true,"defaults":"id name"},"azure.network.watcher":{"id":"azure.subscription.networkService.watcher","name":"azure.subscription.networkService.watcher","fields":{"etag":{"name":"etag","type":"\u0007","is_mandatory":true,"title":"Network watcher etag"},"flowLogs":{"name":"flowLogs","type":"\u0019\u001bazure.subscription.networkService.watcher.flowlog","title":"Network watcher flow logs"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Network watcher ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Network watcher location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Network watcher name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Network watcher properties"},"provisioningState":{"name":"provisioningState","type":"\u0007","is_mandatory":true,"title":"Network watcher provisioning state"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Network watcher tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Network watcher type"}},"title":"Azure Network Watcher","private":true,"defaults":"name location"},"azure.network.watcher.flowlog":{"id":"azure.subscription.networkService.watcher.flowlog","name":"azure.subscription.networkService.watcher.flowlog","fields":{"analytics":{"name":"analytics","type":"\n","is_mandatory":true,"title":"Network watcher flow log analytics"},"enabled":{"name":"enabled","type":"\u0004","is_mandatory":true,"title":"whether the network watcher flow log is enabled"},"etag":{"name":"etag","type":"\u0007","is_mandatory":true,"title":"Network watcher flow log etag"},"format":{"name":"format","type":"\u0007","is_mandatory":true,"title":"Network watcher flow log format"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Network watcher flow log ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Network watcher flow log location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Network watcher flow log name"},"provisioningState":{"name":"provisioningState","type":"\u0007","is_mandatory":true,"title":"Network watcher flow log provisioning state"},"retentionPolicy":{"name":"retentionPolicy","type":"\n","is_mandatory":true,"title":"Network watcher flow log retention policy"},"storageAccountId":{"name":"storageAccountId","type":"\u0007","is_mandatory":true,"title":"Network watcher flow log storage account identifier"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Network watcher flow log tags"},"targetResourceGuid":{"name":"targetResourceGuid","type":"\u0007","is_mandatory":true,"title":"Network watcher flow log target resource guid"},"targetResourceId":{"name":"targetResourceId","type":"\u0007","is_mandatory":true,"title":"Network watcher flow log target resource identifier"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Network watcher flow log type"},"version":{"name":"version","type":"\u0005","is_mandatory":true,"title":"Network watcher flow log version"}},"title":"Azure Network Watcher Flow Log","private":true,"defaults":"name location"},"azure.postgresql":{"id":"azure.subscription.postgresqlService","name":"azure.subscription.postgresqlService","fields":{"servers":{"name":"servers","type":"\u0019\u001bazure.subscription.postgresqlService.server","title":"List of PostgreSQL servers"},"subscriptionId":{"name":"subscriptionId","type":"\u0007","is_mandatory":true,"title":"The subscription identifier"}},"title":"Azure Database for PostgreSQL","private":true},"azure.postgresql.database":{"id":"azure.subscription.postgresqlService.database","name":"azure.subscription.postgresqlService.database","fields":{"charset":{"name":"charset","type":"\u0007","is_mandatory":true,"title":"PostgreSQL database charset"},"collation":{"name":"collation","type":"\u0007","is_mandatory":true,"title":"PostgreSQL database collation"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"PostgreSQL database ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"PostgreSQL database name"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"PostgreSQL database type"}},"title":"Azure Database for PostgreSQL Database","private":true,"defaults":"id name"},"azure.postgresql.server":{"id":"azure.subscription.postgresqlService.server","name":"azure.subscription.postgresqlService.server","fields":{"configuration":{"name":"configuration","type":"\u0019\u001bazure.subscription.sqlService.configuration","title":"PostgreSQL server configuration"},"databases":{"name":"databases","type":"\u0019\u001bazure.subscription.postgresqlService.database","title":"PostgreSQL server databases"},"firewallRules":{"name":"firewallRules","type":"\u0019\u001bazure.subscription.sqlService.firewallrule","title":"PostgreSQL server firewall rules"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"PostgreSQL server ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"PostgreSQL server location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"PostgreSQL server name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"PostgreSQL server properties"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"PostgreSQL server tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"PostgreSQL server type"}},"title":"Azure Database for PostgreSQL Server","private":true,"defaults":"id name location"},"azure.resource":{"id":"azure.subscription.resource","name":"azure.subscription.resource","fields":{"changedTime":{"name":"changedTime","type":"\t","is_mandatory":true,"title":"Resource change time"},"createdTime":{"name":"createdTime","type":"\t","is_mandatory":true,"title":"Resource create time"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Resource ID"},"identity":{"name":"identity","type":"\n","is_mandatory":true,"title":"Resource identity"},"kind":{"name":"kind","type":"\u0007","is_mandatory":true,"title":"Resource kind"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Resource location"},"managedBy":{"name":"managedBy","type":"\u0007","is_mandatory":true,"title":"Resource managed by"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Resource name"},"plan":{"name":"plan","type":"\n","is_mandatory":true,"title":"Resource plan"},"provisioningState":{"name":"provisioningState","type":"\u0007","is_mandatory":true,"title":"Resource provisioning state"},"sku":{"name":"sku","type":"\n","is_mandatory":true,"title":"Resource SKU"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Resource tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Resource type"}},"title":"Azure Resource","private":true,"defaults":"id name location"},"azure.resourcegroup":{"id":"azure.subscription.resourcegroup","name":"azure.subscription.resourcegroup","fields":{"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Resource Group ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Resource Group location"},"managedBy":{"name":"managedBy","type":"\u0007","is_mandatory":true,"title":"Resource Group managed by"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Resource Group name"},"provisioningState":{"name":"provisioningState","type":"\u0007","is_mandatory":true,"title":"Resource Group provisioning state"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Resource Group tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Resource Group type"}},"title":"Azure Resource Group","private":true,"defaults":"name location"},"azure.sql":{"id":"azure.subscription.sqlService","name":"azure.subscription.sqlService","fields":{"servers":{"name":"servers","type":"\u0019\u001bazure.subscription.sqlService.server","title":"List of SQL servers"},"subscriptionId":{"name":"subscriptionId","type":"\u0007","is_mandatory":true,"title":"The subscription identifier"}},"title":"Azure SQL","private":true},"azure.sql.configuration":{"id":"azure.subscription.sqlService.configuration","name":"azure.subscription.sqlService.configuration","fields":{"allowedValues":{"name":"allowedValues","type":"\u0007","is_mandatory":true,"title":"SQL configuration allowed values"},"dataType":{"name":"dataType","type":"\u0007","is_mandatory":true,"title":"SQL configuration data type"},"defaultValue":{"name":"defaultValue","type":"\u0007","is_mandatory":true,"title":"SQL configuration default value"},"description":{"name":"description","type":"\u0007","is_mandatory":true,"title":"SQL configuration description"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"SQL configuration ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"SQL configuration name"},"source":{"name":"source","type":"\u0007","is_mandatory":true,"title":"SQL configuration source"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"SQL configuration type"},"value":{"name":"value","type":"\u0007","is_mandatory":true,"title":"SQL configuration value"}},"title":"Azure SQL Configuration","private":true,"defaults":"id name"},"azure.sql.database":{"id":"azure.subscription.sqlService.database","name":"azure.subscription.sqlService.database","fields":{"advisor":{"name":"advisor","type":"\u0019\n","title":"SQL database advisor"},"auditingPolicy":{"name":"auditingPolicy","type":"\n","title":"SQL database auditing policy"},"collation":{"name":"collation","type":"\u0007","is_mandatory":true,"title":"SQL database collation"},"connectionPolicy":{"name":"connectionPolicy","type":"\n","title":"SQL database connection policy"},"containmentState":{"name":"containmentState","type":"\u0005","title":"Deprecated"},"createMode":{"name":"createMode","type":"\u0007","is_mandatory":true,"title":"SQL database create mode"},"creationDate":{"name":"creationDate","type":"\t","is_mandatory":true,"title":"SQL database create date"},"currentServiceObjectiveId":{"name":"currentServiceObjectiveId","type":"\u0007","title":"Deprecated. Use `serviceLevelObjective` instead."},"databaseId":{"name":"databaseId","type":"\u0007","is_mandatory":true,"title":"Database ID"},"defaultSecondaryLocation":{"name":"defaultSecondaryLocation","type":"\u0007","is_mandatory":true,"title":"SQL database default secondary location"},"earliestRestoreDate":{"name":"earliestRestoreDate","type":"\t","is_mandatory":true,"title":"SQL database earliest restore date"},"edition":{"name":"edition","type":"\u0007","is_mandatory":true,"title":"SQL database edition"},"elasticPoolName":{"name":"elasticPoolName","type":"\u0007","is_mandatory":true,"title":"SQL database elastic pool name"},"failoverGroupId":{"name":"failoverGroupId","type":"\u0007","is_mandatory":true,"title":"SQL database failover group ID"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"SQL database ID"},"maxSizeBytes":{"name":"maxSizeBytes","type":"\u0005","is_mandatory":true,"title":"SQL database max byte size"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"SQL database name"},"readScale":{"name":"readScale","type":"\u0007","is_mandatory":true,"title":"SQL database read scale"},"recommendedIndex":{"name":"recommendedIndex","type":"\n","title":"Deprecated. Use `advisor.recommendedActions` instead."},"recoveryServicesRecoveryPointResourceId":{"name":"recoveryServicesRecoveryPointResourceId","type":"\u0007","is_mandatory":true,"title":"SQL database recovery services recovery point ID"},"requestedServiceObjectiveId":{"name":"requestedServiceObjectiveId","type":"\u0007","title":"Deprecated. Use `requestedServiceObjectiveName` instead."},"requestedServiceObjectiveName":{"name":"requestedServiceObjectiveName","type":"\u0007","is_mandatory":true,"title":"SQL database requested objective name"},"restorePointInTime":{"name":"restorePointInTime","type":"\t","is_mandatory":true,"title":"SQL database restore point"},"sampleName":{"name":"sampleName","type":"\u0007","is_mandatory":true,"title":"SQL database sample name"},"serviceLevelObjective":{"name":"serviceLevelObjective","type":"\u0007","is_mandatory":true,"title":"SQL database service level objective"},"serviceTierAdvisors":{"name":"serviceTierAdvisors","type":"\n","title":"Deprecated"},"sourceDatabaseDeletionDate":{"name":"sourceDatabaseDeletionDate","type":"\t","is_mandatory":true,"title":"SQL database deletion date"},"sourceDatabaseId":{"name":"sourceDatabaseId","type":"\u0007","is_mandatory":true,"title":"SQL database source database ID"},"status":{"name":"status","type":"\u0007","is_mandatory":true,"title":"SQL database status"},"threatDetectionPolicy":{"name":"threatDetectionPolicy","type":"\n","title":"SQL database threat detection policy"},"transparentDataEncryption":{"name":"transparentDataEncryption","type":"\n","title":"SQL database transparent data encryption"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"SQL database type"},"usage":{"name":"usage","type":"\u0019\u001bazure.subscription.sqlService.databaseusage","title":"SQL database usage"},"zoneRedundant":{"name":"zoneRedundant","type":"\u0004","is_mandatory":true,"title":"Whether SQL server is zone redundant"}},"title":"Azure SQL Server Database","private":true,"defaults":"id name"},"azure.sql.databaseusage":{"id":"azure.subscription.sqlService.databaseusage","name":"azure.subscription.sqlService.databaseusage","fields":{"currentValue":{"name":"currentValue","type":"\u0006","is_mandatory":true,"title":"Database usage current value"},"displayName":{"name":"displayName","type":"\u0007","is_mandatory":true,"title":"Database usage display name"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Database usage ID"},"limit":{"name":"limit","type":"\u0006","is_mandatory":true,"title":"Database usage limit"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Database usage name"},"nextResetTime":{"name":"nextResetTime","type":"\t","title":"Deprecated"},"resourceName":{"name":"resourceName","type":"\u0007","is_mandatory":true,"title":"Database usage resource name"},"unit":{"name":"unit","type":"\u0007","is_mandatory":true,"title":"Database usage unit"}},"title":"Azure SQL Database Usage","private":true,"defaults":"id name"},"azure.sql.firewallrule":{"id":"azure.subscription.sqlService.firewallrule","name":"azure.subscription.sqlService.firewallrule","fields":{"endIpAddress":{"name":"endIpAddress","type":"\u0007","is_mandatory":true,"title":"SQL firewall rule end IP address"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"SQL firewall rule ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"SQL firewall rule name"},"startIpAddress":{"name":"startIpAddress","type":"\u0007","is_mandatory":true,"title":"SQL firewall rule start IP address"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"SQL firewall rule type"}},"title":"Azure SQL Firewall Rule","private":true,"defaults":"id name"},"azure.sql.server":{"id":"azure.subscription.sqlService.server","name":"azure.subscription.sqlService.server","fields":{"auditingPolicy":{"name":"auditingPolicy","type":"\n","title":"SQL server auditing policy"},"azureAdAdministrators":{"name":"azureAdAdministrators","type":"\u0019\u001bazure.subscription.sqlService.server.administrator","title":"SQL server AD administrators"},"connectionPolicy":{"name":"connectionPolicy","type":"\n","title":"SQL server connection policy"},"databases":{"name":"databases","type":"\u0019\u001bazure.subscription.sqlService.database","title":"SQL server databases"},"encryptionProtector":{"name":"encryptionProtector","type":"\n","title":"SQL server encryption protector"},"firewallRules":{"name":"firewallRules","type":"\u0019\u001bazure.subscription.sqlService.firewallrule","title":"SQL server firewall rules"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"SQL server ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"SQL server location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"SQL server name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"SQL server properties"},"securityAlertPolicy":{"name":"securityAlertPolicy","type":"\n","title":"SQL server security alert policy"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"SQL server tags"},"threatDetectionPolicy":{"name":"threatDetectionPolicy","type":"\n","title":"SQL server threat detection policy"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"SQL server type"},"vulnerabilityAssessmentSettings":{"name":"vulnerabilityAssessmentSettings","type":"\u001bazure.subscription.sqlService.server.vulnerabilityassessmentsettings","title":"SQL server vulnerability assessment settings"}},"title":"Azure SQL Server","private":true,"defaults":"name location"},"azure.sql.server.administrator":{"id":"azure.subscription.sqlService.server.administrator","name":"azure.subscription.sqlService.server.administrator","fields":{"administratorType":{"name":"administratorType","type":"\u0007","is_mandatory":true,"title":"SQL administrator type"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"SQL administrator ID"},"login":{"name":"login","type":"\u0007","is_mandatory":true,"title":"SQL administrator login"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"SQL administrator name"},"sid":{"name":"sid","type":"\u0007","is_mandatory":true,"title":"SQL administrator subscription ID"},"tenantId":{"name":"tenantId","type":"\u0007","is_mandatory":true,"title":"SQL administrator tenant ID"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"SQL administrator type"}},"title":"Azure SQL Server Administrator","private":true,"defaults":"id name"},"azure.sql.server.vulnerabilityassessmentsettings":{"id":"azure.subscription.sqlService.server.vulnerabilityassessmentsettings","name":"azure.subscription.sqlService.server.vulnerabilityassessmentsettings","fields":{"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"ID of the vulnerability assessment"},"mailSubscriptionAdmins":{"name":"mailSubscriptionAdmins","type":"\u0004","is_mandatory":true,"title":"Whether the schedule scan notification is also sent to the subscription administrators"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Name of the vulnerability assessment"},"recurringScanEmails":{"name":"recurringScanEmails","type":"\u0019\u0007","is_mandatory":true,"title":"Specifies an array of e-mail addresses to which the scan notification is sent"},"recurringScanEnabled":{"name":"recurringScanEnabled","type":"\u0004","is_mandatory":true,"title":"Indicates whether recurring scan is enabled"},"storageAccountAccessKey":{"name":"storageAccountAccessKey","type":"\u0007","is_mandatory":true,"title":"Identifier key of the storage account for vulnerability assessment scan results"},"storageContainerPath":{"name":"storageContainerPath","type":"\u0007","is_mandatory":true,"title":"Blob storage container path to hold the scan results"},"storageContainerSasKey":{"name":"storageContainerSasKey","type":"\u0007","is_mandatory":true,"title":"Shared access signature key that has write access to the blob container specified in 'storageContainerPath'"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Type of the vulnerability assessment"}},"title":"Azure SQL Server Vulnerability Assessment Settings","private":true},"azure.storage":{"id":"azure.subscription.storageService","name":"azure.subscription.storageService","fields":{"accounts":{"name":"accounts","type":"\u0019\u001bazure.subscription.storageService.account","title":"List of storage accounts"},"subscriptionId":{"name":"subscriptionId","type":"\u0007","is_mandatory":true,"title":"The subscription identifier"}},"title":"Azure Storage","private":true},"azure.storage.account":{"id":"azure.subscription.storageService.account","name":"azure.subscription.storageService.account","fields":{"blobProperties":{"name":"blobProperties","type":"\u001bazure.subscription.storageService.account.blobService.properties","title":"Storage account blob properties"},"containers":{"name":"containers","type":"\u0019\u001bazure.subscription.storageService.account.container","title":"Storage account containers"},"dataProtection":{"name":"dataProtection","type":"\u001bazure.subscription.storageService.account.dataProtection","title":"Storage account data protection"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Storage account ID"},"identity":{"name":"identity","type":"\n","is_mandatory":true,"title":"Storage account identity"},"kind":{"name":"kind","type":"\u0007","is_mandatory":true,"title":"Storage account kind"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Storage account location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Storage account name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Storage account properties"},"queueProperties":{"name":"queueProperties","type":"\u001bazure.subscription.storageService.account.queueService.properties","title":"Storage account queue properties"},"sku":{"name":"sku","type":"\n","is_mandatory":true,"title":"Storage account sku"},"tableProperties":{"name":"tableProperties","type":"\u001bazure.subscription.storageService.account.tableService.properties","title":"Storage account table properties"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Storage account tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Storage account type"}},"title":"Azure Storage Account","private":true,"defaults":"id name location"},"azure.storage.account.blobService.properties":{"id":"azure.subscription.storageService.account.blobService.properties","name":"azure.subscription.storageService.account.blobService.properties","fields":{"hourMetrics":{"name":"hourMetrics","type":"\u001bazure.subscription.storageService.account.service.properties.metrics","is_mandatory":true,"title":"Hourly metrics properties"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"ID of the service"},"logging":{"name":"logging","type":"\u001bazure.subscription.storageService.account.service.properties.logging","is_mandatory":true,"title":"Logging properties"},"minuteMetrics":{"name":"minuteMetrics","type":"\u001bazure.subscription.storageService.account.service.properties.metrics","is_mandatory":true,"title":"Minute metrics properties"}},"title":"Azure Storage Account Blob Service Properties","private":true},"azure.storage.account.dataProtection":{"id":"azure.subscription.storageService.account.dataProtection","name":"azure.subscription.storageService.account.dataProtection","fields":{"blobRetentionDays":{"name":"blobRetentionDays","type":"\u0005","is_mandatory":true,"title":"Retention period in days for deleted blobs"},"blobSoftDeletionEnabled":{"name":"blobSoftDeletionEnabled","type":"\u0004","is_mandatory":true,"title":"Whether soft deletion of blobs is enabled"},"containerRetentionDays":{"name":"containerRetentionDays","type":"\u0005","is_mandatory":true,"title":"Retention period in days for deleted containers"},"containerSoftDeletionEnabled":{"name":"containerSoftDeletionEnabled","type":"\u0004","is_mandatory":true,"title":"Whether soft deletion of containers is enabled"},"storageAccountId":{"name":"storageAccountId","type":"\u0007","is_mandatory":true,"title":"ID of the storage account"}},"title":"Azure Storage Account Data Protection","private":true},"azure.storage.account.queueService.properties":{"id":"azure.subscription.storageService.account.queueService.properties","name":"azure.subscription.storageService.account.queueService.properties","fields":{"hourMetrics":{"name":"hourMetrics","type":"\u001bazure.subscription.storageService.account.service.properties.metrics","is_mandatory":true,"title":"Hourly metrics properties"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"ID of the service"},"logging":{"name":"logging","type":"\u001bazure.subscription.storageService.account.service.properties.logging","is_mandatory":true,"title":"Logging properties"},"minuteMetrics":{"name":"minuteMetrics","type":"\u001bazure.subscription.storageService.account.service.properties.metrics","is_mandatory":true,"title":"Minute metrics properties"}},"title":"Azure Storage Account Queue Service Properties","private":true},"azure.storage.account.service.properties.logging":{"id":"azure.subscription.storageService.account.service.properties.logging","name":"azure.subscription.storageService.account.service.properties.logging","fields":{"delete":{"name":"delete","type":"\u0004","is_mandatory":true,"title":"Whether delete requests are being logged"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"ID of the logging configuration"},"read":{"name":"read","type":"\u0004","is_mandatory":true,"title":"Whether read requests are being logged"},"retentionPolicy":{"name":"retentionPolicy","type":"\u001bazure.subscription.storageService.account.service.properties.retentionPolicy","is_mandatory":true,"title":"Retention policy for the logging metrics"},"version":{"name":"version","type":"\u0007","is_mandatory":true,"title":"Logging version"},"write":{"name":"write","type":"\u0004","is_mandatory":true,"title":"Whether write requests are being logged"}},"title":"Azure Storage Account Service Properties Logging","private":true},"azure.storage.account.service.properties.metrics":{"id":"azure.subscription.storageService.account.service.properties.metrics","name":"azure.subscription.storageService.account.service.properties.metrics","fields":{"enabled":{"name":"enabled","type":"\u0004","is_mandatory":true,"title":"Whether the metrics are enabled"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"ID of the metrics"},"includeAPIs":{"name":"includeAPIs","type":"\u0004","is_mandatory":true,"title":"Whether metrics generate summary statistics for called API operations"},"retentionPolicy":{"name":"retentionPolicy","type":"\u001bazure.subscription.storageService.account.service.properties.retentionPolicy","is_mandatory":true,"title":"Retention policy for the metrics"},"version":{"name":"version","type":"\u0007","is_mandatory":true,"title":"Version of the metrics"}},"title":"Azure Storage Account Service Properties Metrics","private":true},"azure.storage.account.service.properties.retentionPolicy":{"id":"azure.subscription.storageService.account.service.properties.retentionPolicy","name":"azure.subscription.storageService.account.service.properties.retentionPolicy","fields":{"enabled":{"name":"enabled","type":"\u0004","is_mandatory":true,"title":"Whether a retention policy is enabled for the Azure Storage"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"ID of the retention policy"},"retentionDays":{"name":"retentionDays","type":"\u0005","is_mandatory":true,"title":"Number of days that metrics or logging data is retained"}},"title":"Azure Storage Account Service Properties Retention Policy","private":true},"azure.storage.account.tableService.properties":{"id":"azure.subscription.storageService.account.tableService.properties","name":"azure.subscription.storageService.account.tableService.properties","fields":{"hourMetrics":{"name":"hourMetrics","type":"\u001bazure.subscription.storageService.account.service.properties.metrics","is_mandatory":true,"title":"Hourly metrics properties"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"ID of the service"},"logging":{"name":"logging","type":"\u001bazure.subscription.storageService.account.service.properties.logging","is_mandatory":true,"title":"Logging properties"},"minuteMetrics":{"name":"minuteMetrics","type":"\u001bazure.subscription.storageService.account.service.properties.metrics","is_mandatory":true,"title":"Minute metrics properties"}},"title":"Azure Storage Account Table Service Properties","private":true},"azure.storage.container":{"id":"azure.subscription.storageService.account.container","name":"azure.subscription.storageService.account.container","fields":{"etag":{"name":"etag","type":"\u0007","is_mandatory":true,"title":"Storage container etag"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Storage container ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Storage container name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Storage container properties"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Storage container type"}},"title":"Azure Storage Container","private":true,"defaults":"id name"},"azure.subscription":{"id":"azure.subscription","name":"azure.subscription","fields":{"authorization":{"name":"authorization","type":"\u001bazure.subscription.authorizationService","title":"Get authorization resources inside the subscription"},"authorizationSource":{"name":"authorizationSource","type":"\u0007","title":"Subscription authorization source"},"cloudDefender":{"name":"cloudDefender","type":"\u001bazure.subscription.cloudDefenderService","title":"Get cloud defender resources inside the subscription"},"compute":{"name":"compute","type":"\u001bazure.subscription.computeService","title":"Get compute resources inside the subscription"},"id":{"name":"id","type":"\u0007","title":"Full resource identifier of the subscription"},"keyVault":{"name":"keyVault","type":"\u001bazure.subscription.keyvaultService","title":"Get key vault resources inside the subscription"},"managedByTenants":{"name":"managedByTenants","type":"\u0019\u0007","title":"List of tenants that manage the subscription"},"mariaDb":{"name":"mariaDb","type":"\u001bazure.subscription.mariadbService","title":"Get MariaDB resources inside the subscription"},"monitor":{"name":"monitor","type":"\u001bazure.subscription.monitorService","title":"Get monitor resources inside the subscription"},"mySql":{"name":"mySql","type":"\u001bazure.subscription.mysqlService","title":"Get MySQL resources inside the subscription"},"name":{"name":"name","type":"\u0007","title":"Name of the subscription"},"network":{"name":"network","type":"\u001bazure.subscription.networkService","title":"Get network resources inside the subscription"},"postgreSql":{"name":"postgreSql","type":"\u001bazure.subscription.postgresqlService","title":"Get PostgreSQL resources inside the subscription"},"resourceGroups":{"name":"resourceGroups","type":"\u0019\u001bazure.subscription.resourcegroup","title":"Get resource groups inside the subscription"},"resources":{"name":"resources","type":"\u0019\u001bazure.subscription.resource","title":"Get all the resources in a subscription"},"sql":{"name":"sql","type":"\u001bazure.subscription.sqlService","title":"Get SQL resources inside the subscription"},"state":{"name":"state","type":"\u0007","title":"Subscription state"},"storage":{"name":"storage","type":"\u001bazure.subscription.storageService","title":"Get storage resources inside the subscription"},"subscriptionId":{"name":"subscriptionId","type":"\u0007","title":"Subscription identifier"},"subscriptionsPolicies":{"name":"subscriptionsPolicies","type":"\n","title":"Subscription policies"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","title":"Subscription tags"},"tenantId":{"name":"tenantId","type":"\u0007","title":"Subscription tenant identifier"},"web":{"name":"web","type":"\u001bazure.subscription.webService","title":"Get web resources inside the subscription"}},"title":"Azure Subscription","defaults":"name"},"azure.subscription.authorizationService":{"id":"azure.subscription.authorizationService","name":"azure.subscription.authorizationService","fields":{"roleDefinitions":{"name":"roleDefinitions","type":"\u0019\u001bazure.subscription.authorizationService.roleDefinition","title":"Role definitions for the Azure subscription"},"subscriptionId":{"name":"subscriptionId","type":"\u0007","is_mandatory":true,"title":"The subscription identifier"}},"title":"Azure Authorization","private":true},"azure.subscription.authorizationService.roleDefinition":{"id":"azure.subscription.authorizationService.roleDefinition","name":"azure.subscription.authorizationService.roleDefinition","fields":{"description":{"name":"description","type":"\u0007","is_mandatory":true,"title":"Description of the role definition"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"ID of the role definition"},"isCustom":{"name":"isCustom","type":"\u0004","is_mandatory":true,"title":"Whether the role definition is manually created"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Name of the role definition"},"permissions":{"name":"permissions","type":"\u0019\u001bazure.subscription.authorizationService.roleDefinition.permission","is_mandatory":true,"title":"Permissions that are attached to the role definition"},"scopes":{"name":"scopes","type":"\u0019\u0007","is_mandatory":true,"title":"Scopes for which the role definition applies"}},"title":"Azure Role Definition","private":true,"defaults":"id name scopes"},"azure.subscription.authorizationService.roleDefinition.permission":{"id":"azure.subscription.authorizationService.roleDefinition.permission","name":"azure.subscription.authorizationService.roleDefinition.permission","fields":{"allowedActions":{"name":"allowedActions","type":"\u0019\u0007","is_mandatory":true,"title":"List of allowed actions that are attached to the permission"},"allowedDataActions":{"name":"allowedDataActions","type":"\u0019\u0007","is_mandatory":true,"title":"List of allowed data actions that are attached to the permission"},"deniedActions":{"name":"deniedActions","type":"\u0019\u0007","is_mandatory":true,"title":"List of denied actions that are attached to the permission"},"deniedDataActions":{"name":"deniedDataActions","type":"\u0019\u0007","is_mandatory":true,"title":"List of denied data actions that are attached to the permission"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"ID of the permission"}},"title":"Azure Role Definition Permission","private":true,"defaults":"allowedActions deniedActions"},"azure.subscription.cloudDefenderService":{"id":"azure.subscription.cloudDefenderService","name":"azure.subscription.cloudDefenderService","fields":{"defenderForContainers":{"name":"defenderForContainers","type":"\n","title":"List of Defender For Container components and whether they are enabled"},"defenderForServers":{"name":"defenderForServers","type":"\n","title":"List of Defender For Server components and whether they are enabled"},"monitoringAgentAutoProvision":{"name":"monitoringAgentAutoProvision","type":"\u0004","title":"Whether the monitoring agent is automatically provisioned on new VMs"},"securityContacts":{"name":"securityContacts","type":"\u0019\u001bazure.subscription.cloudDefenderService.securityContact","title":"List of configured security contacts"},"subscriptionId":{"name":"subscriptionId","type":"\u0007","is_mandatory":true,"title":"The subscription identifier"}},"title":"Azure Microsoft Cloud Defender","private":true},"azure.subscription.cloudDefenderService.securityContact":{"id":"azure.subscription.cloudDefenderService.securityContact","name":"azure.subscription.cloudDefenderService.securityContact","fields":{"alertNotifications":{"name":"alertNotifications","type":"\n","is_mandatory":true,"title":"Alerts notification settings"},"emails":{"name":"emails","type":"\u0019\u0007","is_mandatory":true,"title":"Emails that receive security alerts"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"ID of the security contact"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Name of the security contact"},"notificationsByRole":{"name":"notificationsByRole","type":"\n","is_mandatory":true,"title":"Notifications by role settings"}},"title":"Azure Microsoft Cloud Defender Security Contact","private":true},"azure.subscription.computeService":{"id":"azure.subscription.computeService","name":"azure.subscription.computeService","fields":{"disks":{"name":"disks","type":"\u0019\u001bazure.subscription.computeService.disk","title":"Lists all the disks under a subscription"},"subscriptionId":{"name":"subscriptionId","type":"\u0007","is_mandatory":true,"title":"The subscription identifier"},"vms":{"name":"vms","type":"\u0019\u001bazure.subscription.computeService.vm","title":"Lists all compute instances"}},"title":"Azure Compute","private":true},"azure.subscription.computeService.disk":{"id":"azure.subscription.computeService.disk","name":"azure.subscription.computeService.disk","fields":{"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Disk resource id"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Disk resource location"},"managedBy":{"name":"managedBy","type":"\u0007","is_mandatory":true,"title":"A relative URI containing the ID of the VM that has the disk attached"},"managedByExtended":{"name":"managedByExtended","type":"\u0019\u0007","is_mandatory":true,"title":"List of relative URIs containing the IDs of the VMs that have the disk attached"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Disk resource name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Disk resource properties"},"sku":{"name":"sku","type":"\n","is_mandatory":true,"title":"The disk sku name and tier"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Disk resource tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Disk resource type"},"zones":{"name":"zones","type":"\u0019\u0007","is_mandatory":true,"title":"The logical zone list for disk"}},"title":"Azure Disk Resource","private":true,"defaults":"id name location"},"azure.subscription.computeService.vm":{"id":"azure.subscription.computeService.vm","name":"azure.subscription.computeService.vm","fields":{"dataDisks":{"name":"dataDisks","type":"\u0019\u001bazure.subscription.computeService.disk","title":"VM compute data disk"},"extensions":{"name":"extensions","type":"\u0019\n","title":"VM extension"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"VM ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"VM location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"VM name"},"osDisk":{"name":"osDisk","type":"\u001bazure.subscription.computeService.disk","title":"VM compute disk"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"VM properties"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"VM tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"VM type"}},"title":"Azure Compute Virtual Machine","private":true,"defaults":"id name location "},"azure.subscription.keyvaultService":{"id":"azure.subscription.keyvaultService","name":"azure.subscription.keyvaultService","fields":{"subscriptionId":{"name":"subscriptionId","type":"\u0007","is_mandatory":true,"title":"The subscription identifier"},"vaults":{"name":"vaults","type":"\u0019\u001bazure.subscription.keyvaultService.vault","title":"List of Azure key vaults"}},"title":"Azure Key Vault","private":true},"azure.subscription.keyvaultService.certificate":{"id":"azure.subscription.keyvaultService.certificate","name":"azure.subscription.keyvaultService.certificate","fields":{"certName":{"name":"certName","type":"\u0007","title":"Certificate name"},"created":{"name":"created","type":"\t","is_mandatory":true,"title":"Certificate creation time"},"enabled":{"name":"enabled","type":"\u0004","is_mandatory":true,"title":"Whether certificate is enabled"},"expires":{"name":"expires","type":"\t","is_mandatory":true,"title":"Certificate expiration date"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Certificate ID"},"notBefore":{"name":"notBefore","type":"\t","is_mandatory":true,"title":"Certificate not before date"},"recoveryLevel":{"name":"recoveryLevel","type":"\u0007","is_mandatory":true,"title":"Certificate recovery level"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Certificate tags"},"updated":{"name":"updated","type":"\t","is_mandatory":true,"title":"Certificate last update time"},"version":{"name":"version","type":"\u0007","title":"Certificate version"},"versions":{"name":"versions","type":"\u0019\u001bazure.subscription.keyvaultService.certificate","title":"List of certificate versions"},"x5t":{"name":"x5t","type":"\u0007","is_mandatory":true,"title":"Certificate x5t"}},"title":"Azure Key Vault Certificate","private":true,"defaults":"id certName"},"azure.subscription.keyvaultService.key":{"id":"azure.subscription.keyvaultService.key","name":"azure.subscription.keyvaultService.key","fields":{"created":{"name":"created","type":"\t","is_mandatory":true,"title":"Key creation time"},"enabled":{"name":"enabled","type":"\u0004","is_mandatory":true,"title":"Whether key is enabled"},"expires":{"name":"expires","type":"\t","is_mandatory":true,"title":"Key expiration date"},"keyName":{"name":"keyName","type":"\u0007","title":"Key name"},"kid":{"name":"kid","type":"\u0007","is_mandatory":true,"title":"Key ID"},"managed":{"name":"managed","type":"\u0004","is_mandatory":true,"title":"Whether key is managed"},"notBefore":{"name":"notBefore","type":"\t","is_mandatory":true,"title":"Key not before date"},"recoveryLevel":{"name":"recoveryLevel","type":"\u0007","is_mandatory":true,"title":"Key recovery level"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Key tags"},"updated":{"name":"updated","type":"\t","is_mandatory":true,"title":"Key last update time"},"version":{"name":"version","type":"\u0007","title":"Key version"},"versions":{"name":"versions","type":"\u0019\u001bazure.subscription.keyvaultService.key","title":"List of key versions"}},"title":"Azure Key Vault Key","private":true,"defaults":"kid keyName"},"azure.subscription.keyvaultService.secret":{"id":"azure.subscription.keyvaultService.secret","name":"azure.subscription.keyvaultService.secret","fields":{"contentType":{"name":"contentType","type":"\u0007","is_mandatory":true,"title":"Secret content type"},"created":{"name":"created","type":"\t","is_mandatory":true,"title":"Secret creation date"},"enabled":{"name":"enabled","type":"\u0004","is_mandatory":true,"title":"Whether secret is enabled"},"expires":{"name":"expires","type":"\t","is_mandatory":true,"title":"Secret expiration date"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Secret ID"},"managed":{"name":"managed","type":"\u0004","is_mandatory":true,"title":"Whether secret is managed"},"notBefore":{"name":"notBefore","type":"\t","is_mandatory":true,"title":"Secret notBefore date"},"secretName":{"name":"secretName","type":"\u0007","title":"Secret name"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Secret tags"},"updated":{"name":"updated","type":"\t","is_mandatory":true,"title":"Secret last updated date"},"version":{"name":"version","type":"\u0007","title":"Secret version"},"versions":{"name":"versions","type":"\u0019\u001bazure.subscription.keyvaultService.secret","title":"List of secret versions"}},"title":"Azure Key Vault Secret","private":true,"defaults":"id secretName"},"azure.subscription.keyvaultService.vault":{"id":"azure.subscription.keyvaultService.vault","name":"azure.subscription.keyvaultService.vault","fields":{"certificates":{"name":"certificates","type":"\u0019\u001bazure.subscription.keyvaultService.certificate","title":"Key Vault certificates"},"diagnosticSettings":{"name":"diagnosticSettings","type":"\u0019\u001bazure.subscription.monitorService.diagnosticsetting","title":"Key Vault diagnostic settings"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Key Vault ID"},"keys":{"name":"keys","type":"\u0019\u001bazure.subscription.keyvaultService.key","title":"Key Vault keys"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Key Vault location"},"properties":{"name":"properties","type":"\n","title":"Key Vault properties"},"secrets":{"name":"secrets","type":"\u0019\u001bazure.subscription.keyvaultService.secret","title":"Key Vault secrets"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Key Vault tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Key Vault type"},"vaultName":{"name":"vaultName","type":"\u0007","is_mandatory":true,"title":"Key Vault name"},"vaultUri":{"name":"vaultUri","type":"\u0007","title":"Key Vault URL"}},"title":"Azure Key Vault Vault","private":true,"defaults":"id vaultName location"},"azure.subscription.mariadbService":{"id":"azure.subscription.mariadbService","name":"azure.subscription.mariadbService","fields":{"servers":{"name":"servers","type":"\u0019\u001bazure.subscription.mariadbService.server","title":"List of MariaDB servers"},"subscriptionId":{"name":"subscriptionId","type":"\u0007","is_mandatory":true,"title":"The subscription identifier"}},"title":"Azure Database for MariaDB","private":true},"azure.subscription.mariadbService.database":{"id":"azure.subscription.mariadbService.database","name":"azure.subscription.mariadbService.database","fields":{"charset":{"name":"charset","type":"\u0007","is_mandatory":true,"title":"MariaDB database charset"},"collation":{"name":"collation","type":"\u0007","is_mandatory":true,"title":"MariaDB database collation"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"MariaDB database ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"MariaDB database name"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"MariaDB database type"}},"title":"Azure Database for MariaDB Database","private":true,"defaults":"id name"},"azure.subscription.mariadbService.server":{"id":"azure.subscription.mariadbService.server","name":"azure.subscription.mariadbService.server","fields":{"configuration":{"name":"configuration","type":"\u0019\u001bazure.subscription.sqlService.configuration","title":"MariaDB server configuration"},"databases":{"name":"databases","type":"\u0019\u001bazure.subscription.mariadbService.database","title":"MariaDB server databases"},"firewallRules":{"name":"firewallRules","type":"\u0019\u001bazure.subscription.sqlService.firewallrule","title":"MariaDB server firewall rules"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"MariaDB server ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"MariaDB server location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"MariaDB server name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"MariaDB server properties"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"MariaDB server tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"MariaDB server type"}},"title":"Azure Database for MariaDB Server","private":true,"defaults":"id name location"},"azure.subscription.monitorService":{"id":"azure.subscription.monitorService","name":"azure.subscription.monitorService","fields":{"activityLog":{"name":"activityLog","type":"\u001bazure.subscription.monitorService.activitylog","title":"Activity log for the monitor"},"diagnosticSettings":{"name":"diagnosticSettings","type":"\u0019\u001bazure.subscription.monitorService.diagnosticsetting","title":"List of diagnostic settings for the subscription"},"logProfiles":{"name":"logProfiles","type":"\u0019\u001bazure.subscription.monitorService.logprofile","title":"List of log profiles"},"subscriptionId":{"name":"subscriptionId","type":"\u0007","is_mandatory":true,"title":"The subscription identifier"}},"title":"Azure Monitor","private":true},"azure.subscription.monitorService.activitylog":{"id":"azure.subscription.monitorService.activitylog","name":"azure.subscription.monitorService.activitylog","fields":{"alerts":{"name":"alerts","type":"\u0019\u001bazure.subscription.monitorService.activitylog.alert","title":"List of activity log alerts"}},"title":"Azure Monitor Activity Log","private":true},"azure.subscription.monitorService.activitylog.alert":{"id":"azure.subscription.monitorService.activitylog.alert","name":"azure.subscription.monitorService.activitylog.alert","fields":{"actions":{"name":"actions","type":"\u0019\n","is_mandatory":true,"title":"Actions that activate when the conditions are met"},"conditions":{"name":"conditions","type":"\u0019\n","is_mandatory":true,"title":"Conditions for the activity log alert, all of which must be met"},"description":{"name":"description","type":"\u0007","is_mandatory":true,"title":"Description of the activity log alert"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"ID of the activity log alert"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Location of the alert"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Name of the activity log alert"},"scopes":{"name":"scopes","type":"\u0019\u0007","is_mandatory":true,"title":"List of resource IDs that must be present to trigger the alert"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Tags of the alert"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Type of the activity log alert"}},"title":"Azure Monitor Activity Log Alert","private":true},"azure.subscription.monitorService.diagnosticsetting":{"id":"azure.subscription.monitorService.diagnosticsetting","name":"azure.subscription.monitorService.diagnosticsetting","fields":{"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Diagnostic setting ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Diagnostic setting name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Diagnostic setting properties"},"storageAccount":{"name":"storageAccount","type":"\u001bazure.subscription.storageService.account","is_mandatory":true,"title":"Diagnostic setting storage account"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Diagnostic setting type"}},"title":"Azure Monitor Diagnostic Setting","private":true,"defaults":"id name"},"azure.subscription.monitorService.logprofile":{"id":"azure.subscription.monitorService.logprofile","name":"azure.subscription.monitorService.logprofile","fields":{"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Log profile ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Log profile location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Log profile name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Log profile properties"},"storageAccount":{"name":"storageAccount","type":"\u001bazure.subscription.storageService.account","is_mandatory":true,"title":"Log profile storage account"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Log profile tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Log profile type"}},"title":"Azure Monitor Log Profile","private":true,"defaults":"id name location"},"azure.subscription.mysqlService":{"id":"azure.subscription.mysqlService","name":"azure.subscription.mysqlService","fields":{"flexibleServers":{"name":"flexibleServers","type":"\u0019\u001bazure.subscription.mysqlService.flexibleServer","title":"List of Flexible MySQL servers"},"servers":{"name":"servers","type":"\u0019\u001bazure.subscription.mysqlService.server","title":"List of MySQL servers"},"subscriptionId":{"name":"subscriptionId","type":"\u0007","is_mandatory":true,"title":"The subscription identifier"}},"title":"Azure Database for MySQL","private":true},"azure.subscription.mysqlService.database":{"id":"azure.subscription.mysqlService.database","name":"azure.subscription.mysqlService.database","fields":{"charset":{"name":"charset","type":"\u0007","is_mandatory":true,"title":"MySQL database charset"},"collation":{"name":"collation","type":"\u0007","is_mandatory":true,"title":"MySQL database collation"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"MySQL database ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"MySQL database name"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"MySQL database type"}},"title":"Azure Database for MySQL Database","private":true,"defaults":"id name"},"azure.subscription.mysqlService.flexibleServer":{"id":"azure.subscription.mysqlService.flexibleServer","name":"azure.subscription.mysqlService.flexibleServer","fields":{"configuration":{"name":"configuration","type":"\u0019\u001bazure.subscription.sqlService.configuration","title":"MySQL flexible server configuration"},"databases":{"name":"databases","type":"\u0019\u001bazure.subscription.mysqlService.database","title":"MySQL flexible server databases"},"firewallRules":{"name":"firewallRules","type":"\u0019\u001bazure.subscription.sqlService.firewallrule","title":"MySQL flexible server firewall rules"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"MySQL flexible server ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"MySQL flexible server location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"MySQL flexible server name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"MySQL flexible server properties"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"MySQL flexible server tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"MySQL flexible server type"}},"title":"Azure Database for MySQL Flexible Server","private":true,"defaults":"id name location"},"azure.subscription.mysqlService.server":{"id":"azure.subscription.mysqlService.server","name":"azure.subscription.mysqlService.server","fields":{"configuration":{"name":"configuration","type":"\u0019\u001bazure.subscription.sqlService.configuration","title":"MySQL server configuration"},"databases":{"name":"databases","type":"\u0019\u001bazure.subscription.mysqlService.database","title":"MySQL server databases"},"firewallRules":{"name":"firewallRules","type":"\u0019\u001bazure.subscription.sqlService.firewallrule","title":"MySQL server firewall rules"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"MySQL server ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"MySQL server location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"MySQL server name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"MySQL server properties"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"MySQL server tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"MySQL server type"}},"title":"Azure Database for MySQL Server","private":true,"defaults":"id name location"},"azure.subscription.networkService":{"id":"azure.subscription.networkService","name":"azure.subscription.networkService","fields":{"interfaces":{"name":"interfaces","type":"\u0019\u001bazure.subscription.networkService.interface","title":"List of network interfaces"},"securityGroups":{"name":"securityGroups","type":"\u0019\u001bazure.subscription.networkService.securityGroup","title":"List of network security groups"},"subscriptionId":{"name":"subscriptionId","type":"\u0007","is_mandatory":true,"title":"The subscription identifier"},"watchers":{"name":"watchers","type":"\u0019\u001bazure.subscription.networkService.watcher","title":"List of network watchers"}},"title":"Azure Network","private":true},"azure.subscription.networkService.interface":{"id":"azure.subscription.networkService.interface","name":"azure.subscription.networkService.interface","fields":{"etag":{"name":"etag","type":"\u0007","is_mandatory":true,"title":"Network interface etag"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Network interface ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Network interface name"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Network interface name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Network interface properties"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Network interface tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Network interface type"},"vm":{"name":"vm","type":"\u001bazure.subscription.computeService.vm","title":"Network interface compute vm"}},"title":"Azure Network Interface","private":true,"defaults":"id name location"},"azure.subscription.networkService.securityGroup":{"id":"azure.subscription.networkService.securityGroup","name":"azure.subscription.networkService.securityGroup","fields":{"defaultSecurityRules":{"name":"defaultSecurityRules","type":"\u0019\u001bazure.subscription.networkService.securityrule","is_mandatory":true,"title":"Security group default security rules"},"etag":{"name":"etag","type":"\u0007","is_mandatory":true,"title":"Security group etag"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Security group ID"},"interfaces":{"name":"interfaces","type":"\u0019\u001bazure.subscription.networkService.interface","is_mandatory":true,"title":"Security group interfaces"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Security group location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Security group name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Security group properties"},"securityRules":{"name":"securityRules","type":"\u0019\u001bazure.subscription.networkService.securityrule","is_mandatory":true,"title":"Security group rules"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Security group tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Security group type"}},"title":"Azure Network Security Group","private":true,"defaults":"id name location"},"azure.subscription.networkService.securityrule":{"id":"azure.subscription.networkService.securityrule","name":"azure.subscription.networkService.securityrule","fields":{"destinationPortRange":{"name":"destinationPortRange","type":"\u0019\n","is_mandatory":true,"title":"Security rule destination port range"},"etag":{"name":"etag","type":"\u0007","is_mandatory":true,"title":"Security rule etag"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Security rule ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Security rule name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Security rule properties"}},"title":"Azure Network Security Rule","private":true,"defaults":"id name"},"azure.subscription.networkService.watcher":{"id":"azure.subscription.networkService.watcher","name":"azure.subscription.networkService.watcher","fields":{"etag":{"name":"etag","type":"\u0007","is_mandatory":true,"title":"Network watcher etag"},"flowLogs":{"name":"flowLogs","type":"\u0019\u001bazure.subscription.networkService.watcher.flowlog","title":"Network watcher flow logs"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Network watcher ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Network watcher location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Network watcher name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Network watcher properties"},"provisioningState":{"name":"provisioningState","type":"\u0007","is_mandatory":true,"title":"Network watcher provisioning state"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Network watcher tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Network watcher type"}},"title":"Azure Network Watcher","private":true,"defaults":"name location"},"azure.subscription.networkService.watcher.flowlog":{"id":"azure.subscription.networkService.watcher.flowlog","name":"azure.subscription.networkService.watcher.flowlog","fields":{"analytics":{"name":"analytics","type":"\n","is_mandatory":true,"title":"Network watcher flow log analytics"},"enabled":{"name":"enabled","type":"\u0004","is_mandatory":true,"title":"whether the network watcher flow log is enabled"},"etag":{"name":"etag","type":"\u0007","is_mandatory":true,"title":"Network watcher flow log etag"},"format":{"name":"format","type":"\u0007","is_mandatory":true,"title":"Network watcher flow log format"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Network watcher flow log ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Network watcher flow log location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Network watcher flow log name"},"provisioningState":{"name":"provisioningState","type":"\u0007","is_mandatory":true,"title":"Network watcher flow log provisioning state"},"retentionPolicy":{"name":"retentionPolicy","type":"\n","is_mandatory":true,"title":"Network watcher flow log retention policy"},"storageAccountId":{"name":"storageAccountId","type":"\u0007","is_mandatory":true,"title":"Network watcher flow log storage account identifier"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Network watcher flow log tags"},"targetResourceGuid":{"name":"targetResourceGuid","type":"\u0007","is_mandatory":true,"title":"Network watcher flow log target resource guid"},"targetResourceId":{"name":"targetResourceId","type":"\u0007","is_mandatory":true,"title":"Network watcher flow log target resource identifier"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Network watcher flow log type"},"version":{"name":"version","type":"\u0005","is_mandatory":true,"title":"Network watcher flow log version"}},"title":"Azure Network Watcher Flow Log","private":true,"defaults":"name location"},"azure.subscription.postgresqlService":{"id":"azure.subscription.postgresqlService","name":"azure.subscription.postgresqlService","fields":{"servers":{"name":"servers","type":"\u0019\u001bazure.subscription.postgresqlService.server","title":"List of PostgreSQL servers"},"subscriptionId":{"name":"subscriptionId","type":"\u0007","is_mandatory":true,"title":"The subscription identifier"}},"title":"Azure Database for PostgreSQL","private":true},"azure.subscription.postgresqlService.database":{"id":"azure.subscription.postgresqlService.database","name":"azure.subscription.postgresqlService.database","fields":{"charset":{"name":"charset","type":"\u0007","is_mandatory":true,"title":"PostgreSQL database charset"},"collation":{"name":"collation","type":"\u0007","is_mandatory":true,"title":"PostgreSQL database collation"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"PostgreSQL database ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"PostgreSQL database name"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"PostgreSQL database type"}},"title":"Azure Database for PostgreSQL Database","private":true,"defaults":"id name"},"azure.subscription.postgresqlService.server":{"id":"azure.subscription.postgresqlService.server","name":"azure.subscription.postgresqlService.server","fields":{"configuration":{"name":"configuration","type":"\u0019\u001bazure.subscription.sqlService.configuration","title":"PostgreSQL server configuration"},"databases":{"name":"databases","type":"\u0019\u001bazure.subscription.postgresqlService.database","title":"PostgreSQL server databases"},"firewallRules":{"name":"firewallRules","type":"\u0019\u001bazure.subscription.sqlService.firewallrule","title":"PostgreSQL server firewall rules"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"PostgreSQL server ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"PostgreSQL server location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"PostgreSQL server name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"PostgreSQL server properties"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"PostgreSQL server tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"PostgreSQL server type"}},"title":"Azure Database for PostgreSQL Server","private":true,"defaults":"id name location"},"azure.subscription.resource":{"id":"azure.subscription.resource","name":"azure.subscription.resource","fields":{"changedTime":{"name":"changedTime","type":"\t","is_mandatory":true,"title":"Resource change time"},"createdTime":{"name":"createdTime","type":"\t","is_mandatory":true,"title":"Resource create time"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Resource ID"},"identity":{"name":"identity","type":"\n","is_mandatory":true,"title":"Resource identity"},"kind":{"name":"kind","type":"\u0007","is_mandatory":true,"title":"Resource kind"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Resource location"},"managedBy":{"name":"managedBy","type":"\u0007","is_mandatory":true,"title":"Resource managed by"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Resource name"},"plan":{"name":"plan","type":"\n","is_mandatory":true,"title":"Resource plan"},"provisioningState":{"name":"provisioningState","type":"\u0007","is_mandatory":true,"title":"Resource provisioning state"},"sku":{"name":"sku","type":"\n","is_mandatory":true,"title":"Resource SKU"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Resource tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Resource type"}},"title":"Azure Resource","private":true,"defaults":"id name location"},"azure.subscription.resourcegroup":{"id":"azure.subscription.resourcegroup","name":"azure.subscription.resourcegroup","fields":{"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Resource Group ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Resource Group location"},"managedBy":{"name":"managedBy","type":"\u0007","is_mandatory":true,"title":"Resource Group managed by"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Resource Group name"},"provisioningState":{"name":"provisioningState","type":"\u0007","is_mandatory":true,"title":"Resource Group provisioning state"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Resource Group tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Resource Group type"}},"title":"Azure Resource Group","private":true,"defaults":"name location"},"azure.subscription.sqlService":{"id":"azure.subscription.sqlService","name":"azure.subscription.sqlService","fields":{"servers":{"name":"servers","type":"\u0019\u001bazure.subscription.sqlService.server","title":"List of SQL servers"},"subscriptionId":{"name":"subscriptionId","type":"\u0007","is_mandatory":true,"title":"The subscription identifier"}},"title":"Azure SQL","private":true},"azure.subscription.sqlService.configuration":{"id":"azure.subscription.sqlService.configuration","name":"azure.subscription.sqlService.configuration","fields":{"allowedValues":{"name":"allowedValues","type":"\u0007","is_mandatory":true,"title":"SQL configuration allowed values"},"dataType":{"name":"dataType","type":"\u0007","is_mandatory":true,"title":"SQL configuration data type"},"defaultValue":{"name":"defaultValue","type":"\u0007","is_mandatory":true,"title":"SQL configuration default value"},"description":{"name":"description","type":"\u0007","is_mandatory":true,"title":"SQL configuration description"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"SQL configuration ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"SQL configuration name"},"source":{"name":"source","type":"\u0007","is_mandatory":true,"title":"SQL configuration source"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"SQL configuration type"},"value":{"name":"value","type":"\u0007","is_mandatory":true,"title":"SQL configuration value"}},"title":"Azure SQL Configuration","private":true,"defaults":"id name"},"azure.subscription.sqlService.database":{"id":"azure.subscription.sqlService.database","name":"azure.subscription.sqlService.database","fields":{"advisor":{"name":"advisor","type":"\u0019\n","title":"SQL database advisor"},"auditingPolicy":{"name":"auditingPolicy","type":"\n","title":"SQL database auditing policy"},"collation":{"name":"collation","type":"\u0007","is_mandatory":true,"title":"SQL database collation"},"connectionPolicy":{"name":"connectionPolicy","type":"\n","title":"SQL database connection policy"},"containmentState":{"name":"containmentState","type":"\u0005","title":"Deprecated"},"createMode":{"name":"createMode","type":"\u0007","is_mandatory":true,"title":"SQL database create mode"},"creationDate":{"name":"creationDate","type":"\t","is_mandatory":true,"title":"SQL database create date"},"currentServiceObjectiveId":{"name":"currentServiceObjectiveId","type":"\u0007","title":"Deprecated. Use `serviceLevelObjective` instead."},"databaseId":{"name":"databaseId","type":"\u0007","is_mandatory":true,"title":"Database ID"},"defaultSecondaryLocation":{"name":"defaultSecondaryLocation","type":"\u0007","is_mandatory":true,"title":"SQL database default secondary location"},"earliestRestoreDate":{"name":"earliestRestoreDate","type":"\t","is_mandatory":true,"title":"SQL database earliest restore date"},"edition":{"name":"edition","type":"\u0007","is_mandatory":true,"title":"SQL database edition"},"elasticPoolName":{"name":"elasticPoolName","type":"\u0007","is_mandatory":true,"title":"SQL database elastic pool name"},"failoverGroupId":{"name":"failoverGroupId","type":"\u0007","is_mandatory":true,"title":"SQL database failover group ID"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"SQL database ID"},"maxSizeBytes":{"name":"maxSizeBytes","type":"\u0005","is_mandatory":true,"title":"SQL database max byte size"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"SQL database name"},"readScale":{"name":"readScale","type":"\u0007","is_mandatory":true,"title":"SQL database read scale"},"recommendedIndex":{"name":"recommendedIndex","type":"\n","title":"Deprecated. Use `advisor.recommendedActions` instead."},"recoveryServicesRecoveryPointResourceId":{"name":"recoveryServicesRecoveryPointResourceId","type":"\u0007","is_mandatory":true,"title":"SQL database recovery services recovery point ID"},"requestedServiceObjectiveId":{"name":"requestedServiceObjectiveId","type":"\u0007","title":"Deprecated. Use `requestedServiceObjectiveName` instead."},"requestedServiceObjectiveName":{"name":"requestedServiceObjectiveName","type":"\u0007","is_mandatory":true,"title":"SQL database requested objective name"},"restorePointInTime":{"name":"restorePointInTime","type":"\t","is_mandatory":true,"title":"SQL database restore point"},"sampleName":{"name":"sampleName","type":"\u0007","is_mandatory":true,"title":"SQL database sample name"},"serviceLevelObjective":{"name":"serviceLevelObjective","type":"\u0007","is_mandatory":true,"title":"SQL database service level objective"},"serviceTierAdvisors":{"name":"serviceTierAdvisors","type":"\n","title":"Deprecated"},"sourceDatabaseDeletionDate":{"name":"sourceDatabaseDeletionDate","type":"\t","is_mandatory":true,"title":"SQL database deletion date"},"sourceDatabaseId":{"name":"sourceDatabaseId","type":"\u0007","is_mandatory":true,"title":"SQL database source database ID"},"status":{"name":"status","type":"\u0007","is_mandatory":true,"title":"SQL database status"},"threatDetectionPolicy":{"name":"threatDetectionPolicy","type":"\n","title":"SQL database threat detection policy"},"transparentDataEncryption":{"name":"transparentDataEncryption","type":"\n","title":"SQL database transparent data encryption"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"SQL database type"},"usage":{"name":"usage","type":"\u0019\u001bazure.subscription.sqlService.databaseusage","title":"SQL database usage"},"zoneRedundant":{"name":"zoneRedundant","type":"\u0004","is_mandatory":true,"title":"Whether SQL server is zone redundant"}},"title":"Azure SQL Server Database","private":true,"defaults":"id name"},"azure.subscription.sqlService.databaseusage":{"id":"azure.subscription.sqlService.databaseusage","name":"azure.subscription.sqlService.databaseusage","fields":{"currentValue":{"name":"currentValue","type":"\u0006","is_mandatory":true,"title":"Database usage current value"},"displayName":{"name":"displayName","type":"\u0007","is_mandatory":true,"title":"Database usage display name"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Database usage ID"},"limit":{"name":"limit","type":"\u0006","is_mandatory":true,"title":"Database usage limit"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Database usage name"},"nextResetTime":{"name":"nextResetTime","type":"\t","title":"Deprecated"},"resourceName":{"name":"resourceName","type":"\u0007","is_mandatory":true,"title":"Database usage resource name"},"unit":{"name":"unit","type":"\u0007","is_mandatory":true,"title":"Database usage unit"}},"title":"Azure SQL Database Usage","private":true,"defaults":"id name"},"azure.subscription.sqlService.firewallrule":{"id":"azure.subscription.sqlService.firewallrule","name":"azure.subscription.sqlService.firewallrule","fields":{"endIpAddress":{"name":"endIpAddress","type":"\u0007","is_mandatory":true,"title":"SQL firewall rule end IP address"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"SQL firewall rule ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"SQL firewall rule name"},"startIpAddress":{"name":"startIpAddress","type":"\u0007","is_mandatory":true,"title":"SQL firewall rule start IP address"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"SQL firewall rule type"}},"title":"Azure SQL Firewall Rule","private":true,"defaults":"id name"},"azure.subscription.sqlService.server":{"id":"azure.subscription.sqlService.server","name":"azure.subscription.sqlService.server","fields":{"auditingPolicy":{"name":"auditingPolicy","type":"\n","title":"SQL server auditing policy"},"azureAdAdministrators":{"name":"azureAdAdministrators","type":"\u0019\u001bazure.subscription.sqlService.server.administrator","title":"SQL server AD administrators"},"connectionPolicy":{"name":"connectionPolicy","type":"\n","title":"SQL server connection policy"},"databases":{"name":"databases","type":"\u0019\u001bazure.subscription.sqlService.database","title":"SQL server databases"},"encryptionProtector":{"name":"encryptionProtector","type":"\n","title":"SQL server encryption protector"},"firewallRules":{"name":"firewallRules","type":"\u0019\u001bazure.subscription.sqlService.firewallrule","title":"SQL server firewall rules"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"SQL server ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"SQL server location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"SQL server name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"SQL server properties"},"securityAlertPolicy":{"name":"securityAlertPolicy","type":"\n","title":"SQL server security alert policy"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"SQL server tags"},"threatDetectionPolicy":{"name":"threatDetectionPolicy","type":"\n","title":"SQL server threat detection policy"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"SQL server type"},"vulnerabilityAssessmentSettings":{"name":"vulnerabilityAssessmentSettings","type":"\u001bazure.subscription.sqlService.server.vulnerabilityassessmentsettings","title":"SQL server vulnerability assessment settings"}},"title":"Azure SQL Server","private":true,"defaults":"name location"},"azure.subscription.sqlService.server.administrator":{"id":"azure.subscription.sqlService.server.administrator","name":"azure.subscription.sqlService.server.administrator","fields":{"administratorType":{"name":"administratorType","type":"\u0007","is_mandatory":true,"title":"SQL administrator type"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"SQL administrator ID"},"login":{"name":"login","type":"\u0007","is_mandatory":true,"title":"SQL administrator login"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"SQL administrator name"},"sid":{"name":"sid","type":"\u0007","is_mandatory":true,"title":"SQL administrator subscription ID"},"tenantId":{"name":"tenantId","type":"\u0007","is_mandatory":true,"title":"SQL administrator tenant ID"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"SQL administrator type"}},"title":"Azure SQL Server Administrator","private":true,"defaults":"id name"},"azure.subscription.sqlService.server.vulnerabilityassessmentsettings":{"id":"azure.subscription.sqlService.server.vulnerabilityassessmentsettings","name":"azure.subscription.sqlService.server.vulnerabilityassessmentsettings","fields":{"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"ID of the vulnerability assessment"},"mailSubscriptionAdmins":{"name":"mailSubscriptionAdmins","type":"\u0004","is_mandatory":true,"title":"Whether the schedule scan notification is also sent to the subscription administrators"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Name of the vulnerability assessment"},"recurringScanEmails":{"name":"recurringScanEmails","type":"\u0019\u0007","is_mandatory":true,"title":"Specifies an array of e-mail addresses to which the scan notification is sent"},"recurringScanEnabled":{"name":"recurringScanEnabled","type":"\u0004","is_mandatory":true,"title":"Indicates whether recurring scan is enabled"},"storageAccountAccessKey":{"name":"storageAccountAccessKey","type":"\u0007","is_mandatory":true,"title":"Identifier key of the storage account for vulnerability assessment scan results"},"storageContainerPath":{"name":"storageContainerPath","type":"\u0007","is_mandatory":true,"title":"Blob storage container path to hold the scan results"},"storageContainerSasKey":{"name":"storageContainerSasKey","type":"\u0007","is_mandatory":true,"title":"Shared access signature key that has write access to the blob container specified in 'storageContainerPath'"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Type of the vulnerability assessment"}},"title":"Azure SQL Server Vulnerability Assessment Settings","private":true},"azure.subscription.storageService":{"id":"azure.subscription.storageService","name":"azure.subscription.storageService","fields":{"accounts":{"name":"accounts","type":"\u0019\u001bazure.subscription.storageService.account","title":"List of storage accounts"},"subscriptionId":{"name":"subscriptionId","type":"\u0007","is_mandatory":true,"title":"The subscription identifier"}},"title":"Azure Storage","private":true},"azure.subscription.storageService.account":{"id":"azure.subscription.storageService.account","name":"azure.subscription.storageService.account","fields":{"blobProperties":{"name":"blobProperties","type":"\u001bazure.subscription.storageService.account.blobService.properties","title":"Storage account blob properties"},"containers":{"name":"containers","type":"\u0019\u001bazure.subscription.storageService.account.container","title":"Storage account containers"},"dataProtection":{"name":"dataProtection","type":"\u001bazure.subscription.storageService.account.dataProtection","title":"Storage account data protection"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Storage account ID"},"identity":{"name":"identity","type":"\n","is_mandatory":true,"title":"Storage account identity"},"kind":{"name":"kind","type":"\u0007","is_mandatory":true,"title":"Storage account kind"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Storage account location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Storage account name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Storage account properties"},"queueProperties":{"name":"queueProperties","type":"\u001bazure.subscription.storageService.account.queueService.properties","title":"Storage account queue properties"},"sku":{"name":"sku","type":"\n","is_mandatory":true,"title":"Storage account sku"},"tableProperties":{"name":"tableProperties","type":"\u001bazure.subscription.storageService.account.tableService.properties","title":"Storage account table properties"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Storage account tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Storage account type"}},"title":"Azure Storage Account","private":true,"defaults":"id name location"},"azure.subscription.storageService.account.blobService.properties":{"id":"azure.subscription.storageService.account.blobService.properties","name":"azure.subscription.storageService.account.blobService.properties","fields":{"hourMetrics":{"name":"hourMetrics","type":"\u001bazure.subscription.storageService.account.service.properties.metrics","is_mandatory":true,"title":"Hourly metrics properties"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"ID of the service"},"logging":{"name":"logging","type":"\u001bazure.subscription.storageService.account.service.properties.logging","is_mandatory":true,"title":"Logging properties"},"minuteMetrics":{"name":"minuteMetrics","type":"\u001bazure.subscription.storageService.account.service.properties.metrics","is_mandatory":true,"title":"Minute metrics properties"}},"title":"Azure Storage Account Blob Service Properties","private":true},"azure.subscription.storageService.account.container":{"id":"azure.subscription.storageService.account.container","name":"azure.subscription.storageService.account.container","fields":{"etag":{"name":"etag","type":"\u0007","is_mandatory":true,"title":"Storage container etag"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Storage container ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Storage container name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Storage container properties"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Storage container type"}},"title":"Azure Storage Container","private":true,"defaults":"id name"},"azure.subscription.storageService.account.dataProtection":{"id":"azure.subscription.storageService.account.dataProtection","name":"azure.subscription.storageService.account.dataProtection","fields":{"blobRetentionDays":{"name":"blobRetentionDays","type":"\u0005","is_mandatory":true,"title":"Retention period in days for deleted blobs"},"blobSoftDeletionEnabled":{"name":"blobSoftDeletionEnabled","type":"\u0004","is_mandatory":true,"title":"Whether soft deletion of blobs is enabled"},"containerRetentionDays":{"name":"containerRetentionDays","type":"\u0005","is_mandatory":true,"title":"Retention period in days for deleted containers"},"containerSoftDeletionEnabled":{"name":"containerSoftDeletionEnabled","type":"\u0004","is_mandatory":true,"title":"Whether soft deletion of containers is enabled"},"storageAccountId":{"name":"storageAccountId","type":"\u0007","is_mandatory":true,"title":"ID of the storage account"}},"title":"Azure Storage Account Data Protection","private":true},"azure.subscription.storageService.account.queueService.properties":{"id":"azure.subscription.storageService.account.queueService.properties","name":"azure.subscription.storageService.account.queueService.properties","fields":{"hourMetrics":{"name":"hourMetrics","type":"\u001bazure.subscription.storageService.account.service.properties.metrics","is_mandatory":true,"title":"Hourly metrics properties"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"ID of the service"},"logging":{"name":"logging","type":"\u001bazure.subscription.storageService.account.service.properties.logging","is_mandatory":true,"title":"Logging properties"},"minuteMetrics":{"name":"minuteMetrics","type":"\u001bazure.subscription.storageService.account.service.properties.metrics","is_mandatory":true,"title":"Minute metrics properties"}},"title":"Azure Storage Account Queue Service Properties","private":true},"azure.subscription.storageService.account.service.properties.logging":{"id":"azure.subscription.storageService.account.service.properties.logging","name":"azure.subscription.storageService.account.service.properties.logging","fields":{"delete":{"name":"delete","type":"\u0004","is_mandatory":true,"title":"Whether delete requests are being logged"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"ID of the logging configuration"},"read":{"name":"read","type":"\u0004","is_mandatory":true,"title":"Whether read requests are being logged"},"retentionPolicy":{"name":"retentionPolicy","type":"\u001bazure.subscription.storageService.account.service.properties.retentionPolicy","is_mandatory":true,"title":"Retention policy for the logging metrics"},"version":{"name":"version","type":"\u0007","is_mandatory":true,"title":"Logging version"},"write":{"name":"write","type":"\u0004","is_mandatory":true,"title":"Whether write requests are being logged"}},"title":"Azure Storage Account Service Properties Logging","private":true},"azure.subscription.storageService.account.service.properties.metrics":{"id":"azure.subscription.storageService.account.service.properties.metrics","name":"azure.subscription.storageService.account.service.properties.metrics","fields":{"enabled":{"name":"enabled","type":"\u0004","is_mandatory":true,"title":"Whether the metrics are enabled"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"ID of the metrics"},"includeAPIs":{"name":"includeAPIs","type":"\u0004","is_mandatory":true,"title":"Whether metrics generate summary statistics for called API operations"},"retentionPolicy":{"name":"retentionPolicy","type":"\u001bazure.subscription.storageService.account.service.properties.retentionPolicy","is_mandatory":true,"title":"Retention policy for the metrics"},"version":{"name":"version","type":"\u0007","is_mandatory":true,"title":"Version of the metrics"}},"title":"Azure Storage Account Service Properties Metrics","private":true},"azure.subscription.storageService.account.service.properties.retentionPolicy":{"id":"azure.subscription.storageService.account.service.properties.retentionPolicy","name":"azure.subscription.storageService.account.service.properties.retentionPolicy","fields":{"enabled":{"name":"enabled","type":"\u0004","is_mandatory":true,"title":"Whether a retention policy is enabled for the Azure Storage"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"ID of the retention policy"},"retentionDays":{"name":"retentionDays","type":"\u0005","is_mandatory":true,"title":"Number of days that metrics or logging data is retained"}},"title":"Azure Storage Account Service Properties Retention Policy","private":true},"azure.subscription.storageService.account.tableService.properties":{"id":"azure.subscription.storageService.account.tableService.properties","name":"azure.subscription.storageService.account.tableService.properties","fields":{"hourMetrics":{"name":"hourMetrics","type":"\u001bazure.subscription.storageService.account.service.properties.metrics","is_mandatory":true,"title":"Hourly metrics properties"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"ID of the service"},"logging":{"name":"logging","type":"\u001bazure.subscription.storageService.account.service.properties.logging","is_mandatory":true,"title":"Logging properties"},"minuteMetrics":{"name":"minuteMetrics","type":"\u001bazure.subscription.storageService.account.service.properties.metrics","is_mandatory":true,"title":"Minute metrics properties"}},"title":"Azure Storage Account Table Service Properties","private":true},"azure.subscription.webService":{"id":"azure.subscription.webService","name":"azure.subscription.webService","fields":{"apps":{"name":"apps","type":"\u0019\u001bazure.subscription.webService.appsite","title":"List of web apps"},"availableRuntimes":{"name":"availableRuntimes","type":"\u0019\n","title":"Available runtimes"},"subscriptionId":{"name":"subscriptionId","type":"\u0007","is_mandatory":true,"title":"The subscription identifier"}},"title":"Azure Web","private":true},"azure.subscription.webService.appsite":{"id":"azure.subscription.webService.appsite","name":"azure.subscription.webService.appsite","fields":{"applicationSettings":{"name":"applicationSettings","type":"\n","title":"Appsite application settings"},"authenticationSettings":{"name":"authenticationSettings","type":"\u001bazure.subscription.webService.appsiteauthsettings","title":"Appsite authentication settings"},"configuration":{"name":"configuration","type":"\u001bazure.subscription.webService.appsiteconfig","title":"Appsite configuration"},"connectionSettings":{"name":"connectionSettings","type":"\n","title":"Appsite connection settings"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Appsite ID"},"identity":{"name":"identity","type":"\n","is_mandatory":true,"title":"Appsite identity"},"kind":{"name":"kind","type":"\u0007","is_mandatory":true,"title":"Appsite kind"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Appsite location"},"metadata":{"name":"metadata","type":"\n","title":"Appsite metadata"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Appsite name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Appsite properties"},"stack":{"name":"stack","type":"\n","title":"Appsite stack"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Appsite tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Appsite type"}},"title":"Azure Web App Site","private":true,"defaults":"id name location"},"azure.subscription.webService.appsiteauthsettings":{"id":"azure.subscription.webService.appsiteauthsettings","name":"azure.subscription.webService.appsiteauthsettings","fields":{"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Auth settings ID"},"kind":{"name":"kind","type":"\u0007","is_mandatory":true,"title":"Auth settings kind"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Auth settings name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Auth settings properties"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Auth settings type"}},"title":"Azure AppSite Authentication Settings","private":true,"defaults":"id name"},"azure.subscription.webService.appsiteconfig":{"id":"azure.subscription.webService.appsiteconfig","name":"azure.subscription.webService.appsiteconfig","fields":{"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Appsite config ID"},"kind":{"name":"kind","type":"\u0007","is_mandatory":true,"title":"Appsite config kind"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Appsite config name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Appsite config properties"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Appsite config type"}},"title":"Azure AppSite Config","private":true,"defaults":"id name"},"azure.web":{"id":"azure.subscription.webService","name":"azure.subscription.webService","fields":{"apps":{"name":"apps","type":"\u0019\u001bazure.subscription.webService.appsite","title":"List of web apps"},"availableRuntimes":{"name":"availableRuntimes","type":"\u0019\n","title":"Available runtimes"},"subscriptionId":{"name":"subscriptionId","type":"\u0007","is_mandatory":true,"title":"The subscription identifier"}},"title":"Azure Web","private":true},"azure.web.appsite":{"id":"azure.subscription.webService.appsite","name":"azure.subscription.webService.appsite","fields":{"applicationSettings":{"name":"applicationSettings","type":"\n","title":"Appsite application settings"},"authenticationSettings":{"name":"authenticationSettings","type":"\u001bazure.subscription.webService.appsiteauthsettings","title":"Appsite authentication settings"},"configuration":{"name":"configuration","type":"\u001bazure.subscription.webService.appsiteconfig","title":"Appsite configuration"},"connectionSettings":{"name":"connectionSettings","type":"\n","title":"Appsite connection settings"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Appsite ID"},"identity":{"name":"identity","type":"\n","is_mandatory":true,"title":"Appsite identity"},"kind":{"name":"kind","type":"\u0007","is_mandatory":true,"title":"Appsite kind"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Appsite location"},"metadata":{"name":"metadata","type":"\n","title":"Appsite metadata"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Appsite name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Appsite properties"},"stack":{"name":"stack","type":"\n","title":"Appsite stack"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Appsite tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Appsite type"}},"title":"Azure Web App Site","private":true,"defaults":"id name location"},"azure.web.appsiteauthsettings":{"id":"azure.subscription.webService.appsiteauthsettings","name":"azure.subscription.webService.appsiteauthsettings","fields":{"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Auth settings ID"},"kind":{"name":"kind","type":"\u0007","is_mandatory":true,"title":"Auth settings kind"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Auth settings name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Auth settings properties"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Auth settings type"}},"title":"Azure AppSite Authentication Settings","private":true,"defaults":"id name"},"azure.web.appsiteconfig":{"id":"azure.subscription.webService.appsiteconfig","name":"azure.subscription.webService.appsiteconfig","fields":{"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Appsite config ID"},"kind":{"name":"kind","type":"\u0007","is_mandatory":true,"title":"Appsite config kind"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Appsite config name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Appsite config properties"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Appsite config type"}},"title":"Azure AppSite Config","private":true,"defaults":"id name"},"azuread":{"id":"azuread","name":"azuread","fields":{"applications":{"name":"applications","type":"\u0019\u001bazuread.application","title":"Deprecated. Use `microsoft.application` instead."},"domains":{"name":"domains","type":"\u0019\u001bazuread.domain","title":"Deprecated. Use `microsoft.domain` instead."},"groups":{"name":"groups","type":"\u0019\u001bazuread.group","title":"Deprecated. Use microsoft.group"},"servicePrincipals":{"name":"servicePrincipals","type":"\u0019\u001bazuread.serviceprincipal","title":"Deprecated. Use `microsoft.serviceprincipal` instead."},"users":{"name":"users","type":"\u0019\u001bazuread.user","title":"Deprecated. Use `microsoft.user` instead."}},"title":"Azure Active Directory (deprecated, use microsoft resource pack instead)"},"azuread.application":{"id":"azuread.application","name":"azuread.application","fields":{"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Application ID"}},"title":"Deprecated. Use `microsoft.application` instead","private":true,"defaults":"id"},"azuread.domain":{"id":"azuread.domain","name":"azuread.domain","fields":{"authenticationType":{"name":"authenticationType","type":"\u0007","is_mandatory":true,"title":"Domain authentication type"},"isDefault":{"name":"isDefault","type":"\u0004","is_mandatory":true,"title":"Whether domain is default"},"isVerified":{"name":"isVerified","type":"\u0004","is_mandatory":true,"title":"Whether domain is verified"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Domain name"},"properties":{"name":"properties","type":"\n","title":"Deprecated"}},"title":"Azure Active Directory Domain (deprecated, use microsoft.domain instead)","private":true,"defaults":"name"},"azuread.group":{"id":"azuread.group","name":"azuread.group","fields":{"displayName":{"name":"displayName","type":"\u0007","is_mandatory":true,"title":"Group display name"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Group ID"},"mail":{"name":"mail","type":"\u0007","is_mandatory":true,"title":"Group email"},"mailEnabled":{"name":"mailEnabled","type":"\u0004","is_mandatory":true,"title":"Whether mail is enabled for group"},"mailNickname":{"name":"mailNickname","type":"\u0007","is_mandatory":true,"title":"Group nickname"},"members":{"name":"members","type":"\u0019\u001bazuread.user","title":"Group members"},"objectType":{"name":"objectType","type":"\u0007","title":"Deprecated"},"properties":{"name":"properties","type":"\n","title":"Deprecated"},"securityEnabled":{"name":"securityEnabled","type":"\u0004","is_mandatory":true,"title":"Whether security is enabled for group"}},"title":"Azure Active Directory Group (deprecated, use microsoft.group instead)","private":true,"defaults":"displayName"},"azuread.serviceprincipal":{"id":"azuread.serviceprincipal","name":"azuread.serviceprincipal","fields":{"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Service principal ID"}},"title":"Deprecated. Use `microsoft.serviceprincipal` instead.","private":true,"defaults":"id"},"azuread.user":{"id":"azuread.user","name":"azuread.user","fields":{"accountEnabled":{"name":"accountEnabled","type":"\u0004","is_mandatory":true,"title":"User account status"},"displayName":{"name":"displayName","type":"\u0007","is_mandatory":true,"title":"User display name"},"givenName":{"name":"givenName","type":"\u0007","is_mandatory":true,"title":"User given name"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"User id"},"mail":{"name":"mail","type":"\u0007","is_mandatory":true,"title":"User email"},"mailNickname":{"name":"mailNickname","type":"\u0007","is_mandatory":true,"title":"User mail nickname"},"objectType":{"name":"objectType","type":"\u0007","title":"Deprecated"},"properties":{"name":"properties","type":"\n","title":"Deprecated"},"surname":{"name":"surname","type":"\u0007","is_mandatory":true,"title":"User surname"},"userPrincipalName":{"name":"userPrincipalName","type":"\u0007","is_mandatory":true,"title":"User principal name"},"userType":{"name":"userType","type":"\u0007","is_mandatory":true,"title":"Azure Directory user type"}},"title":"Azure Active Directory User (deprecated, use microsoft.user instead)","private":true,"defaults":"id displayName"},"azurerm":{"id":"azure.subscription","name":"azure.subscription","fields":{"authorization":{"name":"authorization","type":"\u001bazure.subscription.authorizationService","title":"Get authorization resources inside the subscription"},"authorizationSource":{"name":"authorizationSource","type":"\u0007","title":"Subscription authorization source"},"cloudDefender":{"name":"cloudDefender","type":"\u001bazure.subscription.cloudDefenderService","title":"Get cloud defender resources inside the subscription"},"compute":{"name":"compute","type":"\u001bazure.subscription.computeService","title":"Get compute resources inside the subscription"},"id":{"name":"id","type":"\u0007","title":"Full resource identifier of the subscription"},"keyVault":{"name":"keyVault","type":"\u001bazure.subscription.keyvaultService","title":"Get key vault resources inside the subscription"},"managedByTenants":{"name":"managedByTenants","type":"\u0019\u0007","title":"List of tenants that manage the subscription"},"mariaDb":{"name":"mariaDb","type":"\u001bazure.subscription.mariadbService","title":"Get MariaDB resources inside the subscription"},"monitor":{"name":"monitor","type":"\u001bazure.subscription.monitorService","title":"Get monitor resources inside the subscription"},"mySql":{"name":"mySql","type":"\u001bazure.subscription.mysqlService","title":"Get MySQL resources inside the subscription"},"name":{"name":"name","type":"\u0007","title":"Name of the subscription"},"network":{"name":"network","type":"\u001bazure.subscription.networkService","title":"Get network resources inside the subscription"},"postgreSql":{"name":"postgreSql","type":"\u001bazure.subscription.postgresqlService","title":"Get PostgreSQL resources inside the subscription"},"resourceGroups":{"name":"resourceGroups","type":"\u0019\u001bazure.subscription.resourcegroup","title":"Get resource groups inside the subscription"},"resources":{"name":"resources","type":"\u0019\u001bazure.subscription.resource","title":"Get all the resources in a subscription"},"sql":{"name":"sql","type":"\u001bazure.subscription.sqlService","title":"Get SQL resources inside the subscription"},"state":{"name":"state","type":"\u0007","title":"Subscription state"},"storage":{"name":"storage","type":"\u001bazure.subscription.storageService","title":"Get storage resources inside the subscription"},"subscriptionId":{"name":"subscriptionId","type":"\u0007","title":"Subscription identifier"},"subscriptionsPolicies":{"name":"subscriptionsPolicies","type":"\n","title":"Subscription policies"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","title":"Subscription tags"},"tenantId":{"name":"tenantId","type":"\u0007","title":"Subscription tenant identifier"},"web":{"name":"web","type":"\u001bazure.subscription.webService","title":"Get web resources inside the subscription"}},"title":"Azure Subscription","defaults":"name"},"azurerm.compute":{"id":"azure.subscription.computeService","name":"azure.subscription.computeService","fields":{"disks":{"name":"disks","type":"\u0019\u001bazure.subscription.computeService.disk","title":"Lists all the disks under a subscription"},"subscriptionId":{"name":"subscriptionId","type":"\u0007","is_mandatory":true,"title":"The subscription identifier"},"vms":{"name":"vms","type":"\u0019\u001bazure.subscription.computeService.vm","title":"Lists all compute instances"}},"title":"Azure Compute","private":true},"azurerm.compute.disk":{"id":"azure.subscription.computeService.disk","name":"azure.subscription.computeService.disk","fields":{"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Disk resource id"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Disk resource location"},"managedBy":{"name":"managedBy","type":"\u0007","is_mandatory":true,"title":"A relative URI containing the ID of the VM that has the disk attached"},"managedByExtended":{"name":"managedByExtended","type":"\u0019\u0007","is_mandatory":true,"title":"List of relative URIs containing the IDs of the VMs that have the disk attached"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Disk resource name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Disk resource properties"},"sku":{"name":"sku","type":"\n","is_mandatory":true,"title":"The disk sku name and tier"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Disk resource tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Disk resource type"},"zones":{"name":"zones","type":"\u0019\u0007","is_mandatory":true,"title":"The logical zone list for disk"}},"title":"Azure Disk Resource","private":true,"defaults":"id name location"},"azurerm.compute.vm":{"id":"azure.subscription.computeService.vm","name":"azure.subscription.computeService.vm","fields":{"dataDisks":{"name":"dataDisks","type":"\u0019\u001bazure.subscription.computeService.disk","title":"VM compute data disk"},"extensions":{"name":"extensions","type":"\u0019\n","title":"VM extension"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"VM ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"VM location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"VM name"},"osDisk":{"name":"osDisk","type":"\u001bazure.subscription.computeService.disk","title":"VM compute disk"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"VM properties"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"VM tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"VM type"}},"title":"Azure Compute Virtual Machine","private":true,"defaults":"id name location "},"azurerm.keyvault":{"id":"azure.subscription.keyvaultService","name":"azure.subscription.keyvaultService","fields":{"subscriptionId":{"name":"subscriptionId","type":"\u0007","is_mandatory":true,"title":"The subscription identifier"},"vaults":{"name":"vaults","type":"\u0019\u001bazure.subscription.keyvaultService.vault","title":"List of Azure key vaults"}},"title":"Azure Key Vault","private":true},"azurerm.keyvault.certificate":{"id":"azure.subscription.keyvaultService.certificate","name":"azure.subscription.keyvaultService.certificate","fields":{"certName":{"name":"certName","type":"\u0007","title":"Certificate name"},"created":{"name":"created","type":"\t","is_mandatory":true,"title":"Certificate creation time"},"enabled":{"name":"enabled","type":"\u0004","is_mandatory":true,"title":"Whether certificate is enabled"},"expires":{"name":"expires","type":"\t","is_mandatory":true,"title":"Certificate expiration date"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Certificate ID"},"notBefore":{"name":"notBefore","type":"\t","is_mandatory":true,"title":"Certificate not before date"},"recoveryLevel":{"name":"recoveryLevel","type":"\u0007","is_mandatory":true,"title":"Certificate recovery level"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Certificate tags"},"updated":{"name":"updated","type":"\t","is_mandatory":true,"title":"Certificate last update time"},"version":{"name":"version","type":"\u0007","title":"Certificate version"},"versions":{"name":"versions","type":"\u0019\u001bazure.subscription.keyvaultService.certificate","title":"List of certificate versions"},"x5t":{"name":"x5t","type":"\u0007","is_mandatory":true,"title":"Certificate x5t"}},"title":"Azure Key Vault Certificate","private":true,"defaults":"id certName"},"azurerm.keyvault.key":{"id":"azure.subscription.keyvaultService.key","name":"azure.subscription.keyvaultService.key","fields":{"created":{"name":"created","type":"\t","is_mandatory":true,"title":"Key creation time"},"enabled":{"name":"enabled","type":"\u0004","is_mandatory":true,"title":"Whether key is enabled"},"expires":{"name":"expires","type":"\t","is_mandatory":true,"title":"Key expiration date"},"keyName":{"name":"keyName","type":"\u0007","title":"Key name"},"kid":{"name":"kid","type":"\u0007","is_mandatory":true,"title":"Key ID"},"managed":{"name":"managed","type":"\u0004","is_mandatory":true,"title":"Whether key is managed"},"notBefore":{"name":"notBefore","type":"\t","is_mandatory":true,"title":"Key not before date"},"recoveryLevel":{"name":"recoveryLevel","type":"\u0007","is_mandatory":true,"title":"Key recovery level"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Key tags"},"updated":{"name":"updated","type":"\t","is_mandatory":true,"title":"Key last update time"},"version":{"name":"version","type":"\u0007","title":"Key version"},"versions":{"name":"versions","type":"\u0019\u001bazure.subscription.keyvaultService.key","title":"List of key versions"}},"title":"Azure Key Vault Key","private":true,"defaults":"kid keyName"},"azurerm.keyvault.secret":{"id":"azure.subscription.keyvaultService.secret","name":"azure.subscription.keyvaultService.secret","fields":{"contentType":{"name":"contentType","type":"\u0007","is_mandatory":true,"title":"Secret content type"},"created":{"name":"created","type":"\t","is_mandatory":true,"title":"Secret creation date"},"enabled":{"name":"enabled","type":"\u0004","is_mandatory":true,"title":"Whether secret is enabled"},"expires":{"name":"expires","type":"\t","is_mandatory":true,"title":"Secret expiration date"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Secret ID"},"managed":{"name":"managed","type":"\u0004","is_mandatory":true,"title":"Whether secret is managed"},"notBefore":{"name":"notBefore","type":"\t","is_mandatory":true,"title":"Secret notBefore date"},"secretName":{"name":"secretName","type":"\u0007","title":"Secret name"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Secret tags"},"updated":{"name":"updated","type":"\t","is_mandatory":true,"title":"Secret last updated date"},"version":{"name":"version","type":"\u0007","title":"Secret version"},"versions":{"name":"versions","type":"\u0019\u001bazure.subscription.keyvaultService.secret","title":"List of secret versions"}},"title":"Azure Key Vault Secret","private":true,"defaults":"id secretName"},"azurerm.keyvault.vault":{"id":"azure.subscription.keyvaultService.vault","name":"azure.subscription.keyvaultService.vault","fields":{"certificates":{"name":"certificates","type":"\u0019\u001bazure.subscription.keyvaultService.certificate","title":"Key Vault certificates"},"diagnosticSettings":{"name":"diagnosticSettings","type":"\u0019\u001bazure.subscription.monitorService.diagnosticsetting","title":"Key Vault diagnostic settings"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Key Vault ID"},"keys":{"name":"keys","type":"\u0019\u001bazure.subscription.keyvaultService.key","title":"Key Vault keys"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Key Vault location"},"properties":{"name":"properties","type":"\n","title":"Key Vault properties"},"secrets":{"name":"secrets","type":"\u0019\u001bazure.subscription.keyvaultService.secret","title":"Key Vault secrets"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Key Vault tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Key Vault type"},"vaultName":{"name":"vaultName","type":"\u0007","is_mandatory":true,"title":"Key Vault name"},"vaultUri":{"name":"vaultUri","type":"\u0007","title":"Key Vault URL"}},"title":"Azure Key Vault Vault","private":true,"defaults":"id vaultName location"},"azurerm.mariadb":{"id":"azure.subscription.mariadbService","name":"azure.subscription.mariadbService","fields":{"servers":{"name":"servers","type":"\u0019\u001bazure.subscription.mariadbService.server","title":"List of MariaDB servers"},"subscriptionId":{"name":"subscriptionId","type":"\u0007","is_mandatory":true,"title":"The subscription identifier"}},"title":"Azure Database for MariaDB","private":true},"azurerm.mariadb.database":{"id":"azure.subscription.mariadbService.database","name":"azure.subscription.mariadbService.database","fields":{"charset":{"name":"charset","type":"\u0007","is_mandatory":true,"title":"MariaDB database charset"},"collation":{"name":"collation","type":"\u0007","is_mandatory":true,"title":"MariaDB database collation"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"MariaDB database ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"MariaDB database name"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"MariaDB database type"}},"title":"Azure Database for MariaDB Database","private":true,"defaults":"id name"},"azurerm.mariadb.server":{"id":"azure.subscription.mariadbService.server","name":"azure.subscription.mariadbService.server","fields":{"configuration":{"name":"configuration","type":"\u0019\u001bazure.subscription.sqlService.configuration","title":"MariaDB server configuration"},"databases":{"name":"databases","type":"\u0019\u001bazure.subscription.mariadbService.database","title":"MariaDB server databases"},"firewallRules":{"name":"firewallRules","type":"\u0019\u001bazure.subscription.sqlService.firewallrule","title":"MariaDB server firewall rules"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"MariaDB server ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"MariaDB server location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"MariaDB server name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"MariaDB server properties"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"MariaDB server tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"MariaDB server type"}},"title":"Azure Database for MariaDB Server","private":true,"defaults":"id name location"},"azurerm.monitor":{"id":"azure.subscription.monitorService","name":"azure.subscription.monitorService","fields":{"activityLog":{"name":"activityLog","type":"\u001bazure.subscription.monitorService.activitylog","title":"Activity log for the monitor"},"diagnosticSettings":{"name":"diagnosticSettings","type":"\u0019\u001bazure.subscription.monitorService.diagnosticsetting","title":"List of diagnostic settings for the subscription"},"logProfiles":{"name":"logProfiles","type":"\u0019\u001bazure.subscription.monitorService.logprofile","title":"List of log profiles"},"subscriptionId":{"name":"subscriptionId","type":"\u0007","is_mandatory":true,"title":"The subscription identifier"}},"title":"Azure Monitor","private":true},"azurerm.monitor.diagnosticsetting":{"id":"azure.subscription.monitorService.diagnosticsetting","name":"azure.subscription.monitorService.diagnosticsetting","fields":{"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Diagnostic setting ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Diagnostic setting name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Diagnostic setting properties"},"storageAccount":{"name":"storageAccount","type":"\u001bazure.subscription.storageService.account","is_mandatory":true,"title":"Diagnostic setting storage account"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Diagnostic setting type"}},"title":"Azure Monitor Diagnostic Setting","private":true,"defaults":"id name"},"azurerm.monitor.logprofile":{"id":"azure.subscription.monitorService.logprofile","name":"azure.subscription.monitorService.logprofile","fields":{"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Log profile ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Log profile location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Log profile name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Log profile properties"},"storageAccount":{"name":"storageAccount","type":"\u001bazure.subscription.storageService.account","is_mandatory":true,"title":"Log profile storage account"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Log profile tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Log profile type"}},"title":"Azure Monitor Log Profile","private":true,"defaults":"id name location"},"azurerm.mysql":{"id":"azure.subscription.mysqlService","name":"azure.subscription.mysqlService","fields":{"flexibleServers":{"name":"flexibleServers","type":"\u0019\u001bazure.subscription.mysqlService.flexibleServer","title":"List of Flexible MySQL servers"},"servers":{"name":"servers","type":"\u0019\u001bazure.subscription.mysqlService.server","title":"List of MySQL servers"},"subscriptionId":{"name":"subscriptionId","type":"\u0007","is_mandatory":true,"title":"The subscription identifier"}},"title":"Azure Database for MySQL","private":true},"azurerm.mysql.database":{"id":"azure.subscription.mysqlService.database","name":"azure.subscription.mysqlService.database","fields":{"charset":{"name":"charset","type":"\u0007","is_mandatory":true,"title":"MySQL database charset"},"collation":{"name":"collation","type":"\u0007","is_mandatory":true,"title":"MySQL database collation"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"MySQL database ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"MySQL database name"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"MySQL database type"}},"title":"Azure Database for MySQL Database","private":true,"defaults":"id name"},"azurerm.mysql.server":{"id":"azure.subscription.mysqlService.server","name":"azure.subscription.mysqlService.server","fields":{"configuration":{"name":"configuration","type":"\u0019\u001bazure.subscription.sqlService.configuration","title":"MySQL server configuration"},"databases":{"name":"databases","type":"\u0019\u001bazure.subscription.mysqlService.database","title":"MySQL server databases"},"firewallRules":{"name":"firewallRules","type":"\u0019\u001bazure.subscription.sqlService.firewallrule","title":"MySQL server firewall rules"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"MySQL server ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"MySQL server location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"MySQL server name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"MySQL server properties"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"MySQL server tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"MySQL server type"}},"title":"Azure Database for MySQL Server","private":true,"defaults":"id name location"},"azurerm.network":{"id":"azure.subscription.networkService","name":"azure.subscription.networkService","fields":{"interfaces":{"name":"interfaces","type":"\u0019\u001bazure.subscription.networkService.interface","title":"List of network interfaces"},"securityGroups":{"name":"securityGroups","type":"\u0019\u001bazure.subscription.networkService.securityGroup","title":"List of network security groups"},"subscriptionId":{"name":"subscriptionId","type":"\u0007","is_mandatory":true,"title":"The subscription identifier"},"watchers":{"name":"watchers","type":"\u0019\u001bazure.subscription.networkService.watcher","title":"List of network watchers"}},"title":"Azure Network","private":true},"azurerm.network.interface":{"id":"azure.subscription.networkService.interface","name":"azure.subscription.networkService.interface","fields":{"etag":{"name":"etag","type":"\u0007","is_mandatory":true,"title":"Network interface etag"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Network interface ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Network interface name"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Network interface name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Network interface properties"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Network interface tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Network interface type"},"vm":{"name":"vm","type":"\u001bazure.subscription.computeService.vm","title":"Network interface compute vm"}},"title":"Azure Network Interface","private":true,"defaults":"id name location"},"azurerm.network.securitygroup":{"id":"azure.subscription.networkService.securityGroup","name":"azure.subscription.networkService.securityGroup","fields":{"defaultSecurityRules":{"name":"defaultSecurityRules","type":"\u0019\u001bazure.subscription.networkService.securityrule","is_mandatory":true,"title":"Security group default security rules"},"etag":{"name":"etag","type":"\u0007","is_mandatory":true,"title":"Security group etag"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Security group ID"},"interfaces":{"name":"interfaces","type":"\u0019\u001bazure.subscription.networkService.interface","is_mandatory":true,"title":"Security group interfaces"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Security group location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Security group name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Security group properties"},"securityRules":{"name":"securityRules","type":"\u0019\u001bazure.subscription.networkService.securityrule","is_mandatory":true,"title":"Security group rules"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Security group tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Security group type"}},"title":"Azure Network Security Group","private":true,"defaults":"id name location"},"azurerm.network.securityrule":{"id":"azure.subscription.networkService.securityrule","name":"azure.subscription.networkService.securityrule","fields":{"destinationPortRange":{"name":"destinationPortRange","type":"\u0019\n","is_mandatory":true,"title":"Security rule destination port range"},"etag":{"name":"etag","type":"\u0007","is_mandatory":true,"title":"Security rule etag"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Security rule ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Security rule name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Security rule properties"}},"title":"Azure Network Security Rule","private":true,"defaults":"id name"},"azurerm.network.watcher":{"id":"azure.subscription.networkService.watcher","name":"azure.subscription.networkService.watcher","fields":{"etag":{"name":"etag","type":"\u0007","is_mandatory":true,"title":"Network watcher etag"},"flowLogs":{"name":"flowLogs","type":"\u0019\u001bazure.subscription.networkService.watcher.flowlog","title":"Network watcher flow logs"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Network watcher ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Network watcher location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Network watcher name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Network watcher properties"},"provisioningState":{"name":"provisioningState","type":"\u0007","is_mandatory":true,"title":"Network watcher provisioning state"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Network watcher tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Network watcher type"}},"title":"Azure Network Watcher","private":true,"defaults":"name location"},"azurerm.postgresql":{"id":"azure.subscription.postgresqlService","name":"azure.subscription.postgresqlService","fields":{"servers":{"name":"servers","type":"\u0019\u001bazure.subscription.postgresqlService.server","title":"List of PostgreSQL servers"},"subscriptionId":{"name":"subscriptionId","type":"\u0007","is_mandatory":true,"title":"The subscription identifier"}},"title":"Azure Database for PostgreSQL","private":true},"azurerm.postgresql.database":{"id":"azure.subscription.postgresqlService.database","name":"azure.subscription.postgresqlService.database","fields":{"charset":{"name":"charset","type":"\u0007","is_mandatory":true,"title":"PostgreSQL database charset"},"collation":{"name":"collation","type":"\u0007","is_mandatory":true,"title":"PostgreSQL database collation"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"PostgreSQL database ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"PostgreSQL database name"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"PostgreSQL database type"}},"title":"Azure Database for PostgreSQL Database","private":true,"defaults":"id name"},"azurerm.postgresql.server":{"id":"azure.subscription.postgresqlService.server","name":"azure.subscription.postgresqlService.server","fields":{"configuration":{"name":"configuration","type":"\u0019\u001bazure.subscription.sqlService.configuration","title":"PostgreSQL server configuration"},"databases":{"name":"databases","type":"\u0019\u001bazure.subscription.postgresqlService.database","title":"PostgreSQL server databases"},"firewallRules":{"name":"firewallRules","type":"\u0019\u001bazure.subscription.sqlService.firewallrule","title":"PostgreSQL server firewall rules"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"PostgreSQL server ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"PostgreSQL server location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"PostgreSQL server name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"PostgreSQL server properties"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"PostgreSQL server tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"PostgreSQL server type"}},"title":"Azure Database for PostgreSQL Server","private":true,"defaults":"id name location"},"azurerm.resource":{"id":"azure.subscription.resource","name":"azure.subscription.resource","fields":{"changedTime":{"name":"changedTime","type":"\t","is_mandatory":true,"title":"Resource change time"},"createdTime":{"name":"createdTime","type":"\t","is_mandatory":true,"title":"Resource create time"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Resource ID"},"identity":{"name":"identity","type":"\n","is_mandatory":true,"title":"Resource identity"},"kind":{"name":"kind","type":"\u0007","is_mandatory":true,"title":"Resource kind"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Resource location"},"managedBy":{"name":"managedBy","type":"\u0007","is_mandatory":true,"title":"Resource managed by"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Resource name"},"plan":{"name":"plan","type":"\n","is_mandatory":true,"title":"Resource plan"},"provisioningState":{"name":"provisioningState","type":"\u0007","is_mandatory":true,"title":"Resource provisioning state"},"sku":{"name":"sku","type":"\n","is_mandatory":true,"title":"Resource SKU"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Resource tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Resource type"}},"title":"Azure Resource","private":true,"defaults":"id name location"},"azurerm.sql":{"id":"azure.subscription.sqlService","name":"azure.subscription.sqlService","fields":{"servers":{"name":"servers","type":"\u0019\u001bazure.subscription.sqlService.server","title":"List of SQL servers"},"subscriptionId":{"name":"subscriptionId","type":"\u0007","is_mandatory":true,"title":"The subscription identifier"}},"title":"Azure SQL","private":true},"azurerm.sql.configuration":{"id":"azure.subscription.sqlService.configuration","name":"azure.subscription.sqlService.configuration","fields":{"allowedValues":{"name":"allowedValues","type":"\u0007","is_mandatory":true,"title":"SQL configuration allowed values"},"dataType":{"name":"dataType","type":"\u0007","is_mandatory":true,"title":"SQL configuration data type"},"defaultValue":{"name":"defaultValue","type":"\u0007","is_mandatory":true,"title":"SQL configuration default value"},"description":{"name":"description","type":"\u0007","is_mandatory":true,"title":"SQL configuration description"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"SQL configuration ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"SQL configuration name"},"source":{"name":"source","type":"\u0007","is_mandatory":true,"title":"SQL configuration source"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"SQL configuration type"},"value":{"name":"value","type":"\u0007","is_mandatory":true,"title":"SQL configuration value"}},"title":"Azure SQL Configuration","private":true,"defaults":"id name"},"azurerm.sql.database":{"id":"azure.subscription.sqlService.database","name":"azure.subscription.sqlService.database","fields":{"advisor":{"name":"advisor","type":"\u0019\n","title":"SQL database advisor"},"auditingPolicy":{"name":"auditingPolicy","type":"\n","title":"SQL database auditing policy"},"collation":{"name":"collation","type":"\u0007","is_mandatory":true,"title":"SQL database collation"},"connectionPolicy":{"name":"connectionPolicy","type":"\n","title":"SQL database connection policy"},"containmentState":{"name":"containmentState","type":"\u0005","title":"Deprecated"},"createMode":{"name":"createMode","type":"\u0007","is_mandatory":true,"title":"SQL database create mode"},"creationDate":{"name":"creationDate","type":"\t","is_mandatory":true,"title":"SQL database create date"},"currentServiceObjectiveId":{"name":"currentServiceObjectiveId","type":"\u0007","title":"Deprecated. Use `serviceLevelObjective` instead."},"databaseId":{"name":"databaseId","type":"\u0007","is_mandatory":true,"title":"Database ID"},"defaultSecondaryLocation":{"name":"defaultSecondaryLocation","type":"\u0007","is_mandatory":true,"title":"SQL database default secondary location"},"earliestRestoreDate":{"name":"earliestRestoreDate","type":"\t","is_mandatory":true,"title":"SQL database earliest restore date"},"edition":{"name":"edition","type":"\u0007","is_mandatory":true,"title":"SQL database edition"},"elasticPoolName":{"name":"elasticPoolName","type":"\u0007","is_mandatory":true,"title":"SQL database elastic pool name"},"failoverGroupId":{"name":"failoverGroupId","type":"\u0007","is_mandatory":true,"title":"SQL database failover group ID"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"SQL database ID"},"maxSizeBytes":{"name":"maxSizeBytes","type":"\u0005","is_mandatory":true,"title":"SQL database max byte size"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"SQL database name"},"readScale":{"name":"readScale","type":"\u0007","is_mandatory":true,"title":"SQL database read scale"},"recommendedIndex":{"name":"recommendedIndex","type":"\n","title":"Deprecated. Use `advisor.recommendedActions` instead."},"recoveryServicesRecoveryPointResourceId":{"name":"recoveryServicesRecoveryPointResourceId","type":"\u0007","is_mandatory":true,"title":"SQL database recovery services recovery point ID"},"requestedServiceObjectiveId":{"name":"requestedServiceObjectiveId","type":"\u0007","title":"Deprecated. Use `requestedServiceObjectiveName` instead."},"requestedServiceObjectiveName":{"name":"requestedServiceObjectiveName","type":"\u0007","is_mandatory":true,"title":"SQL database requested objective name"},"restorePointInTime":{"name":"restorePointInTime","type":"\t","is_mandatory":true,"title":"SQL database restore point"},"sampleName":{"name":"sampleName","type":"\u0007","is_mandatory":true,"title":"SQL database sample name"},"serviceLevelObjective":{"name":"serviceLevelObjective","type":"\u0007","is_mandatory":true,"title":"SQL database service level objective"},"serviceTierAdvisors":{"name":"serviceTierAdvisors","type":"\n","title":"Deprecated"},"sourceDatabaseDeletionDate":{"name":"sourceDatabaseDeletionDate","type":"\t","is_mandatory":true,"title":"SQL database deletion date"},"sourceDatabaseId":{"name":"sourceDatabaseId","type":"\u0007","is_mandatory":true,"title":"SQL database source database ID"},"status":{"name":"status","type":"\u0007","is_mandatory":true,"title":"SQL database status"},"threatDetectionPolicy":{"name":"threatDetectionPolicy","type":"\n","title":"SQL database threat detection policy"},"transparentDataEncryption":{"name":"transparentDataEncryption","type":"\n","title":"SQL database transparent data encryption"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"SQL database type"},"usage":{"name":"usage","type":"\u0019\u001bazure.subscription.sqlService.databaseusage","title":"SQL database usage"},"zoneRedundant":{"name":"zoneRedundant","type":"\u0004","is_mandatory":true,"title":"Whether SQL server is zone redundant"}},"title":"Azure SQL Server Database","private":true,"defaults":"id name"},"azurerm.sql.databaseusage":{"id":"azure.subscription.sqlService.databaseusage","name":"azure.subscription.sqlService.databaseusage","fields":{"currentValue":{"name":"currentValue","type":"\u0006","is_mandatory":true,"title":"Database usage current value"},"displayName":{"name":"displayName","type":"\u0007","is_mandatory":true,"title":"Database usage display name"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Database usage ID"},"limit":{"name":"limit","type":"\u0006","is_mandatory":true,"title":"Database usage limit"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Database usage name"},"nextResetTime":{"name":"nextResetTime","type":"\t","title":"Deprecated"},"resourceName":{"name":"resourceName","type":"\u0007","is_mandatory":true,"title":"Database usage resource name"},"unit":{"name":"unit","type":"\u0007","is_mandatory":true,"title":"Database usage unit"}},"title":"Azure SQL Database Usage","private":true,"defaults":"id name"},"azurerm.sql.firewallrule":{"id":"azure.subscription.sqlService.firewallrule","name":"azure.subscription.sqlService.firewallrule","fields":{"endIpAddress":{"name":"endIpAddress","type":"\u0007","is_mandatory":true,"title":"SQL firewall rule end IP address"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"SQL firewall rule ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"SQL firewall rule name"},"startIpAddress":{"name":"startIpAddress","type":"\u0007","is_mandatory":true,"title":"SQL firewall rule start IP address"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"SQL firewall rule type"}},"title":"Azure SQL Firewall Rule","private":true,"defaults":"id name"},"azurerm.sql.server":{"id":"azure.subscription.sqlService.server","name":"azure.subscription.sqlService.server","fields":{"auditingPolicy":{"name":"auditingPolicy","type":"\n","title":"SQL server auditing policy"},"azureAdAdministrators":{"name":"azureAdAdministrators","type":"\u0019\u001bazure.subscription.sqlService.server.administrator","title":"SQL server AD administrators"},"connectionPolicy":{"name":"connectionPolicy","type":"\n","title":"SQL server connection policy"},"databases":{"name":"databases","type":"\u0019\u001bazure.subscription.sqlService.database","title":"SQL server databases"},"encryptionProtector":{"name":"encryptionProtector","type":"\n","title":"SQL server encryption protector"},"firewallRules":{"name":"firewallRules","type":"\u0019\u001bazure.subscription.sqlService.firewallrule","title":"SQL server firewall rules"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"SQL server ID"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"SQL server location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"SQL server name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"SQL server properties"},"securityAlertPolicy":{"name":"securityAlertPolicy","type":"\n","title":"SQL server security alert policy"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"SQL server tags"},"threatDetectionPolicy":{"name":"threatDetectionPolicy","type":"\n","title":"SQL server threat detection policy"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"SQL server type"},"vulnerabilityAssessmentSettings":{"name":"vulnerabilityAssessmentSettings","type":"\u001bazure.subscription.sqlService.server.vulnerabilityassessmentsettings","title":"SQL server vulnerability assessment settings"}},"title":"Azure SQL Server","private":true,"defaults":"name location"},"azurerm.sql.server.administrator":{"id":"azure.subscription.sqlService.server.administrator","name":"azure.subscription.sqlService.server.administrator","fields":{"administratorType":{"name":"administratorType","type":"\u0007","is_mandatory":true,"title":"SQL administrator type"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"SQL administrator ID"},"login":{"name":"login","type":"\u0007","is_mandatory":true,"title":"SQL administrator login"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"SQL administrator name"},"sid":{"name":"sid","type":"\u0007","is_mandatory":true,"title":"SQL administrator subscription ID"},"tenantId":{"name":"tenantId","type":"\u0007","is_mandatory":true,"title":"SQL administrator tenant ID"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"SQL administrator type"}},"title":"Azure SQL Server Administrator","private":true,"defaults":"id name"},"azurerm.storage":{"id":"azure.subscription.storageService","name":"azure.subscription.storageService","fields":{"accounts":{"name":"accounts","type":"\u0019\u001bazure.subscription.storageService.account","title":"List of storage accounts"},"subscriptionId":{"name":"subscriptionId","type":"\u0007","is_mandatory":true,"title":"The subscription identifier"}},"title":"Azure Storage","private":true},"azurerm.storage.account":{"id":"azure.subscription.storageService.account","name":"azure.subscription.storageService.account","fields":{"blobProperties":{"name":"blobProperties","type":"\u001bazure.subscription.storageService.account.blobService.properties","title":"Storage account blob properties"},"containers":{"name":"containers","type":"\u0019\u001bazure.subscription.storageService.account.container","title":"Storage account containers"},"dataProtection":{"name":"dataProtection","type":"\u001bazure.subscription.storageService.account.dataProtection","title":"Storage account data protection"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Storage account ID"},"identity":{"name":"identity","type":"\n","is_mandatory":true,"title":"Storage account identity"},"kind":{"name":"kind","type":"\u0007","is_mandatory":true,"title":"Storage account kind"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Storage account location"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Storage account name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Storage account properties"},"queueProperties":{"name":"queueProperties","type":"\u001bazure.subscription.storageService.account.queueService.properties","title":"Storage account queue properties"},"sku":{"name":"sku","type":"\n","is_mandatory":true,"title":"Storage account sku"},"tableProperties":{"name":"tableProperties","type":"\u001bazure.subscription.storageService.account.tableService.properties","title":"Storage account table properties"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Storage account tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Storage account type"}},"title":"Azure Storage Account","private":true,"defaults":"id name location"},"azurerm.storage.container":{"id":"azure.subscription.storageService.account.container","name":"azure.subscription.storageService.account.container","fields":{"etag":{"name":"etag","type":"\u0007","is_mandatory":true,"title":"Storage container etag"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Storage container ID"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Storage container name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Storage container properties"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Storage container type"}},"title":"Azure Storage Container","private":true,"defaults":"id name"},"azurerm.web":{"id":"azure.subscription.webService","name":"azure.subscription.webService","fields":{"apps":{"name":"apps","type":"\u0019\u001bazure.subscription.webService.appsite","title":"List of web apps"},"availableRuntimes":{"name":"availableRuntimes","type":"\u0019\n","title":"Available runtimes"},"subscriptionId":{"name":"subscriptionId","type":"\u0007","is_mandatory":true,"title":"The subscription identifier"}},"title":"Azure Web","private":true},"azurerm.web.appsite":{"id":"azure.subscription.webService.appsite","name":"azure.subscription.webService.appsite","fields":{"applicationSettings":{"name":"applicationSettings","type":"\n","title":"Appsite application settings"},"authenticationSettings":{"name":"authenticationSettings","type":"\u001bazure.subscription.webService.appsiteauthsettings","title":"Appsite authentication settings"},"configuration":{"name":"configuration","type":"\u001bazure.subscription.webService.appsiteconfig","title":"Appsite configuration"},"connectionSettings":{"name":"connectionSettings","type":"\n","title":"Appsite connection settings"},"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Appsite ID"},"identity":{"name":"identity","type":"\n","is_mandatory":true,"title":"Appsite identity"},"kind":{"name":"kind","type":"\u0007","is_mandatory":true,"title":"Appsite kind"},"location":{"name":"location","type":"\u0007","is_mandatory":true,"title":"Appsite location"},"metadata":{"name":"metadata","type":"\n","title":"Appsite metadata"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Appsite name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Appsite properties"},"stack":{"name":"stack","type":"\n","title":"Appsite stack"},"tags":{"name":"tags","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Appsite tags"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Appsite type"}},"title":"Azure Web App Site","private":true,"defaults":"id name location"},"azurerm.web.appsiteauthsettings":{"id":"azure.subscription.webService.appsiteauthsettings","name":"azure.subscription.webService.appsiteauthsettings","fields":{"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Auth settings ID"},"kind":{"name":"kind","type":"\u0007","is_mandatory":true,"title":"Auth settings kind"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Auth settings name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Auth settings properties"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Auth settings type"}},"title":"Azure AppSite Authentication Settings","private":true,"defaults":"id name"},"azurerm.web.appsiteconfig":{"id":"azure.subscription.webService.appsiteconfig","name":"azure.subscription.webService.appsiteconfig","fields":{"id":{"name":"id","type":"\u0007","is_mandatory":true,"title":"Appsite config ID"},"kind":{"name":"kind","type":"\u0007","is_mandatory":true,"title":"Appsite config kind"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Appsite config name"},"properties":{"name":"properties","type":"\n","is_mandatory":true,"title":"Appsite config properties"},"type":{"name":"type","type":"\u0007","is_mandatory":true,"title":"Appsite config type"}},"title":"Azure AppSite Config","private":true,"defaults":"id name"}}} \ No newline at end of file diff --git a/resources/packs/azure/info/azure.lr.manifest.json b/resources/packs/azure/info/azure.lr.manifest.json index 2ce4a709db..c173307e05 100644 --- a/resources/packs/azure/info/azure.lr.manifest.json +++ b/resources/packs/azure/info/azure.lr.manifest.json @@ -1 +1 @@ -{"resources":{"azure":{"platform":{"name":["azure"]},"fields":{"cloudDefender":{},"resourceGroups":{},"resources":{}},"min_mondoo_version":"latest"},"azure.authorization":{"platform":{"name":["azure"]},"fields":{"roleDefinitions":{}},"min_mondoo_version":"latest"},"azure.authorization.roleDefinition":{"platform":{"name":["azure"]},"fields":{"description":{},"id":{},"isCustom":{},"name":{},"permissions":{},"scopes":{}},"min_mondoo_version":"latest"},"azure.authorization.roleDefinition.permission":{"platform":{"name":["azure"]},"fields":{"allowedActions":{},"allowedDataActions":{},"deniedActions":{},"deniedDataActions":{},"id":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.cloudDefender":{"platform":{"name":["azure"]},"fields":{"defenderForContainers":{},"defenderForServers":{},"monitoringAgentAutoProvision":{},"securityContacts":{}},"min_mondoo_version":"latest"},"azure.cloudDefender.securityContact":{"platform":{"name":["azure"]},"fields":{"alertNotifications":{},"emails":{},"id":{},"name":{},"notificationsByRole":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.compute":{"platform":{"name":["azure"]},"fields":{"disks":{},"vms":{}},"min_mondoo_version":"latest"},"azure.compute.disk":{"platform":{"name":["azure"]},"fields":{"id":{},"location":{},"managedBy":{},"managedByExtended":{},"name":{},"properties":{},"sku":{},"tags":{},"type":{},"zones":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.compute.vm":{"platform":{"name":["azure"]},"fields":{"dataDisks":{},"extensions":{},"id":{},"location":{},"name":{},"osDisk":{},"properties":{},"tags":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.keyvault":{"platform":{"name":["azure"]},"fields":{"vaults":{}},"min_mondoo_version":"latest"},"azure.keyvault.certificate":{"platform":{"name":["azure"]},"fields":{"certName":{},"created":{},"enabled":{},"expires":{},"id":{},"notBefore":{},"recoveryLevel":{},"tags":{},"updated":{},"version":{},"versions":{},"x5t":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.keyvault.key":{"platform":{"name":["azure"]},"fields":{"created":{},"enabled":{},"expires":{},"id":{},"keyName":{},"kid":{},"managed":{},"notBefore":{},"recoveryLevel":{},"tags":{},"updated":{},"version":{},"versions":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.keyvault.secret":{"platform":{"name":["azure"]},"fields":{"contentType":{},"created":{},"enabled":{},"expires":{},"id":{},"managed":{},"notBefore":{},"secretName":{},"tags":{},"updated":{},"version":{},"versions":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.keyvault.vault":{"platform":{"name":["azure"]},"fields":{"certificates":{},"diagnosticSettings":{},"id":{},"keys":{},"location":{},"properties":{},"secrets":{},"tags":{},"type":{},"vaultName":{},"vaultUri":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.mariadb":{"platform":{"name":["azure"]},"fields":{"servers":{}},"min_mondoo_version":"latest"},"azure.mariadb.database":{"platform":{"name":["azure"]},"fields":{"charset":{},"collation":{},"id":{},"name":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.mariadb.server":{"platform":{"name":["azure"]},"fields":{"configuration":{},"databases":{},"firewallRules":{},"id":{},"location":{},"name":{},"properties":{},"tags":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.monitor":{"platform":{"name":["azure"]},"fields":{"activityLog":{},"diagnosticSettings":{},"logProfiles":{}},"min_mondoo_version":"latest"},"azure.monitor.activitylog":{"platform":{"name":["azure"]},"fields":{"alerts":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.monitor.activitylog.alert":{"platform":{"name":["azure"]},"fields":{"actions":{},"conditions":{},"description":{},"id":{},"location":{},"name":{},"scopes":{},"tags":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.monitor.diagnosticsetting":{"platform":{"name":["azure"]},"fields":{"id":{},"name":{},"properties":{},"storageAccount":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.monitor.logprofile":{"platform":{"name":["azure"]},"fields":{"id":{},"location":{},"name":{},"properties":{},"storageAccount":{},"tags":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.mysql":{"platform":{"name":["azure"]},"fields":{"flexibleServers":{},"servers":{}},"min_mondoo_version":"latest"},"azure.mysql.database":{"platform":{"name":["azure"]},"fields":{"charset":{},"collation":{},"id":{},"name":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.mysql.flexibleServer":{"platform":{"name":["azure"]},"fields":{"configuration":{},"databases":{},"firewallRules":{},"id":{},"location":{},"name":{},"properties":{},"tags":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.mysql.server":{"platform":{"name":["azure"]},"fields":{"configuration":{},"databases":{},"firewallRules":{},"id":{},"location":{},"name":{},"properties":{},"tags":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.network":{"platform":{"name":["azure"]},"fields":{"interfaces":{},"securityGroups":{},"watchers":{}},"min_mondoo_version":"latest"},"azure.network.interface":{"platform":{"name":["azure"]},"fields":{"etag":{},"id":{},"location":{},"name":{},"properties":{},"tags":{},"type":{},"vm":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.network.securitygroup":{"platform":{"name":["azure"]},"fields":{"defaultSecurityRules":{},"etag":{},"id":{},"interfaces":{},"location":{},"name":{},"properties":{},"securityRules":{},"tags":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.network.securityrule":{"platform":{"name":["azure"]},"fields":{"destinationPortRange":{},"etag":{},"id":{},"name":{},"properties":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.network.watcher":{"platform":{"name":["azure"]},"fields":{"etag":{},"flowLogs":{},"id":{},"location":{},"name":{},"properties":{},"provisioningState":{},"tags":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.network.watcher.flowlog":{"platform":{"name":["azure"]},"fields":{"analytics":{},"enabled":{},"etag":{},"format":{},"id":{},"location":{},"name":{},"provisioningState":{},"retentionPolicy":{},"storageAccountId":{},"tags":{},"targetResourceGuid":{},"targetResourceId":{},"type":{},"version":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.postgresql":{"platform":{"name":["azure"]},"fields":{"servers":{}},"min_mondoo_version":"latest"},"azure.postgresql.database":{"platform":{"name":["azure"]},"fields":{"charset":{},"collation":{},"id":{},"name":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.postgresql.server":{"platform":{"name":["azure"]},"fields":{"configuration":{},"databases":{},"firewallRules":{},"id":{},"location":{},"name":{},"properties":{},"tags":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.resource":{"platform":{"name":["azure"]},"fields":{"changedTime":{},"createdTime":{},"id":{},"identity":{},"kind":{},"location":{},"managedBy":{},"name":{},"plan":{},"provisioningState":{},"sku":{},"tags":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.resourcegroup":{"platform":{"name":["azure"]},"fields":{"id":{},"location":{},"managedBy":{},"name":{},"provisioningState":{},"tags":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.sql":{"platform":{"name":["azure"]},"fields":{"servers":{}},"min_mondoo_version":"latest"},"azure.sql.configuration":{"platform":{"name":["azure"]},"fields":{"allowedValues":{},"dataType":{},"defaultValue":{},"description":{},"id":{},"name":{},"source":{},"type":{},"value":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.sql.database":{"platform":{"name":["azure"]},"fields":{"advisor":{},"auditingPolicy":{},"collation":{},"connectionPolicy":{},"containmentState":{},"createMode":{},"creationDate":{},"currentServiceObjectiveId":{},"databaseId":{},"defaultSecondaryLocation":{},"earliestRestoreDate":{},"edition":{},"elasticPoolName":{},"failoverGroupId":{},"id":{},"maxSizeBytes":{},"name":{},"readScale":{},"recommendedIndex":{},"recoveryServicesRecoveryPointResourceId":{},"requestedServiceObjectiveId":{},"requestedServiceObjectiveName":{},"restorePointInTime":{},"sampleName":{},"serviceLevelObjective":{},"serviceTierAdvisors":{},"sourceDatabaseDeletionDate":{},"sourceDatabaseId":{},"status":{},"threatDetectionPolicy":{},"transparentDataEncryption":{},"type":{},"usage":{},"zoneRedundant":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.sql.databaseusage":{"platform":{"name":["azure"]},"fields":{"currentValue":{},"displayName":{},"id":{},"limit":{},"name":{},"nextResetTime":{},"resourceName":{},"unit":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.sql.firewallrule":{"platform":{"name":["azure"]},"fields":{"endIpAddress":{},"id":{},"name":{},"startIpAddress":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.sql.server":{"platform":{"name":["azure"]},"fields":{"auditingPolicy":{},"azureAdAdministrators":{},"connectionPolicy":{},"databases":{},"encryptionProtector":{},"firewallRules":{},"id":{},"location":{},"name":{},"properties":{},"securityAlertPolicy":{},"tags":{},"threatDetectionPolicy":{},"type":{},"vulnerabilityAssessmentSettings":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.sql.server.administrator":{"platform":{"name":["azure"]},"fields":{"administratorType":{},"id":{},"login":{},"name":{},"sid":{},"tenantId":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.sql.server.vulnerabilityassessmentsettings":{"platform":{"name":["azure"]},"fields":{"id":{},"mailSubscriptionAdmins":{},"name":{},"recurringScanEmails":{},"recurringScanEnabled":{},"storageAccountAccessKey":{},"storageContainerPath":{},"storageContainerSasKey":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.storage":{"platform":{"name":["azure"]},"fields":{"accounts":{}},"min_mondoo_version":"latest"},"azure.storage.account":{"platform":{"name":["azure"]},"fields":{"blobProperties":{},"containers":{},"dataProtection":{},"id":{},"identity":{},"kind":{},"location":{},"name":{},"properties":{},"queueProperties":{},"sku":{},"tableProperties":{},"tags":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.storage.account.blobService.properties":{"platform":{"name":["azure"]},"fields":{"hourMetrics":{},"id":{},"logging":{},"minuteMetrics":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.storage.account.dataProtection":{"platform":{"name":["azure"]},"fields":{"blobRetentionDays":{},"blobSoftDeletionEnabled":{},"containerRetentionDays":{},"containerSoftDeletionEnabled":{},"storageAccountId":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.storage.account.queueService.properties":{"platform":{"name":["azure"]},"fields":{"hourMetrics":{},"id":{},"logging":{},"minuteMetrics":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.storage.account.service.properties.logging":{"platform":{"name":["azure"]},"fields":{"delete":{},"id":{},"read":{},"retentionPolicy":{},"version":{},"write":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.storage.account.service.properties.metrics":{"platform":{"name":["azure"]},"fields":{"enabled":{},"id":{},"includeAPIs":{},"retentionPolicy":{},"version":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.storage.account.service.properties.retentionPolicy":{"platform":{"name":["azure"]},"fields":{"enabled":{},"id":{},"retentionDays":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.storage.account.tableService.properties":{"platform":{"name":["azure"]},"fields":{"hourMetrics":{},"id":{},"logging":{},"minuteMetrics":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.storage.container":{"platform":{"name":["azure"]},"fields":{"etag":{},"id":{},"name":{},"properties":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.web":{"platform":{"name":["azure"]},"fields":{"apps":{},"availableRuntimes":{}},"min_mondoo_version":"latest"},"azure.web.appsite":{"platform":{"name":["azure"]},"fields":{"applicationSettings":{},"authenticationSettings":{},"configuration":{},"connectionSettings":{},"id":{},"identity":{},"kind":{},"location":{},"metadata":{},"name":{},"properties":{},"stack":{},"tags":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.web.appsiteauthsettings":{"platform":{"name":["azure"]},"fields":{"id":{},"kind":{},"name":{},"properties":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.web.appsiteconfig":{"platform":{"name":["azure"]},"fields":{"id":{},"kind":{},"name":{},"properties":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azuread":{"platform":{"name":["azure"]},"fields":{"applications":{},"domains":{},"groups":{},"servicePrincipals":{},"users":{}},"min_mondoo_version":"5.15.0"},"azuread.application":{"platform":{"name":["azure"]},"fields":{"id":{}},"is_private":true,"min_mondoo_version":"5.15.0"},"azuread.domain":{"platform":{"name":["azure"]},"fields":{"authenticationType":{},"isDefault":{},"isVerified":{},"name":{},"properties":{}},"is_private":true,"min_mondoo_version":"5.15.0"},"azuread.group":{"platform":{"name":["azure"]},"fields":{"displayName":{},"id":{},"mail":{},"mailEnabled":{},"mailNickname":{},"members":{},"objectType":{},"properties":{},"securityEnabled":{}},"is_private":true,"min_mondoo_version":"5.15.0"},"azuread.serviceprincipal":{"platform":{"name":["azure"]},"fields":{"id":{}},"is_private":true,"min_mondoo_version":"5.15.0"},"azuread.user":{"platform":{"name":["azure"]},"fields":{"accountEnabled":{},"displayName":{},"givenName":{},"id":{},"mail":{},"mailNickname":{},"objectType":{},"properties":{},"surname":{},"userPrincipalName":{},"userType":{}},"is_private":true,"min_mondoo_version":"5.15.0"},"azurerm":{"platform":{"name":["azure"]},"fields":{"resources":{}},"min_mondoo_version":"5.15.0"},"azurerm.compute":{"platform":{"name":["azure"]},"fields":{"disks":{},"vms":{}},"min_mondoo_version":"5.15.0"},"azurerm.compute.disk":{"platform":{"name":["azure"]},"fields":{"id":{},"location":{},"managedBy":{},"managedByExtended":{},"name":{},"properties":{},"sku":{},"tags":{},"type":{},"zones":{}},"min_mondoo_version":"5.15.0"},"azurerm.compute.vm":{"platform":{"name":["azure"]},"fields":{"dataDisks":{},"extensions":{},"id":{},"location":{},"name":{},"osDisk":{},"properties":{},"tags":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.keyvault":{"platform":{"name":["azure"]},"fields":{"vaults":{}},"min_mondoo_version":"5.15.0"},"azurerm.keyvault.certificate":{"platform":{"name":["azure"]},"fields":{"certName":{},"created":{},"enabled":{},"expires":{},"id":{},"notBefore":{},"recoveryLevel":{},"tags":{},"updated":{},"version":{},"versions":{},"x5t":{}},"min_mondoo_version":"5.15.0"},"azurerm.keyvault.key":{"platform":{"name":["azure"]},"fields":{"created":{},"enabled":{},"expires":{},"keyName":{},"kid":{},"managed":{},"notBefore":{},"recoveryLevel":{},"tags":{},"updated":{},"version":{},"versions":{}},"min_mondoo_version":"5.15.0"},"azurerm.keyvault.secret":{"platform":{"name":["azure"]},"fields":{"contentType":{},"created":{},"enabled":{},"expires":{},"id":{},"managed":{},"notBefore":{},"secretName":{},"tags":{},"updated":{},"version":{},"versions":{}},"min_mondoo_version":"5.15.0"},"azurerm.keyvault.vault":{"platform":{"name":["azure"]},"fields":{"certificates":{},"diagnosticSettings":{},"id":{},"keys":{},"location":{},"properties":{},"secrets":{},"tags":{},"type":{},"vaultName":{},"vaultUri":{}},"min_mondoo_version":"5.15.0"},"azurerm.mariadb":{"platform":{"name":["azure"]},"fields":{"servers":{}},"min_mondoo_version":"5.15.0"},"azurerm.mariadb.database":{"platform":{"name":["azure"]},"fields":{"charset":{},"collation":{},"id":{},"name":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.mariadb.server":{"platform":{"name":["azure"]},"fields":{"configuration":{},"databases":{},"firewallRules":{},"id":{},"location":{},"name":{},"properties":{},"tags":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.monitor":{"platform":{"name":["azure"]},"fields":{"logProfiles":{}},"min_mondoo_version":"5.15.0"},"azurerm.monitor.diagnosticsetting":{"platform":{"name":["azure"]},"fields":{"id":{},"name":{},"properties":{},"storageAccount":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.monitor.logprofile":{"platform":{"name":["azure"]},"fields":{"id":{},"location":{},"name":{},"properties":{},"storageAccount":{},"tags":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.mysql":{"platform":{"name":["azure"]},"fields":{"servers":{}},"min_mondoo_version":"5.15.0"},"azurerm.mysql.database":{"platform":{"name":["azure"]},"fields":{"charset":{},"collation":{},"id":{},"name":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.mysql.server":{"platform":{"name":["azure"]},"fields":{"configuration":{},"databases":{},"firewallRules":{},"id":{},"location":{},"name":{},"properties":{},"tags":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.network":{"platform":{"name":["azure"]},"fields":{"interfaces":{},"securityGroups":{},"watchers":{}},"min_mondoo_version":"5.15.0"},"azurerm.network.interface":{"platform":{"name":["azure"]},"fields":{"etag":{},"id":{},"location":{},"name":{},"properties":{},"tags":{},"type":{},"vm":{}},"min_mondoo_version":"5.15.0"},"azurerm.network.securitygroup":{"platform":{"name":["azure"]},"fields":{"defaultSecurityRules":{},"etag":{},"id":{},"interfaces":{},"location":{},"name":{},"properties":{},"securityRules":{},"tags":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.network.securityrule":{"platform":{"name":["azure"]},"fields":{"destinationPortRange":{},"etag":{},"id":{},"name":{},"properties":{}},"min_mondoo_version":"5.15.0"},"azurerm.network.watcher":{"platform":{"name":["azure"]},"fields":{"etag":{},"id":{},"location":{},"name":{},"properties":{},"tags":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.postgresql":{"platform":{"name":["azure"]},"fields":{"servers":{}},"min_mondoo_version":"5.15.0"},"azurerm.postgresql.database":{"platform":{"name":["azure"]},"fields":{"charset":{},"collation":{},"id":{},"name":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.postgresql.server":{"platform":{"name":["azure"]},"fields":{"configuration":{},"databases":{},"firewallRules":{},"id":{},"location":{},"name":{},"properties":{},"tags":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.resource":{"platform":{"name":["azure"]},"fields":{"changedTime":{},"createdTime":{},"id":{},"identity":{},"kind":{},"location":{},"managedBy":{},"name":{},"plan":{},"provisioningState":{},"sku":{},"tags":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.sql":{"platform":{"name":["azure"]},"fields":{"servers":{}},"min_mondoo_version":"5.15.0"},"azurerm.sql.configuration":{"platform":{"name":["azure"]},"fields":{"allowedValues":{},"dataType":{},"defaultValue":{},"description":{},"id":{},"name":{},"source":{},"type":{},"value":{}},"min_mondoo_version":"5.15.0"},"azurerm.sql.database":{"platform":{"name":["azure"]},"fields":{"advisor":{},"auditingPolicy":{},"collation":{},"connectionPolicy":{},"containmentState":{},"createMode":{},"creationDate":{},"currentServiceObjectiveId":{},"databaseId":{},"defaultSecondaryLocation":{},"earliestRestoreDate":{},"edition":{},"elasticPoolName":{},"failoverGroupId":{},"id":{},"maxSizeBytes":{},"name":{},"readScale":{},"recommendedIndex":{},"recoveryServicesRecoveryPointResourceId":{},"requestedServiceObjectiveId":{},"requestedServiceObjectiveName":{},"restorePointInTime":{},"sampleName":{},"serviceLevelObjective":{},"serviceTierAdvisors":{},"sourceDatabaseDeletionDate":{},"sourceDatabaseId":{},"status":{},"threadDetectionPolicy":{},"transparentDataEncryption":{},"type":{},"usage":{},"zoneRedundant":{}},"min_mondoo_version":"5.15.0"},"azurerm.sql.databaseusage":{"platform":{"name":["azure"]},"fields":{"currentValue":{},"displayName":{},"id":{},"limit":{},"name":{},"nextResetTime":{},"resourceName":{},"unit":{}},"min_mondoo_version":"5.15.0"},"azurerm.sql.firewallrule":{"platform":{"name":["azure"]},"fields":{"endIpAddress":{},"id":{},"name":{},"startIpAddress":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.sql.server":{"platform":{"name":["azure"]},"fields":{"auditingPolicy":{},"azureAdAdministrators":{},"connectionPolicy":{},"databases":{},"encryptionProtector":{},"firewallRules":{},"id":{},"location":{},"name":{},"properties":{},"securityAlertPolicy":{},"tags":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.sql.server.administrator":{"platform":{"name":["azure"]},"fields":{"administratorType":{},"id":{},"login":{},"name":{},"sid":{},"tenantId":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.storage":{"platform":{"name":["azure"]},"fields":{"accounts":{}},"min_mondoo_version":"5.15.0"},"azurerm.storage.account":{"platform":{"name":["azure"]},"fields":{"containers":{},"id":{},"identity":{},"kind":{},"location":{},"name":{},"properties":{},"sku":{},"tags":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.storage.container":{"platform":{"name":["azure"]},"fields":{"etag":{},"id":{},"name":{},"properties":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.web":{"platform":{"name":["azure"]},"fields":{"apps":{},"availableRuntimes":{}},"min_mondoo_version":"5.15.0"},"azurerm.web.appsite":{"platform":{"name":["azure"]},"fields":{"applicationSettings":{},"authenticationSettings":{},"configuration":{},"connectionSettings":{},"id":{},"identity":{},"kind":{},"location":{},"metadata":{},"name":{},"properties":{},"stack":{},"tags":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.web.appsiteauthsettings":{"platform":{"name":["azure"]},"fields":{"id":{},"kind":{},"name":{},"properties":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.web.appsiteconfig":{"platform":{"name":["azure"]},"fields":{"id":{},"kind":{},"name":{},"properties":{},"type":{}},"min_mondoo_version":"5.15.0"}}} \ No newline at end of file +{"resources":{"azure":{"platform":{"name":["azure"]},"fields":{"cloudDefender":{},"resourceGroups":{},"resources":{},"subscription":{}},"min_mondoo_version":"latest"},"azure.authorization":{"platform":{"name":["azure"]},"fields":{"roleDefinitions":{}},"min_mondoo_version":"latest"},"azure.authorization.roleDefinition":{"platform":{"name":["azure"]},"fields":{"description":{},"id":{},"isCustom":{},"name":{},"permissions":{},"scopes":{}},"min_mondoo_version":"latest"},"azure.authorization.roleDefinition.permission":{"platform":{"name":["azure"]},"fields":{"allowedActions":{},"allowedDataActions":{},"deniedActions":{},"deniedDataActions":{},"id":{}},"min_mondoo_version":"latest"},"azure.cloudDefender":{"platform":{"name":["azure"]},"fields":{"defenderForContainers":{},"defenderForServers":{},"monitoringAgentAutoProvision":{},"securityContacts":{}},"min_mondoo_version":"latest"},"azure.cloudDefender.securityContact":{"platform":{"name":["azure"]},"fields":{"alertNotifications":{},"emails":{},"id":{},"name":{},"notificationsByRole":{}},"min_mondoo_version":"latest"},"azure.compute":{"platform":{"name":["azure"]},"fields":{"disks":{},"vms":{}},"min_mondoo_version":"latest"},"azure.compute.disk":{"platform":{"name":["azure"]},"fields":{"id":{},"location":{},"managedBy":{},"managedByExtended":{},"name":{},"properties":{},"sku":{},"tags":{},"type":{},"zones":{}},"min_mondoo_version":"latest"},"azure.compute.vm":{"platform":{"name":["azure"]},"fields":{"dataDisks":{},"extensions":{},"id":{},"location":{},"name":{},"osDisk":{},"properties":{},"tags":{},"type":{}},"min_mondoo_version":"latest"},"azure.keyvault":{"platform":{"name":["azure"]},"fields":{"vaults":{}},"min_mondoo_version":"latest"},"azure.keyvault.certificate":{"platform":{"name":["azure"]},"fields":{"certName":{},"created":{},"enabled":{},"expires":{},"id":{},"notBefore":{},"recoveryLevel":{},"tags":{},"updated":{},"version":{},"versions":{},"x5t":{}},"min_mondoo_version":"latest"},"azure.keyvault.key":{"platform":{"name":["azure"]},"fields":{"created":{},"enabled":{},"expires":{},"id":{},"keyName":{},"kid":{},"managed":{},"notBefore":{},"recoveryLevel":{},"tags":{},"updated":{},"version":{},"versions":{}},"min_mondoo_version":"latest"},"azure.keyvault.secret":{"platform":{"name":["azure"]},"fields":{"contentType":{},"created":{},"enabled":{},"expires":{},"id":{},"managed":{},"notBefore":{},"secretName":{},"tags":{},"updated":{},"version":{},"versions":{}},"min_mondoo_version":"latest"},"azure.keyvault.vault":{"platform":{"name":["azure"]},"fields":{"certificates":{},"diagnosticSettings":{},"id":{},"keys":{},"location":{},"properties":{},"secrets":{},"tags":{},"type":{},"vaultName":{},"vaultUri":{}},"min_mondoo_version":"latest"},"azure.mariadb":{"platform":{"name":["azure"]},"fields":{"servers":{}},"min_mondoo_version":"latest"},"azure.mariadb.database":{"platform":{"name":["azure"]},"fields":{"charset":{},"collation":{},"id":{},"name":{},"type":{}},"min_mondoo_version":"latest"},"azure.mariadb.server":{"platform":{"name":["azure"]},"fields":{"configuration":{},"databases":{},"firewallRules":{},"id":{},"location":{},"name":{},"properties":{},"tags":{},"type":{}},"min_mondoo_version":"latest"},"azure.monitor":{"platform":{"name":["azure"]},"fields":{"activityLog":{},"diagnosticSettings":{},"logProfiles":{}},"min_mondoo_version":"latest"},"azure.monitor.activitylog":{"platform":{"name":["azure"]},"fields":{"alerts":{}},"min_mondoo_version":"latest"},"azure.monitor.activitylog.alert":{"platform":{"name":["azure"]},"fields":{"actions":{},"conditions":{},"description":{},"id":{},"location":{},"name":{},"scopes":{},"tags":{},"type":{}},"min_mondoo_version":"latest"},"azure.monitor.diagnosticsetting":{"platform":{"name":["azure"]},"fields":{"id":{},"name":{},"properties":{},"storageAccount":{},"type":{}},"min_mondoo_version":"latest"},"azure.monitor.logprofile":{"platform":{"name":["azure"]},"fields":{"id":{},"location":{},"name":{},"properties":{},"storageAccount":{},"tags":{},"type":{}},"min_mondoo_version":"latest"},"azure.mysql":{"platform":{"name":["azure"]},"fields":{"flexibleServers":{},"servers":{}},"min_mondoo_version":"latest"},"azure.mysql.database":{"platform":{"name":["azure"]},"fields":{"charset":{},"collation":{},"id":{},"name":{},"type":{}},"min_mondoo_version":"latest"},"azure.mysql.flexibleServer":{"platform":{"name":["azure"]},"fields":{"configuration":{},"databases":{},"firewallRules":{},"id":{},"location":{},"name":{},"properties":{},"tags":{},"type":{}},"min_mondoo_version":"latest"},"azure.mysql.server":{"platform":{"name":["azure"]},"fields":{"configuration":{},"databases":{},"firewallRules":{},"id":{},"location":{},"name":{},"properties":{},"tags":{},"type":{}},"min_mondoo_version":"latest"},"azure.network":{"platform":{"name":["azure"]},"fields":{"interfaces":{},"securityGroups":{},"watchers":{}},"min_mondoo_version":"latest"},"azure.network.interface":{"platform":{"name":["azure"]},"fields":{"etag":{},"id":{},"location":{},"name":{},"properties":{},"tags":{},"type":{},"vm":{}},"min_mondoo_version":"latest"},"azure.network.securitygroup":{"platform":{"name":["azure"]},"fields":{"defaultSecurityRules":{},"etag":{},"id":{},"interfaces":{},"location":{},"name":{},"properties":{},"securityRules":{},"tags":{},"type":{}},"min_mondoo_version":"latest"},"azure.network.securityrule":{"platform":{"name":["azure"]},"fields":{"destinationPortRange":{},"etag":{},"id":{},"name":{},"properties":{}},"min_mondoo_version":"latest"},"azure.network.watcher":{"platform":{"name":["azure"]},"fields":{"etag":{},"flowLogs":{},"id":{},"location":{},"name":{},"properties":{},"provisioningState":{},"tags":{},"type":{}},"min_mondoo_version":"latest"},"azure.network.watcher.flowlog":{"platform":{"name":["azure"]},"fields":{"analytics":{},"enabled":{},"etag":{},"format":{},"id":{},"location":{},"name":{},"provisioningState":{},"retentionPolicy":{},"storageAccountId":{},"tags":{},"targetResourceGuid":{},"targetResourceId":{},"type":{},"version":{}},"min_mondoo_version":"latest"},"azure.postgresql":{"platform":{"name":["azure"]},"fields":{"servers":{}},"min_mondoo_version":"latest"},"azure.postgresql.database":{"platform":{"name":["azure"]},"fields":{"charset":{},"collation":{},"id":{},"name":{},"type":{}},"min_mondoo_version":"latest"},"azure.postgresql.server":{"platform":{"name":["azure"]},"fields":{"configuration":{},"databases":{},"firewallRules":{},"id":{},"location":{},"name":{},"properties":{},"tags":{},"type":{}},"min_mondoo_version":"latest"},"azure.resource":{"platform":{"name":["azure"]},"fields":{"changedTime":{},"createdTime":{},"id":{},"identity":{},"kind":{},"location":{},"managedBy":{},"name":{},"plan":{},"provisioningState":{},"sku":{},"tags":{},"type":{}},"min_mondoo_version":"latest"},"azure.resourcegroup":{"platform":{"name":["azure"]},"fields":{"id":{},"location":{},"managedBy":{},"name":{},"provisioningState":{},"tags":{},"type":{}},"min_mondoo_version":"latest"},"azure.sql":{"platform":{"name":["azure"]},"fields":{"servers":{}},"min_mondoo_version":"latest"},"azure.sql.configuration":{"platform":{"name":["azure"]},"fields":{"allowedValues":{},"dataType":{},"defaultValue":{},"description":{},"id":{},"name":{},"source":{},"type":{},"value":{}},"min_mondoo_version":"latest"},"azure.sql.database":{"platform":{"name":["azure"]},"fields":{"advisor":{},"auditingPolicy":{},"collation":{},"connectionPolicy":{},"containmentState":{},"createMode":{},"creationDate":{},"currentServiceObjectiveId":{},"databaseId":{},"defaultSecondaryLocation":{},"earliestRestoreDate":{},"edition":{},"elasticPoolName":{},"failoverGroupId":{},"id":{},"maxSizeBytes":{},"name":{},"readScale":{},"recommendedIndex":{},"recoveryServicesRecoveryPointResourceId":{},"requestedServiceObjectiveId":{},"requestedServiceObjectiveName":{},"restorePointInTime":{},"sampleName":{},"serviceLevelObjective":{},"serviceTierAdvisors":{},"sourceDatabaseDeletionDate":{},"sourceDatabaseId":{},"status":{},"threatDetectionPolicy":{},"transparentDataEncryption":{},"type":{},"usage":{},"zoneRedundant":{}},"min_mondoo_version":"latest"},"azure.sql.databaseusage":{"platform":{"name":["azure"]},"fields":{"currentValue":{},"displayName":{},"id":{},"limit":{},"name":{},"nextResetTime":{},"resourceName":{},"unit":{}},"min_mondoo_version":"latest"},"azure.sql.firewallrule":{"platform":{"name":["azure"]},"fields":{"endIpAddress":{},"id":{},"name":{},"startIpAddress":{},"type":{}},"min_mondoo_version":"latest"},"azure.sql.server":{"platform":{"name":["azure"]},"fields":{"auditingPolicy":{},"azureAdAdministrators":{},"connectionPolicy":{},"databases":{},"encryptionProtector":{},"firewallRules":{},"id":{},"location":{},"name":{},"properties":{},"securityAlertPolicy":{},"tags":{},"threatDetectionPolicy":{},"type":{},"vulnerabilityAssessmentSettings":{}},"min_mondoo_version":"latest"},"azure.sql.server.administrator":{"platform":{"name":["azure"]},"fields":{"administratorType":{},"id":{},"login":{},"name":{},"sid":{},"tenantId":{},"type":{}},"min_mondoo_version":"latest"},"azure.sql.server.vulnerabilityassessmentsettings":{"platform":{"name":["azure"]},"fields":{"id":{},"mailSubscriptionAdmins":{},"name":{},"recurringScanEmails":{},"recurringScanEnabled":{},"storageAccountAccessKey":{},"storageContainerPath":{},"storageContainerSasKey":{},"type":{}},"min_mondoo_version":"latest"},"azure.storage":{"platform":{"name":["azure"]},"fields":{"accounts":{}},"min_mondoo_version":"latest"},"azure.storage.account":{"platform":{"name":["azure"]},"fields":{"blobProperties":{},"containers":{},"dataProtection":{},"id":{},"identity":{},"kind":{},"location":{},"name":{},"properties":{},"queueProperties":{},"sku":{},"tableProperties":{},"tags":{},"type":{}},"min_mondoo_version":"latest"},"azure.storage.account.blobService.properties":{"platform":{"name":["azure"]},"fields":{"hourMetrics":{},"id":{},"logging":{},"minuteMetrics":{}},"min_mondoo_version":"latest"},"azure.storage.account.dataProtection":{"platform":{"name":["azure"]},"fields":{"blobRetentionDays":{},"blobSoftDeletionEnabled":{},"containerRetentionDays":{},"containerSoftDeletionEnabled":{},"storageAccountId":{}},"min_mondoo_version":"latest"},"azure.storage.account.queueService.properties":{"platform":{"name":["azure"]},"fields":{"hourMetrics":{},"id":{},"logging":{},"minuteMetrics":{}},"min_mondoo_version":"latest"},"azure.storage.account.service.properties.logging":{"platform":{"name":["azure"]},"fields":{"delete":{},"id":{},"read":{},"retentionPolicy":{},"version":{},"write":{}},"min_mondoo_version":"latest"},"azure.storage.account.service.properties.metrics":{"platform":{"name":["azure"]},"fields":{"enabled":{},"id":{},"includeAPIs":{},"retentionPolicy":{},"version":{}},"min_mondoo_version":"latest"},"azure.storage.account.service.properties.retentionPolicy":{"platform":{"name":["azure"]},"fields":{"enabled":{},"id":{},"retentionDays":{}},"min_mondoo_version":"latest"},"azure.storage.account.tableService.properties":{"platform":{"name":["azure"]},"fields":{"hourMetrics":{},"id":{},"logging":{},"minuteMetrics":{}},"min_mondoo_version":"latest"},"azure.storage.container":{"platform":{"name":["azure"]},"fields":{"etag":{},"id":{},"name":{},"properties":{},"type":{}},"min_mondoo_version":"latest"},"azure.subscription":{"platform":{"name":["azure"]},"fields":{"authorization":{},"authorizationSource":{},"cloudDefender":{},"compute":{},"id":{},"keyVault":{},"managedByTenants":{},"mariaDb":{},"monitor":{},"mySql":{},"name":{},"network":{},"postgreSql":{},"resourceGroups":{},"resources":{},"sql":{},"state":{},"storage":{},"subscriptionId":{},"subscriptionsPolicies":{},"tags":{},"tenantId":{},"web":{}},"min_mondoo_version":"latest"},"azure.subscription.authorization":{"platform":{"name":["azure"]},"fields":{"roleDefinitions":{}},"min_mondoo_version":"latest"},"azure.subscription.authorization.roleDefinition":{"platform":{"name":["azure"]},"fields":{"description":{},"id":{},"isCustom":{},"name":{},"permissions":{},"scopes":{}},"min_mondoo_version":"latest"},"azure.subscription.authorization.roleDefinition.permission":{"platform":{"name":["azure"]},"fields":{"allowedActions":{},"allowedDataActions":{},"deniedActions":{},"deniedDataActions":{},"id":{}},"min_mondoo_version":"latest"},"azure.subscription.authorizationService":{"platform":{"name":["azure"]},"fields":{"roleDefinitions":{},"subscriptionId":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.authorizationService.roleDefinition":{"platform":{"name":["azure"]},"fields":{"description":{},"id":{},"isCustom":{},"name":{},"permissions":{},"scopes":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.authorizationService.roleDefinition.permission":{"platform":{"name":["azure"]},"fields":{"allowedActions":{},"allowedDataActions":{},"deniedActions":{},"deniedDataActions":{},"id":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.cloudDefender":{"platform":{"name":["azure"]},"fields":{"defenderForContainers":{},"defenderForServers":{},"monitoringAgentAutoProvision":{},"securityContacts":{}},"min_mondoo_version":"latest"},"azure.subscription.cloudDefender.securityContact":{"platform":{"name":["azure"]},"fields":{"alertNotifications":{},"emails":{},"id":{},"name":{},"notificationsByRole":{}},"min_mondoo_version":"latest"},"azure.subscription.cloudDefenderService":{"platform":{"name":["azure"]},"fields":{"defenderForContainers":{},"defenderForServers":{},"monitoringAgentAutoProvision":{},"securityContacts":{},"subscriptionId":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.cloudDefenderService.securityContact":{"platform":{"name":["azure"]},"fields":{"alertNotifications":{},"emails":{},"id":{},"name":{},"notificationsByRole":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.compute":{"platform":{"name":["azure"]},"fields":{"disks":{},"vms":{}},"min_mondoo_version":"latest"},"azure.subscription.compute.disk":{"platform":{"name":["azure"]},"fields":{"id":{},"location":{},"managedBy":{},"managedByExtended":{},"name":{},"properties":{},"sku":{},"tags":{},"type":{},"zones":{}},"min_mondoo_version":"latest"},"azure.subscription.compute.vm":{"platform":{"name":["azure"]},"fields":{"dataDisks":{},"extensions":{},"id":{},"location":{},"name":{},"osDisk":{},"properties":{},"tags":{},"type":{}},"min_mondoo_version":"latest"},"azure.subscription.computeService":{"platform":{"name":["azure"]},"fields":{"disks":{},"subscriptionId":{},"vms":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.computeService.disk":{"platform":{"name":["azure"]},"fields":{"id":{},"location":{},"managedBy":{},"managedByExtended":{},"name":{},"properties":{},"sku":{},"tags":{},"type":{},"zones":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.computeService.vm":{"platform":{"name":["azure"]},"fields":{"dataDisks":{},"extensions":{},"id":{},"location":{},"name":{},"osDisk":{},"properties":{},"tags":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.keyvault":{"platform":{"name":["azure"]},"fields":{"vaults":{}},"min_mondoo_version":"latest"},"azure.subscription.keyvault.certificate":{"platform":{"name":["azure"]},"fields":{"certName":{},"created":{},"enabled":{},"expires":{},"id":{},"notBefore":{},"recoveryLevel":{},"tags":{},"updated":{},"version":{},"versions":{},"x5t":{}},"min_mondoo_version":"latest"},"azure.subscription.keyvault.key":{"platform":{"name":["azure"]},"fields":{"created":{},"enabled":{},"expires":{},"keyName":{},"kid":{},"managed":{},"notBefore":{},"recoveryLevel":{},"tags":{},"updated":{},"version":{},"versions":{}},"min_mondoo_version":"latest"},"azure.subscription.keyvault.secret":{"platform":{"name":["azure"]},"fields":{"contentType":{},"created":{},"enabled":{},"expires":{},"id":{},"managed":{},"notBefore":{},"secretName":{},"tags":{},"updated":{},"version":{},"versions":{}},"min_mondoo_version":"latest"},"azure.subscription.keyvault.vault":{"platform":{"name":["azure"]},"fields":{"certificates":{},"diagnosticSettings":{},"id":{},"keys":{},"location":{},"properties":{},"secrets":{},"tags":{},"type":{},"vaultName":{},"vaultUri":{}},"min_mondoo_version":"latest"},"azure.subscription.keyvaultService":{"platform":{"name":["azure"]},"fields":{"subscriptionId":{},"vaults":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.keyvaultService.certificate":{"platform":{"name":["azure"]},"fields":{"certName":{},"created":{},"enabled":{},"expires":{},"id":{},"notBefore":{},"recoveryLevel":{},"tags":{},"updated":{},"version":{},"versions":{},"x5t":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.keyvaultService.key":{"platform":{"name":["azure"]},"fields":{"created":{},"enabled":{},"expires":{},"keyName":{},"kid":{},"managed":{},"notBefore":{},"recoveryLevel":{},"tags":{},"updated":{},"version":{},"versions":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.keyvaultService.secret":{"platform":{"name":["azure"]},"fields":{"contentType":{},"created":{},"enabled":{},"expires":{},"id":{},"managed":{},"notBefore":{},"secretName":{},"tags":{},"updated":{},"version":{},"versions":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.keyvaultService.vault":{"platform":{"name":["azure"]},"fields":{"certificates":{},"diagnosticSettings":{},"id":{},"keys":{},"location":{},"properties":{},"secrets":{},"tags":{},"type":{},"vaultName":{},"vaultUri":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.mariadb":{"platform":{"name":["azure"]},"fields":{"servers":{}},"min_mondoo_version":"latest"},"azure.subscription.mariadb.database":{"platform":{"name":["azure"]},"fields":{"charset":{},"collation":{},"id":{},"name":{},"type":{}},"min_mondoo_version":"latest"},"azure.subscription.mariadb.server":{"platform":{"name":["azure"]},"fields":{"configuration":{},"databases":{},"firewallRules":{},"id":{},"location":{},"name":{},"properties":{},"tags":{},"type":{}},"min_mondoo_version":"latest"},"azure.subscription.mariadbService":{"platform":{"name":["azure"]},"fields":{"servers":{},"subscriptionId":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.mariadbService.database":{"platform":{"name":["azure"]},"fields":{"charset":{},"collation":{},"id":{},"name":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.mariadbService.server":{"platform":{"name":["azure"]},"fields":{"configuration":{},"databases":{},"firewallRules":{},"id":{},"location":{},"name":{},"properties":{},"tags":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.monitor":{"platform":{"name":["azure"]},"fields":{"activityLog":{},"diagnosticSettings":{},"logProfiles":{}},"min_mondoo_version":"latest"},"azure.subscription.monitor.activitylog":{"platform":{"name":["azure"]},"fields":{"alerts":{}},"min_mondoo_version":"latest"},"azure.subscription.monitor.activitylog.alert":{"platform":{"name":["azure"]},"fields":{"actions":{},"conditions":{},"description":{},"id":{},"location":{},"name":{},"scopes":{},"tags":{},"type":{}},"min_mondoo_version":"latest"},"azure.subscription.monitor.diagnosticsetting":{"platform":{"name":["azure"]},"fields":{"id":{},"name":{},"properties":{},"storageAccount":{},"type":{}},"min_mondoo_version":"latest"},"azure.subscription.monitor.logprofile":{"platform":{"name":["azure"]},"fields":{"id":{},"location":{},"name":{},"properties":{},"storageAccount":{},"tags":{},"type":{}},"min_mondoo_version":"latest"},"azure.subscription.monitorService":{"platform":{"name":["azure"]},"fields":{"activityLog":{},"diagnosticSettings":{},"logProfiles":{},"subscriptionId":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.monitorService.activitylog":{"platform":{"name":["azure"]},"fields":{"alerts":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.monitorService.activitylog.alert":{"platform":{"name":["azure"]},"fields":{"actions":{},"conditions":{},"description":{},"id":{},"location":{},"name":{},"scopes":{},"tags":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.monitorService.diagnosticsetting":{"platform":{"name":["azure"]},"fields":{"id":{},"name":{},"properties":{},"storageAccount":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.monitorService.logprofile":{"platform":{"name":["azure"]},"fields":{"id":{},"location":{},"name":{},"properties":{},"storageAccount":{},"tags":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.mysql":{"platform":{"name":["azure"]},"fields":{"flexibleServers":{},"servers":{}},"min_mondoo_version":"latest"},"azure.subscription.mysql.database":{"platform":{"name":["azure"]},"fields":{"charset":{},"collation":{},"id":{},"name":{},"type":{}},"min_mondoo_version":"latest"},"azure.subscription.mysql.flexibleServer":{"platform":{"name":["azure"]},"fields":{"configuration":{},"databases":{},"firewallRules":{},"id":{},"location":{},"name":{},"properties":{},"tags":{},"type":{}},"min_mondoo_version":"latest"},"azure.subscription.mysql.server":{"platform":{"name":["azure"]},"fields":{"configuration":{},"databases":{},"firewallRules":{},"id":{},"location":{},"name":{},"properties":{},"tags":{},"type":{}},"min_mondoo_version":"latest"},"azure.subscription.mysqlService":{"platform":{"name":["azure"]},"fields":{"flexibleServers":{},"servers":{},"subscriptionId":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.mysqlService.database":{"platform":{"name":["azure"]},"fields":{"charset":{},"collation":{},"id":{},"name":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.mysqlService.flexibleServer":{"platform":{"name":["azure"]},"fields":{"configuration":{},"databases":{},"firewallRules":{},"id":{},"location":{},"name":{},"properties":{},"tags":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.mysqlService.server":{"platform":{"name":["azure"]},"fields":{"configuration":{},"databases":{},"firewallRules":{},"id":{},"location":{},"name":{},"properties":{},"tags":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.network":{"platform":{"name":["azure"]},"fields":{"interfaces":{},"securityGroups":{},"watchers":{}},"min_mondoo_version":"latest"},"azure.subscription.network.interface":{"platform":{"name":["azure"]},"fields":{"etag":{},"id":{},"location":{},"name":{},"properties":{},"tags":{},"type":{},"vm":{}},"min_mondoo_version":"latest"},"azure.subscription.network.securitygroup":{"platform":{"name":["azure"]},"fields":{"defaultSecurityRules":{},"etag":{},"id":{},"interfaces":{},"location":{},"name":{},"properties":{},"securityRules":{},"tags":{},"type":{}},"min_mondoo_version":"latest"},"azure.subscription.network.securityrule":{"platform":{"name":["azure"]},"fields":{"destinationPortRange":{},"etag":{},"id":{},"name":{},"properties":{}},"min_mondoo_version":"latest"},"azure.subscription.network.watcher":{"platform":{"name":["azure"]},"fields":{"etag":{},"flowLogs":{},"id":{},"location":{},"name":{},"properties":{},"provisioningState":{},"tags":{},"type":{}},"min_mondoo_version":"latest"},"azure.subscription.network.watcher.flowlog":{"platform":{"name":["azure"]},"fields":{"analytics":{},"enabled":{},"etag":{},"format":{},"id":{},"location":{},"name":{},"provisioningState":{},"retentionPolicy":{},"storageAccountId":{},"tags":{},"targetResourceGuid":{},"targetResourceId":{},"type":{},"version":{}},"min_mondoo_version":"latest"},"azure.subscription.networkService":{"platform":{"name":["azure"]},"fields":{"interfaces":{},"securityGroups":{},"subscriptionId":{},"watchers":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.networkService.interface":{"platform":{"name":["azure"]},"fields":{"etag":{},"id":{},"location":{},"name":{},"properties":{},"tags":{},"type":{},"vm":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.networkService.securityGroup":{"platform":{"name":["azure"]},"fields":{"defaultSecurityRules":{},"etag":{},"id":{},"interfaces":{},"location":{},"name":{},"properties":{},"securityRules":{},"tags":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.networkService.securitygroup":{"platform":{"name":["azure"]},"fields":{"defaultSecurityRules":{},"etag":{},"id":{},"interfaces":{},"location":{},"name":{},"properties":{},"securityRules":{},"tags":{},"type":{}},"min_mondoo_version":"latest"},"azure.subscription.networkService.securityrule":{"platform":{"name":["azure"]},"fields":{"destinationPortRange":{},"etag":{},"id":{},"name":{},"properties":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.networkService.watcher":{"platform":{"name":["azure"]},"fields":{"etag":{},"flowLogs":{},"id":{},"location":{},"name":{},"properties":{},"provisioningState":{},"tags":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.networkService.watcher.flowlog":{"platform":{"name":["azure"]},"fields":{"analytics":{},"enabled":{},"etag":{},"format":{},"id":{},"location":{},"name":{},"provisioningState":{},"retentionPolicy":{},"storageAccountId":{},"tags":{},"targetResourceGuid":{},"targetResourceId":{},"type":{},"version":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.postgresql":{"platform":{"name":["azure"]},"fields":{"servers":{}},"min_mondoo_version":"latest"},"azure.subscription.postgresql.database":{"platform":{"name":["azure"]},"fields":{"charset":{},"collation":{},"id":{},"name":{},"type":{}},"min_mondoo_version":"latest"},"azure.subscription.postgresql.server":{"platform":{"name":["azure"]},"fields":{"configuration":{},"databases":{},"firewallRules":{},"id":{},"location":{},"name":{},"properties":{},"tags":{},"type":{}},"min_mondoo_version":"latest"},"azure.subscription.postgresqlService":{"platform":{"name":["azure"]},"fields":{"servers":{},"subscriptionId":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.postgresqlService.database":{"platform":{"name":["azure"]},"fields":{"charset":{},"collation":{},"id":{},"name":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.postgresqlService.server":{"platform":{"name":["azure"]},"fields":{"configuration":{},"databases":{},"firewallRules":{},"id":{},"location":{},"name":{},"properties":{},"tags":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.resource":{"platform":{"name":["azure"]},"fields":{"changedTime":{},"createdTime":{},"id":{},"identity":{},"kind":{},"location":{},"managedBy":{},"name":{},"plan":{},"provisioningState":{},"sku":{},"tags":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.resourcegroup":{"platform":{"name":["azure"]},"fields":{"id":{},"location":{},"managedBy":{},"name":{},"provisioningState":{},"tags":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.sql":{"platform":{"name":["azure"]},"fields":{"servers":{}},"min_mondoo_version":"latest"},"azure.subscription.sql.configuration":{"platform":{"name":["azure"]},"fields":{"allowedValues":{},"dataType":{},"defaultValue":{},"description":{},"id":{},"name":{},"source":{},"type":{},"value":{}},"min_mondoo_version":"latest"},"azure.subscription.sql.database":{"platform":{"name":["azure"]},"fields":{"advisor":{},"auditingPolicy":{},"collation":{},"connectionPolicy":{},"containmentState":{},"createMode":{},"creationDate":{},"currentServiceObjectiveId":{},"databaseId":{},"defaultSecondaryLocation":{},"earliestRestoreDate":{},"edition":{},"elasticPoolName":{},"failoverGroupId":{},"id":{},"maxSizeBytes":{},"name":{},"readScale":{},"recommendedIndex":{},"recoveryServicesRecoveryPointResourceId":{},"requestedServiceObjectiveId":{},"requestedServiceObjectiveName":{},"restorePointInTime":{},"sampleName":{},"serviceLevelObjective":{},"serviceTierAdvisors":{},"sourceDatabaseDeletionDate":{},"sourceDatabaseId":{},"status":{},"threatDetectionPolicy":{},"transparentDataEncryption":{},"type":{},"usage":{},"zoneRedundant":{}},"min_mondoo_version":"latest"},"azure.subscription.sql.databaseusage":{"platform":{"name":["azure"]},"fields":{"currentValue":{},"displayName":{},"id":{},"limit":{},"name":{},"nextResetTime":{},"resourceName":{},"unit":{}},"min_mondoo_version":"latest"},"azure.subscription.sql.firewallrule":{"platform":{"name":["azure"]},"fields":{"endIpAddress":{},"id":{},"name":{},"startIpAddress":{},"type":{}},"min_mondoo_version":"latest"},"azure.subscription.sql.server":{"platform":{"name":["azure"]},"fields":{"auditingPolicy":{},"azureAdAdministrators":{},"connectionPolicy":{},"databases":{},"encryptionProtector":{},"firewallRules":{},"id":{},"location":{},"name":{},"properties":{},"securityAlertPolicy":{},"tags":{},"threatDetectionPolicy":{},"type":{},"vulnerabilityAssessmentSettings":{}},"min_mondoo_version":"latest"},"azure.subscription.sql.server.administrator":{"platform":{"name":["azure"]},"fields":{"administratorType":{},"id":{},"login":{},"name":{},"sid":{},"tenantId":{},"type":{}},"min_mondoo_version":"latest"},"azure.subscription.sql.server.vulnerabilityassessmentsettings":{"platform":{"name":["azure"]},"fields":{"id":{},"mailSubscriptionAdmins":{},"name":{},"recurringScanEmails":{},"recurringScanEnabled":{},"storageAccountAccessKey":{},"storageContainerPath":{},"storageContainerSasKey":{},"type":{}},"min_mondoo_version":"latest"},"azure.subscription.sqlService":{"platform":{"name":["azure"]},"fields":{"servers":{},"subscriptionId":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.sqlService.configuration":{"platform":{"name":["azure"]},"fields":{"allowedValues":{},"dataType":{},"defaultValue":{},"description":{},"id":{},"name":{},"source":{},"type":{},"value":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.sqlService.database":{"platform":{"name":["azure"]},"fields":{"advisor":{},"auditingPolicy":{},"collation":{},"connectionPolicy":{},"containmentState":{},"createMode":{},"creationDate":{},"currentServiceObjectiveId":{},"databaseId":{},"defaultSecondaryLocation":{},"earliestRestoreDate":{},"edition":{},"elasticPoolName":{},"failoverGroupId":{},"id":{},"maxSizeBytes":{},"name":{},"readScale":{},"recommendedIndex":{},"recoveryServicesRecoveryPointResourceId":{},"requestedServiceObjectiveId":{},"requestedServiceObjectiveName":{},"restorePointInTime":{},"sampleName":{},"serviceLevelObjective":{},"serviceTierAdvisors":{},"sourceDatabaseDeletionDate":{},"sourceDatabaseId":{},"status":{},"threatDetectionPolicy":{},"transparentDataEncryption":{},"type":{},"usage":{},"zoneRedundant":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.sqlService.databaseusage":{"platform":{"name":["azure"]},"fields":{"currentValue":{},"displayName":{},"id":{},"limit":{},"name":{},"nextResetTime":{},"resourceName":{},"unit":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.sqlService.firewallrule":{"platform":{"name":["azure"]},"fields":{"endIpAddress":{},"id":{},"name":{},"startIpAddress":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.sqlService.server":{"platform":{"name":["azure"]},"fields":{"auditingPolicy":{},"azureAdAdministrators":{},"connectionPolicy":{},"databases":{},"encryptionProtector":{},"firewallRules":{},"id":{},"location":{},"name":{},"properties":{},"securityAlertPolicy":{},"tags":{},"threatDetectionPolicy":{},"type":{},"vulnerabilityAssessmentSettings":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.sqlService.server.administrator":{"platform":{"name":["azure"]},"fields":{"administratorType":{},"id":{},"login":{},"name":{},"sid":{},"tenantId":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.sqlService.server.vulnerabilityassessmentsettings":{"platform":{"name":["azure"]},"fields":{"id":{},"mailSubscriptionAdmins":{},"name":{},"recurringScanEmails":{},"recurringScanEnabled":{},"storageAccountAccessKey":{},"storageContainerPath":{},"storageContainerSasKey":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.storage":{"platform":{"name":["azure"]},"fields":{"accounts":{}},"min_mondoo_version":"latest"},"azure.subscription.storage.account":{"platform":{"name":["azure"]},"fields":{"blobProperties":{},"containers":{},"dataProtection":{},"id":{},"identity":{},"kind":{},"location":{},"name":{},"properties":{},"queueProperties":{},"sku":{},"tableProperties":{},"tags":{},"type":{}},"min_mondoo_version":"latest"},"azure.subscription.storage.account.blobService.properties":{"platform":{"name":["azure"]},"fields":{"hourMetrics":{},"id":{},"logging":{},"minuteMetrics":{}},"min_mondoo_version":"latest"},"azure.subscription.storage.account.dataProtection":{"platform":{"name":["azure"]},"fields":{"blobRetentionDays":{},"blobSoftDeletionEnabled":{},"containerRetentionDays":{},"containerSoftDeletionEnabled":{},"storageAccountId":{}},"min_mondoo_version":"latest"},"azure.subscription.storage.account.queueService.properties":{"platform":{"name":["azure"]},"fields":{"hourMetrics":{},"id":{},"logging":{},"minuteMetrics":{}},"min_mondoo_version":"latest"},"azure.subscription.storage.account.service.properties.logging":{"platform":{"name":["azure"]},"fields":{"delete":{},"id":{},"read":{},"retentionPolicy":{},"version":{},"write":{}},"min_mondoo_version":"latest"},"azure.subscription.storage.account.service.properties.metrics":{"platform":{"name":["azure"]},"fields":{"enabled":{},"id":{},"includeAPIs":{},"retentionPolicy":{},"version":{}},"min_mondoo_version":"latest"},"azure.subscription.storage.account.service.properties.retentionPolicy":{"platform":{"name":["azure"]},"fields":{"enabled":{},"id":{},"retentionDays":{}},"min_mondoo_version":"latest"},"azure.subscription.storage.account.tableService.properties":{"platform":{"name":["azure"]},"fields":{"hourMetrics":{},"id":{},"logging":{},"minuteMetrics":{}},"min_mondoo_version":"latest"},"azure.subscription.storage.container":{"platform":{"name":["azure"]},"fields":{"etag":{},"id":{},"name":{},"properties":{},"type":{}},"min_mondoo_version":"latest"},"azure.subscription.storageService":{"platform":{"name":["azure"]},"fields":{"accounts":{},"subscriptionId":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.storageService.account":{"platform":{"name":["azure"]},"fields":{"blobProperties":{},"containers":{},"dataProtection":{},"id":{},"identity":{},"kind":{},"location":{},"name":{},"properties":{},"queueProperties":{},"sku":{},"tableProperties":{},"tags":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.storageService.account.blobService.properties":{"platform":{"name":["azure"]},"fields":{"hourMetrics":{},"id":{},"logging":{},"minuteMetrics":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.storageService.account.container":{"platform":{"name":["azure"]},"fields":{"etag":{},"id":{},"name":{},"properties":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.storageService.account.dataProtection":{"platform":{"name":["azure"]},"fields":{"blobRetentionDays":{},"blobSoftDeletionEnabled":{},"containerRetentionDays":{},"containerSoftDeletionEnabled":{},"storageAccountId":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.storageService.account.queueService.properties":{"platform":{"name":["azure"]},"fields":{"hourMetrics":{},"id":{},"logging":{},"minuteMetrics":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.storageService.account.service.properties.logging":{"platform":{"name":["azure"]},"fields":{"delete":{},"id":{},"read":{},"retentionPolicy":{},"version":{},"write":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.storageService.account.service.properties.metrics":{"platform":{"name":["azure"]},"fields":{"enabled":{},"id":{},"includeAPIs":{},"retentionPolicy":{},"version":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.storageService.account.service.properties.retentionPolicy":{"platform":{"name":["azure"]},"fields":{"enabled":{},"id":{},"retentionDays":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.storageService.account.tableService.properties":{"platform":{"name":["azure"]},"fields":{"hourMetrics":{},"id":{},"logging":{},"minuteMetrics":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.storageService.container":{"platform":{"name":["azure"]},"fields":{"etag":{},"id":{},"name":{},"properties":{},"type":{}},"min_mondoo_version":"latest"},"azure.subscription.web":{"platform":{"name":["azure"]},"fields":{"apps":{},"availableRuntimes":{}},"min_mondoo_version":"latest"},"azure.subscription.web.appsite":{"platform":{"name":["azure"]},"fields":{"applicationSettings":{},"authenticationSettings":{},"configuration":{},"connectionSettings":{},"id":{},"identity":{},"kind":{},"location":{},"metadata":{},"name":{},"properties":{},"stack":{},"tags":{},"type":{}},"min_mondoo_version":"latest"},"azure.subscription.web.appsiteauthsettings":{"platform":{"name":["azure"]},"fields":{"id":{},"kind":{},"name":{},"properties":{},"type":{}},"min_mondoo_version":"latest"},"azure.subscription.web.appsiteconfig":{"platform":{"name":["azure"]},"fields":{"id":{},"kind":{},"name":{},"properties":{},"type":{}},"min_mondoo_version":"latest"},"azure.subscription.webService":{"platform":{"name":["azure"]},"fields":{"apps":{},"availableRuntimes":{},"subscriptionId":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.webService.appsite":{"platform":{"name":["azure"]},"fields":{"applicationSettings":{},"authenticationSettings":{},"configuration":{},"connectionSettings":{},"id":{},"identity":{},"kind":{},"location":{},"metadata":{},"name":{},"properties":{},"stack":{},"tags":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.webService.appsiteauthsettings":{"platform":{"name":["azure"]},"fields":{"id":{},"kind":{},"name":{},"properties":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.subscription.webService.appsiteconfig":{"platform":{"name":["azure"]},"fields":{"id":{},"kind":{},"name":{},"properties":{},"type":{}},"is_private":true,"min_mondoo_version":"latest"},"azure.web":{"platform":{"name":["azure"]},"fields":{"apps":{},"availableRuntimes":{}},"min_mondoo_version":"latest"},"azure.web.appsite":{"platform":{"name":["azure"]},"fields":{"applicationSettings":{},"authenticationSettings":{},"configuration":{},"connectionSettings":{},"id":{},"identity":{},"kind":{},"location":{},"metadata":{},"name":{},"properties":{},"stack":{},"tags":{},"type":{}},"min_mondoo_version":"latest"},"azure.web.appsiteauthsettings":{"platform":{"name":["azure"]},"fields":{"id":{},"kind":{},"name":{},"properties":{},"type":{}},"min_mondoo_version":"latest"},"azure.web.appsiteconfig":{"platform":{"name":["azure"]},"fields":{"id":{},"kind":{},"name":{},"properties":{},"type":{}},"min_mondoo_version":"latest"},"azuread":{"platform":{"name":["azure"]},"fields":{"applications":{},"domains":{},"groups":{},"servicePrincipals":{},"users":{}},"min_mondoo_version":"5.15.0"},"azuread.application":{"platform":{"name":["azure"]},"fields":{"id":{}},"is_private":true,"min_mondoo_version":"5.15.0"},"azuread.domain":{"platform":{"name":["azure"]},"fields":{"authenticationType":{},"isDefault":{},"isVerified":{},"name":{},"properties":{}},"is_private":true,"min_mondoo_version":"5.15.0"},"azuread.group":{"platform":{"name":["azure"]},"fields":{"displayName":{},"id":{},"mail":{},"mailEnabled":{},"mailNickname":{},"members":{},"objectType":{},"properties":{},"securityEnabled":{}},"is_private":true,"min_mondoo_version":"5.15.0"},"azuread.serviceprincipal":{"platform":{"name":["azure"]},"fields":{"id":{}},"is_private":true,"min_mondoo_version":"5.15.0"},"azuread.user":{"platform":{"name":["azure"]},"fields":{"accountEnabled":{},"displayName":{},"givenName":{},"id":{},"mail":{},"mailNickname":{},"objectType":{},"properties":{},"surname":{},"userPrincipalName":{},"userType":{}},"is_private":true,"min_mondoo_version":"5.15.0"},"azurerm":{"platform":{"name":["azure"]},"fields":{"resources":{}},"min_mondoo_version":"5.15.0"},"azurerm.compute":{"platform":{"name":["azure"]},"fields":{"disks":{},"vms":{}},"min_mondoo_version":"5.15.0"},"azurerm.compute.disk":{"platform":{"name":["azure"]},"fields":{"id":{},"location":{},"managedBy":{},"managedByExtended":{},"name":{},"properties":{},"sku":{},"tags":{},"type":{},"zones":{}},"min_mondoo_version":"5.15.0"},"azurerm.compute.vm":{"platform":{"name":["azure"]},"fields":{"dataDisks":{},"extensions":{},"id":{},"location":{},"name":{},"osDisk":{},"properties":{},"tags":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.keyvault":{"platform":{"name":["azure"]},"fields":{"vaults":{}},"min_mondoo_version":"5.15.0"},"azurerm.keyvault.certificate":{"platform":{"name":["azure"]},"fields":{"certName":{},"created":{},"enabled":{},"expires":{},"id":{},"notBefore":{},"recoveryLevel":{},"tags":{},"updated":{},"version":{},"versions":{},"x5t":{}},"min_mondoo_version":"5.15.0"},"azurerm.keyvault.key":{"platform":{"name":["azure"]},"fields":{"created":{},"enabled":{},"expires":{},"keyName":{},"kid":{},"managed":{},"notBefore":{},"recoveryLevel":{},"tags":{},"updated":{},"version":{},"versions":{}},"min_mondoo_version":"5.15.0"},"azurerm.keyvault.secret":{"platform":{"name":["azure"]},"fields":{"contentType":{},"created":{},"enabled":{},"expires":{},"id":{},"managed":{},"notBefore":{},"secretName":{},"tags":{},"updated":{},"version":{},"versions":{}},"min_mondoo_version":"5.15.0"},"azurerm.keyvault.vault":{"platform":{"name":["azure"]},"fields":{"certificates":{},"diagnosticSettings":{},"id":{},"keys":{},"location":{},"properties":{},"secrets":{},"tags":{},"type":{},"vaultName":{},"vaultUri":{}},"min_mondoo_version":"5.15.0"},"azurerm.mariadb":{"platform":{"name":["azure"]},"fields":{"servers":{}},"min_mondoo_version":"5.15.0"},"azurerm.mariadb.database":{"platform":{"name":["azure"]},"fields":{"charset":{},"collation":{},"id":{},"name":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.mariadb.server":{"platform":{"name":["azure"]},"fields":{"configuration":{},"databases":{},"firewallRules":{},"id":{},"location":{},"name":{},"properties":{},"tags":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.monitor":{"platform":{"name":["azure"]},"fields":{"logProfiles":{}},"min_mondoo_version":"5.15.0"},"azurerm.monitor.diagnosticsetting":{"platform":{"name":["azure"]},"fields":{"id":{},"name":{},"properties":{},"storageAccount":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.monitor.logprofile":{"platform":{"name":["azure"]},"fields":{"id":{},"location":{},"name":{},"properties":{},"storageAccount":{},"tags":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.mysql":{"platform":{"name":["azure"]},"fields":{"servers":{}},"min_mondoo_version":"5.15.0"},"azurerm.mysql.database":{"platform":{"name":["azure"]},"fields":{"charset":{},"collation":{},"id":{},"name":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.mysql.server":{"platform":{"name":["azure"]},"fields":{"configuration":{},"databases":{},"firewallRules":{},"id":{},"location":{},"name":{},"properties":{},"tags":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.network":{"platform":{"name":["azure"]},"fields":{"interfaces":{},"securityGroups":{},"watchers":{}},"min_mondoo_version":"5.15.0"},"azurerm.network.interface":{"platform":{"name":["azure"]},"fields":{"etag":{},"id":{},"location":{},"name":{},"properties":{},"tags":{},"type":{},"vm":{}},"min_mondoo_version":"5.15.0"},"azurerm.network.securitygroup":{"platform":{"name":["azure"]},"fields":{"defaultSecurityRules":{},"etag":{},"id":{},"interfaces":{},"location":{},"name":{},"properties":{},"securityRules":{},"tags":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.network.securityrule":{"platform":{"name":["azure"]},"fields":{"destinationPortRange":{},"etag":{},"id":{},"name":{},"properties":{}},"min_mondoo_version":"5.15.0"},"azurerm.network.watcher":{"platform":{"name":["azure"]},"fields":{"etag":{},"id":{},"location":{},"name":{},"properties":{},"tags":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.postgresql":{"platform":{"name":["azure"]},"fields":{"servers":{}},"min_mondoo_version":"5.15.0"},"azurerm.postgresql.database":{"platform":{"name":["azure"]},"fields":{"charset":{},"collation":{},"id":{},"name":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.postgresql.server":{"platform":{"name":["azure"]},"fields":{"configuration":{},"databases":{},"firewallRules":{},"id":{},"location":{},"name":{},"properties":{},"tags":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.resource":{"platform":{"name":["azure"]},"fields":{"changedTime":{},"createdTime":{},"id":{},"identity":{},"kind":{},"location":{},"managedBy":{},"name":{},"plan":{},"provisioningState":{},"sku":{},"tags":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.sql":{"platform":{"name":["azure"]},"fields":{"servers":{}},"min_mondoo_version":"5.15.0"},"azurerm.sql.configuration":{"platform":{"name":["azure"]},"fields":{"allowedValues":{},"dataType":{},"defaultValue":{},"description":{},"id":{},"name":{},"source":{},"type":{},"value":{}},"min_mondoo_version":"5.15.0"},"azurerm.sql.database":{"platform":{"name":["azure"]},"fields":{"advisor":{},"auditingPolicy":{},"collation":{},"connectionPolicy":{},"containmentState":{},"createMode":{},"creationDate":{},"currentServiceObjectiveId":{},"databaseId":{},"defaultSecondaryLocation":{},"earliestRestoreDate":{},"edition":{},"elasticPoolName":{},"failoverGroupId":{},"id":{},"maxSizeBytes":{},"name":{},"readScale":{},"recommendedIndex":{},"recoveryServicesRecoveryPointResourceId":{},"requestedServiceObjectiveId":{},"requestedServiceObjectiveName":{},"restorePointInTime":{},"sampleName":{},"serviceLevelObjective":{},"serviceTierAdvisors":{},"sourceDatabaseDeletionDate":{},"sourceDatabaseId":{},"status":{},"threadDetectionPolicy":{},"transparentDataEncryption":{},"type":{},"usage":{},"zoneRedundant":{}},"min_mondoo_version":"5.15.0"},"azurerm.sql.databaseusage":{"platform":{"name":["azure"]},"fields":{"currentValue":{},"displayName":{},"id":{},"limit":{},"name":{},"nextResetTime":{},"resourceName":{},"unit":{}},"min_mondoo_version":"5.15.0"},"azurerm.sql.firewallrule":{"platform":{"name":["azure"]},"fields":{"endIpAddress":{},"id":{},"name":{},"startIpAddress":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.sql.server":{"platform":{"name":["azure"]},"fields":{"auditingPolicy":{},"azureAdAdministrators":{},"connectionPolicy":{},"databases":{},"encryptionProtector":{},"firewallRules":{},"id":{},"location":{},"name":{},"properties":{},"securityAlertPolicy":{},"tags":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.sql.server.administrator":{"platform":{"name":["azure"]},"fields":{"administratorType":{},"id":{},"login":{},"name":{},"sid":{},"tenantId":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.storage":{"platform":{"name":["azure"]},"fields":{"accounts":{}},"min_mondoo_version":"5.15.0"},"azurerm.storage.account":{"platform":{"name":["azure"]},"fields":{"containers":{},"id":{},"identity":{},"kind":{},"location":{},"name":{},"properties":{},"sku":{},"tags":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.storage.container":{"platform":{"name":["azure"]},"fields":{"etag":{},"id":{},"name":{},"properties":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.web":{"platform":{"name":["azure"]},"fields":{"apps":{},"availableRuntimes":{}},"min_mondoo_version":"5.15.0"},"azurerm.web.appsite":{"platform":{"name":["azure"]},"fields":{"applicationSettings":{},"authenticationSettings":{},"configuration":{},"connectionSettings":{},"id":{},"identity":{},"kind":{},"location":{},"metadata":{},"name":{},"properties":{},"stack":{},"tags":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.web.appsiteauthsettings":{"platform":{"name":["azure"]},"fields":{"id":{},"kind":{},"name":{},"properties":{},"type":{}},"min_mondoo_version":"5.15.0"},"azurerm.web.appsiteconfig":{"platform":{"name":["azure"]},"fields":{"id":{},"kind":{},"name":{},"properties":{},"type":{}},"min_mondoo_version":"5.15.0"}}} \ No newline at end of file