Azure Monitor 日志上的系统函数System functions on Azure Monitor Logs

Azure 备份提供了一组函数,这些函数称为系统函数或解决方案函数,默认情况下,可以在 Log Analytics (LA) 工作区中使用这些函数。Azure Backup provides a set of functions, called system functions or solution functions, that are available by default in your Log Analytics (LA) workspaces.

这些函数可以对 LA 中原始 Azure 备份表中的数据进行操作,并返回格式化数据,帮助你利用简单的查询轻松检索所有与备份相关的实体的信息。These functions operate on data in the raw Azure Backup tables in LA and return formatted data that helps you easily retrieve information of all your backup-related entities, using simple queries. 用户可以将参数传递给这些函数,以筛选这些函数返回的数据。Users can pass parameters to these functions to filter the data that is returned by these functions.

建议使用系统函数在 LA 工作区中查询备份数据以创建自定义报告,因为这些函数提供了许多好处,如以下部分中所述。It's recommended to use system functions for querying your backup data in LA workspaces for creating custom reports, as they provide a number of benefits, as detailed in the section below.

使用系统函数的优点Benefits of using system functions

  • 简化查询过程:使用函数有助于减少查询过程中所需的联接数。Simpler queries: Using functions helps you reduce the number of joins needed in your queries. 默认情况下,函数返回“平展”架构,该架构包含与被查询实体(备份实例、作业、保管库等)相关的所有信息。By default, the functions return ‘flattened’ schemas, that incorporate all information pertaining to the entity (backup instance, job, vault, and so on) being queried. 例如,如果需要获得按备份项名称及其关联容器筛选的成功备份作业的列表,直接调用 _AzureBackup_getJobs() 函数即可为你提供每个作业的所有此信息。For example, if you need to get a list of successful backup jobs by backup item name and its associated container, a simple call to the _AzureBackup_getJobs() function will give you all of this information for each job. 另一方面,直接查询原始表需要在 AddonAzureBackupJobsCoreAzureBackup 表之间执行多个联接。On the other hand, querying the raw tables directly would require you to perform multiple joins between AddonAzureBackupJobs and CoreAzureBackup tables.

  • 实现从旧诊断事件的顺畅转换:使用系统函数有助于实现从旧诊断事件(AzureDiagnostics 模式下的 AzureBackupReport)到特定于资源的事件的顺畅转换。Smoother transition from the legacy diagnostics event: Using system functions helps you transition smoothly from the legacy diagnostics event (AzureBackupReport in AzureDiagnostics mode) to the resource-specific events. Azure 备份提供的所有系统函数都允许你指定一个参数,该参数允许你选择函数应仅从特定于资源的表中查询数据,还是可以同时从旧表和特定于资源的表中查询数据(包含重复数据删除记录)。All the system functions provided by Azure Backup allow you to specify a parameter that lets you choose whether the function should query data only from the resource-specific tables, or query data from both the legacy table and the resource-specific tables (with deduplication of records).

    • 如果已成功迁移到特定于资源的表,则可以选择在函数进行查询时排除旧表。If you have successfully migrated to the resource-specific tables, you can choose to exclude the legacy table from being queried by the function.
    • 如果当前正在进行迁移,且在旧表中包含一些需要进行分析的数据,则可以选择包含旧表。If you are currently in the process of migration and have some data in the legacy tables which you require for analysis, you can choose to include the legacy table. 转换完成后,如果不再需要旧表中的数据,只需在查询时更新传递给函数的参数值,即可排除旧表。When the transition is complete, and you no longer need data from the legacy table, you can simply update the value of the parameter passed to the function in your queries, to exclude the legacy table.
    • 如果仍旧只使用旧表,那么在选择通过同一参数包含旧表时,这些函数仍然有效。If you are still using only the legacy table, the functions will still work if you choose to include the legacy table via the same parameter. 但是,建议尽早切换到特定于资源的表However, it is recommended to switch to the resource-specific tables at the earliest.
  • 减少自定义查询中断的可能性:如果 Azure 备份通过引入对基础 LA 表架构的改进以适应未来的报告场景,则函数的定义也将随之更新,以考虑架构的更改。Reduces possibility of custom queries breaking: If Azure Backup introduces improvements to the schema of the underlying LA tables to accommodate future reporting scenarios, the definition of the functions will also be updated to take into account the schema changes. 因此,如果使用系统函数创建自定义查询,即使表的基础架构发生更改,查询也不会中断。Thus, if you use system functions for creating custom queries, your queries will not break, even if there are changes in the underlying schema of the tables.

备注

系统函数由 Microsoft 提供维护,且用户无法编辑其定义。System functions are maintained by Microsoft and their definitions cannot be edited by users. 如果需要可编辑的函数,可以在 LA 中创建保存的函数If you require editable functions, you can create saved functions in LA.

Azure 备份提供的系统函数的类型Types of system functions offered by Azure Backup

  • 核心函数:这些函数有助于查询任何关键 Azure 备份实体,如备份实例、保管库、策略、作业和计费实体。Core functions: These are functions that help you query any of the key Azure Backup entities, such as Backup Instances, Vaults, Policies, Jobs and Billing Entities. 例如,_AzureBackup_getBackupInstances 函数可返回最近一天(协调世界时)在环境中存在的所有备份实例的列表。For example, the _AzureBackup_getBackupInstances function returns a list of all the backup instances that exist in your environment as of the latest completed day (in UTC). 本文总结了其中每种核心函数对应的参数和返回的架构。The parameters and returned schema for each of these core functions are summarized below in this article.

  • 趋势函数:这些函数可返回与备份相关的实体(例如,备份实例、计费组)的历史记录,并允许你获取有关这些实体的关键指标(例如,计数、已使用的存储)的每日、每周和每月趋势信息。Trend functions: These are functions that return historical records for your backup-related entities (for example, backup instances, billing groups) and allow you to get daily, weekly and monthly trend information on key metrics (for example, Count, Storage consumed) pertaining to these entities. 本文总结了其中每种趋势函数对应的参数和返回的架构。The parameters and returned schema for each of these trend functions are summarized below in this article.

备注

目前,系统函数可返回最近一天(协调世界时)的数据。Currently, system functions return data for up to the last completed day (in UTC). 不会返回目前未满一天的数据。Data for the current partial day isn't returned. 因此,如果希望检索当天的记录,需要使用原始 LA 表。So if you are looking to retrieve records for the current day, you'll need to use the raw LA tables.

系统函数列表List of system functions

核心函数Core Functions

_AzureBackup_GetVaults()_AzureBackup_GetVaults()

此函数返回 Azure 环境中与 LA 工作区关联的所有恢复服务保管库的列表。This function returns the list of all Recovery Services vaults in your Azure environment that are associated with the LA workspace.

ParametersParameters

参数名称Parameter Name 说明Description 必需?Required? 示例值Example value
RangeStartRangeStart 仅在以下情况下将此参数与 RangeEnd 参数一起使用:需要获取从 RangeStart 到 RangeEnd 的时间段内所有与保管库相关的记录。Use this parameter along with RangeEnd parameter only if you need to fetch all vault-related records in the time period from RangeStart to RangeEnd. 默认情况下,RangeStart 和 RangeEnd 的值为 null,这将使函数仅检索每个保管库的最新记录。By default, the value of RangeStart and RangeEnd are null, which will make the function retrieve only the latest record for each vault. NN “2021-03-03 00:00:00”"2021-03-03 00:00:00"
RangeEndRangeEnd 仅在以下情况下将此参数与 RangeStart 参数一起使用:需要获取从 RangeStart 到 RangeEnd 的时间段内所有与保管库相关的记录。Use this parameter along with RangeStart parameter only if you need to fetch all vault-related records in the time period from RangeStart to RangeEnd. 默认情况下,RangeStart 和 RangeEnd 的值为 null,这将使函数仅检索每个保管库的最新记录。By default, the value of RangeStart and RangeEnd are null, which will make the function retrieve only the latest record for each vault. NN “2021-03-10 00:00:00”"2021-03-10 00:00:00"
VaultSubscriptionListVaultSubscriptionList 此参数用于筛选存在备份数据的一组特定订阅的函数输出。Use this parameter to filter the output of the function for a certain set of subscriptions where backup data exists. 指定以逗号分隔的订阅 ID 列表作为此函数的参数有助于仅检索指定订阅中的那些保管库。Specifying a comma-separated list of subscription IDs as a parameter to this function helps you retrieve only those vaults that are in the specified subscriptions. 默认情况下,此参数的值为“*”,这使函数能够跨所有订阅搜索记录。By default, the value of this parameter is '*', which makes the function search for records across all subscriptions. NN “00000000-0000-0000-0000-000000000000,11111111-1111-1111-1111-111111111111”"00000000-0000-0000-0000-000000000000,11111111-1111-1111-1111-111111111111"
VaultLocationListVaultLocationList 此参数用于筛选存在备份数据的一组特定区域的函数输出。Use this parameter to filter the output of the function for a certain set of regions where backup data exists. 指定以逗号分隔的区域列表作为此函数的参数有助于仅检索指定区域中的那些保管库。Specifying a comma-separated list of regions as a parameter to this function helps you retrieve only those vaults that are in the specified regions. 默认情况下,此参数的值为“*”,这使函数能够跨所有区域搜索记录。By default, the value of this parameter is '*', which makes the function search for records across all regions. NN “chinanorth,chinanorth”"chinanorth,chinanorth"
VaultListVaultList 此参数用于筛选一组特定保管库的函数输出。Use this parameter to filter the output of the function for a certain set of vaults. 指定以逗号分隔的保管库名称列表作为此函数的参数有助于检索仅与指定保管库相关的记录。Specifying a comma-separated list of vault names as a parameter to this function helps you retrieve records pertaining only to the specified vaults. 默认情况下,此参数的值为“*”,这使函数能够跨所有保管库搜索记录。By default, the value of this parameter is '*', which makes the function search for records across all vaults. NN “vault1,vault2,vault3”"vault1,vault2,vault3"
VaultTypeListVaultTypeList 此参数用于筛选与特定保管库类型相关的记录的函数输出。Use this parameter to filter the output of the function to records pertaining to a particular vault type. 目前唯一受支持的保管库类型为“Microsoft.RecoveryServices/vaults”,这是此参数的默认值Currently the only supported vault type is "Microsoft.RecoveryServices/vaults", which is the default value of this parameter NN “Microsoft.RecoveryServices/vaults”"Microsoft.RecoveryServices/vaults"
ExcludeLegacyEventExcludeLegacyEvent 此参数用于选择是否在旧 AzureDiagnostics 表中查询数据。Use this parameter to choose whether to query data in the legacy AzureDiagnostics table or not. 如果此参数的值为 false,则函数同时查询 AzureDiagnostics 表和特定于资源的表中的数据。If the value of this parameter is false, the function queries data from both the AzureDiagnostics table and the Resource specific tables. 如果此参数的值为 true,则函数仅查询特定于资源的表中的数据。If the value of this parameter is true, the function queries data from only the Resource specific tables. 默认值为 true。Default value is true. NN true

返回的字段Returned Fields

字段名称Field Name 说明Description
UniqueIdUniqueId 用于指示保管库唯一 ID 的主键Primary key denoting unique ID of the vault
IDId 保管库的 Azure 资源管理器 (ARM) IDAzure Resource Manager (ARM) ID of the vault
名称Name 保管库的名称Name of the vault
SubscriptionIdSubscriptionId 存在保管库的订阅 IDID of the subscription in which the vault exists
位置Location 存在保管库的位置Location in which the vault exists
VaultStore_StorageReplicationTypeVaultStore_StorageReplicationType 与保管库关联的存储复制类型Storage Replication Type associated with the vault
标记Tags 保管库的标记Tags of the vault
TimeGeneratedTimeGenerated 记录的时间戳Timestamp of the record
类型Type 保管库的类型,即“Microsoft.RecoveryServices/vaults”Type of the vault, which is "Microsoft.RecoveryServices/vaults"

_AzureBackup_GetPolicies()_AzureBackup_GetPolicies()

此函数可返回在 Azure 环境中使用的备份策略的列表,以及有关每个策略的详细信息,例如,数据源类型、存储复制类型等。This function returns the list of backup policies that are being used in your Azure environment along with detailed information about each policy such as the datasource type, storage replication type, and so on.

ParametersParameters

参数名称Parameter Name 说明Description 必需?Required? 示例值Example value
RangeStartRangeStart 仅在以下情况下将此参数与 RangeStart 参数一起使用:需要获取从 RangeStart 到 RangeEnd 的时间段内所有与策略相关的记录。Use this parameter along with the RangeStart parameter only if you need to fetch all policy-related records in the time period from RangeStart to RangeEnd. 默认情况下,RangeStart 和 RangeEnd 的值为 null,这将使函数仅检索每个策略的最新记录。By default, the value of RangeStart and RangeEnd are null, which will make the function retrieve only the latest record for each policy. NN “2021-03-03 00:00:00”"2021-03-03 00:00:00"
RangeEndRangeEnd 仅在以下情况下将此参数与 RangeStart 参数一起使用:需要获取从 RangeStart 到 RangeEnd 的时间段内所有与策略相关的记录。Use this parameter along with RangeStart parameter only if you need to fetch all policy-related records in the time period from RangeStart to RangeEnd. 默认情况下,RangeStart 和 RangeEnd 的值为 null,这将使函数仅检索每个策略的最新记录。By default, the value of RangeStart and RangeEnd are null, which will make the function retrieve only the latest record for each policy. NN “2021-03-10 00:00:00”"2021-03-10 00:00:00"
VaultSubscriptionListVaultSubscriptionList 此参数用于筛选存在备份数据的一组特定订阅的函数输出。Use this parameter to filter the output of the function for a certain set of subscriptions where backup data exists. 指定以逗号分隔的订阅 ID 列表作为此函数的参数有助于仅检索指定订阅中的那些策略。Specifying a comma-separated list of subscription IDs as a parameter to this function helps you retrieve only those policies that are in the specified subscriptions. 默认情况下,此参数的值为“*”,这使函数能够跨所有订阅搜索记录。By default, the value of this parameter is '*', which makes the function search for records across all subscriptions. NN “00000000-0000-0000-0000-000000000000,11111111-1111-1111-1111-111111111111”"00000000-0000-0000-0000-000000000000,11111111-1111-1111-1111-111111111111"
VaultLocationListVaultLocationList 此参数用于筛选存在备份数据的一组特定区域的函数输出。Use this parameter to filter the output of the function for a certain set of regions where backup data exists. 指定以逗号分隔的区域列表作为此函数的参数有助于仅检索指定区域中的那些策略。Specifying a comma-separated list of regions as a parameter to this function helps you retrieve only those policies that are in the specified regions. 默认情况下,此参数的值为“*”,这使函数能够跨所有区域搜索记录。By default, the value of this parameter is '*', which makes the function search for records across all regions. NN “chinanorth,chinanorth”"chinanorth,chinanorth"
VaultListVaultList 此参数用于筛选一组特定保管库的函数输出。Use this parameter to filter the output of the function for a certain set of vaults. 指定以逗号分隔的保管库名称列表作为此函数的参数有助于检索仅与指定保管库相关的策略记录。Specifying a comma-separated list of vault names as a parameter to this function helps you retrieve records of policies pertaining only to the specified vaults. 默认情况下,此参数的值为“*”,这使函数能够跨所有保管库搜索策略记录。By default, the value of this parameter is '*', which makes the function search for records of policies across all vaults. NN “vault1,vault2,vault3”"vault1,vault2,vault3"
VaultTypeListVaultTypeList 此参数用于筛选与特定保管库类型相关的记录的函数输出。Use this parameter to filter the output of the function to records pertaining to a particular vault type. 目前唯一受支持的保管库类型为“Microsoft.RecoveryServices/vaults”,这是此参数的默认值。Currently the only supported vault type is "Microsoft.RecoveryServices/vaults", which is the default value of this parameter. NN “Microsoft.RecoveryServices/vaults”"Microsoft.RecoveryServices/vaults"
ExcludeLegacyEventExcludeLegacyEvent 此参数用于选择是否在旧 AzureDiagnostics 表中查询数据。Use this parameter to choose whether to query data in the legacy AzureDiagnostics table or not. 如果此参数的值为 false,则函数同时查询 AzureDiagnostics 表和特定于资源的表中的数据。If the value of this parameter is false, the function queries data from both the AzureDiagnostics table and the Resource specific tables. 如果此参数的值为 true,则函数仅查询特定于资源的表中的数据。If the value of this parameter is true, the function queries data from only the Resource specific tables. 默认值为 true。Default value is true. NN true
BackupSolutionListBackupSolutionList 此参数用于筛选 Azure 环境中使用的一组特定备份解决方案的函数输出。Use this parameter to filter the output of the function for a certain set of backup solutions used in your Azure environment. 例如,如果将“Azure Virtual Machine Backup,SQL in Azure VM Backup,DPM”指定为此参数的值,则函数仅返回与使用 Azure 虚拟机备份、Azure VM 备份中的 SQL 或用 DPM 备份到 Azure 备份的项相关的记录。For example, if you specify "Azure Virtual Machine Backup,SQL in Azure VM Backup,DPM" as the value of this parameter, the function only returns records that are related to items backed up using Azure Virtual Machine backup, SQL in Azure VM backup or DPM to Azure backup. 默认情况下,此参数的值为“*”,这使函数能够返回与备份报表支持的所有备份解决方案相关的记录(支持的值为“Azure Virtual Machine Backup”、“SQL in Azure VM Backup”、“SAP HANA in Azure VM Backup”、“Azure Storage (Azure Files) Backup”、“Azure Backup Agent”、“DPM”、“Azure Backup Server”或以逗号分隔的任意这些值的组合)。By default, the value of this parameter is '*', which makes the function return records pertaining to all backup solutions that are supported by Backup Reports (supported values are "Azure Virtual Machine Backup", "SQL in Azure VM Backup", "SAP HANA in Azure VM Backup", "Azure Storage (Azure Files) Backup", "Azure Backup Agent", "DPM", "Azure Backup Server" or a comma-separated combination of any of these values). NN “Azure Virtual Machine Backup,SQL in Azure VM Backup,DPM,Azure Backup Agent”"Azure Virtual Machine Backup,SQL in Azure VM Backup,DPM,Azure Backup Agent"

返回的字段Returned Fields

字段名称Field Name 说明Description
UniqueIdUniqueId 用于指示策略唯一 ID 的主键Primary key denoting unique ID of the policy
IDId 策略的 Azure 资源管理器 (ARM) IDAzure Resource Manager (ARM) ID of the policy
名称Name 策略的名称Name of the policy
备份解决方案Backup Solution 策略与之关联的备份解决方案。Backup Solution that the policy is associated with. 例如,“Azure VM Backup”、“SQL in Azure VM Backup”等。For example, Azure VM Backup, SQL in Azure VM Backup, and so on.
TimeGeneratedTimeGenerated 记录的时间戳Timestamp of the record
VaultUniqueIdVaultUniqueId 引用与策略关联的保管库的外键Foreign key that refers to the vault associated with the policy
VaultResourceIdVaultResourceId 与策略关联的保管库的 Azure 资源管理器 (ARM) IDAzure Resource Manager (ARM) ID of the vault associated with the policy
VaultNameVaultName 与策略关联的保管库的名称Name of the vault associated with the policy
VaultTagsVaultTags 与策略关联的保管库的标记Tags of the vault associated with the policy
VaultLocationVaultLocation 与策略关联的保管库的位置Location of the vault associated with the policy
VaultSubscriptionIdVaultSubscriptionId 与策略关联的保管库的订阅 IDSubscription ID of the vault associated with the policy
VaultStore_StorageReplicationTypeVaultStore_StorageReplicationType 与策略关联的保管库的存储复制类型Storage Replication Type of the vault associated with the policy
VaultTypeVaultType 保管库的类型,即“Microsoft.RecoveryServices/vaults”Type of the vault, which is "Microsoft.RecoveryServices/vaults"
ExtendedPropertiesExtendedProperties 策略的附加属性Additional properties of the policy

_AzureBackup_GetJobs()_AzureBackup_GetJobs()

此函数可返回在指定时间范围内触发的所有与备份和还原相关的作业的列表,以及有关每个作业的详细信息,例如作业状态、作业持续时间、传输的数据等。This function returns a list of all backup and restore related jobs that were triggered in a specified time range, along with detailed information about each job, such as job status, job duration, data transferred, and so on.

ParametersParameters

参数名称Parameter Name 说明Description 必需?Required? 示例值Example value
RangeStartRangeStart 在以下情况下将此参数与 RangeEnd 参数一起使用:检索从 RangeStart 到 RangeEnd 的时间段内启动的所有作业的列表。Use this parameter along with RangeEnd parameter to retrieve the list of all jobs that started in the time period from RangeStart to RangeEnd. YY “2021-03-03 00:00:00”"2021-03-03 00:00:00"
RangeEndRangeEnd 在以下情况下将此参数与 RangeStart 参数一起使用:检索从 RangeStart 到 RangeEnd 的时间段内启动的所有作业的列表。Use this parameter along with RangeStart parameter to retrieve the list of all jobs that started in the time period from RangeStart to RangeEnd. YY “2021-03-10 00:00:00”"2021-03-10 00:00:00"
VaultSubscriptionListVaultSubscriptionList 此参数用于筛选存在备份数据的一组特定订阅的函数输出。Use this parameter to filter the output of the function for a certain set of subscriptions where backup data exists. 指定以逗号分隔的订阅 ID 列表作为此函数的参数有助于仅检索指定订阅中与保管库关联的那些作业。Specifying a comma-separated list of subscription IDs as a parameter to this function helps you retrieve only those jobs that are associated with vaults in the specified subscriptions. 默认情况下,此参数的值为“*”,这使函数能够跨所有订阅搜索记录。By default, the value of this parameter is '*', which makes the function search for records across all subscriptions. NN “00000000-0000-0000-0000-000000000000,11111111-1111-1111-1111-111111111111”"00000000-0000-0000-0000-000000000000,11111111-1111-1111-1111-111111111111"
VaultLocationListVaultLocationList 此参数用于筛选存在备份数据的一组特定区域的函数输出。Use this parameter to filter the output of the function for a certain set of regions where backup data exists. 指定以逗号分隔的区域列表作为此函数的参数有助于仅检索指定区域中与保管库关联的那些作业。Specifying a comma-separated list of regions as a parameter to this function helps you retrieve only those jobs that are associated with vaults in the specified regions. 默认情况下,此参数的值为“*”,这使函数能够跨所有区域搜索记录。By default, the value of this parameter is '*', which makes the function search for records across all regions. NN “chinanorth,chinanorth”"chinanorth,chinanorth"
VaultListVaultList 此参数用于筛选一组特定保管库的函数输出。Use this parameter to filter the output of the function for a certain set of vaults. 指定以逗号分隔的保管库名称列表作为此函数的参数有助于检索仅与指定保管库相关的作业。Specifying a comma-separated list of vault names as a parameter to this function helps you retrieve jobs pertaining only to the specified vaults. 默认情况下,此参数的值为“*”,这使函数能够跨所有保管库搜索作业。By default, the value of this parameter is '*', which makes the function search for jobs across all vaults. NN “vault1,vault2,vault3”"vault1,vault2,vault3"
VaultTypeListVaultTypeList 此参数用于筛选与特定保管库类型相关的记录的函数输出。Use this parameter to filter the output of the function to records pertaining to a particular vault type. 目前唯一受支持的保管库类型为“Microsoft.RecoveryServices/vaults”,这是此参数的默认值。Currently the only supported vault type is "Microsoft.RecoveryServices/vaults", which is the default value of this parameter. NN “Microsoft.RecoveryServices/vaults”"Microsoft.RecoveryServices/vaults"
ExcludeLegacyEventExcludeLegacyEvent 此参数用于选择是否在旧 AzureDiagnostics 表中查询数据。Use this parameter to choose whether to query data in the legacy AzureDiagnostics table or not. 如果此参数的值为 false,则函数同时查询 AzureDiagnostics 表和特定于资源的表中的数据。If the value of this parameter is false, the function queries data from both the AzureDiagnostics table and the Resource specific tables. 如果此参数的值为 true,则函数仅查询特定于资源的表中的数据。If the value of this parameter is true, the function queries data from only the Resource specific tables. 默认值为 true。Default value is true. NN true
BackupSolutionListBackupSolutionList 此参数用于筛选 Azure 环境中使用的一组特定备份解决方案的函数输出。Use this parameter to filter the output of the function for a certain set of backup solutions used in your Azure environment. 例如,如果将“Azure Virtual Machine Backup,SQL in Azure VM Backup,DPM”指定为此参数的值,则函数仅返回与使用 Azure 虚拟机备份、Azure VM 备份中的 SQL 或用 DPM 备份到 Azure 备份的项相关的记录。For example, if you specify "Azure Virtual Machine Backup,SQL in Azure VM Backup,DPM" as the value of this parameter, the function only returns records that are related to items backed up using Azure Virtual Machine backup, SQL in Azure VM backup or DPM to Azure backup. 默认情况下,此参数的值为“*”,这使函数能够返回与备份报表支持的所有备份解决方案相关的记录(支持的值为“Azure Virtual Machine Backup”、“SQL in Azure VM Backup”、“SAP HANA in Azure VM Backup”、“Azure Storage (Azure Files) Backup”、“Azure Backup Agent”、“DPM”、“Azure Backup Server”或以逗号分隔的任意这些值的组合)。By default, the value of this parameter is '*', which makes the function return records pertaining to all backup solutions that are supported by Backup Reports (supported values are "Azure Virtual Machine Backup", "SQL in Azure VM Backup", "SAP HANA in Azure VM Backup", "Azure Storage (Azure Files) Backup", "Azure Backup Agent", "DPM", "Azure Backup Server" or a comma-separated combination of any of these values). NN “Azure Virtual Machine Backup,SQL in Azure VM Backup,DPM,Azure Backup Agent”"Azure Virtual Machine Backup,SQL in Azure VM Backup,DPM,Azure Backup Agent"
JobOperationListJobOperationList 此参数用于筛选特定作业类型的函数输出。Use this parameter to filter the output of the function for a specific type of job. 例如,“Backup”或“Restore”。For example, Backup or Restore. 默认情况下,此参数的值为“*”,这使函数能够同时搜索备份作业和还原作业。By default, the value of this parameter is "*", which makes the function search for both Backup and Restore jobs. NN “Backup”"Backup"
JobStatusListJobStatusList 此参数用于筛选特定作业状态的函数输出。Use this parameter to filter the output of the function for a specific job status. 例如,“Completed”、“Failed”等。For example, Completed, Failed, and so on. 默认情况下,此参数的值为“*”,这使函数能够搜索所有作业,而不考虑状态。By default, the value of this parameter is "*", which makes the function search for all jobs irrespective of status. NN “Failed,CompletedWithWarnings”"Failed,CompletedWithWarnings"
JobFailureCodeListJobFailureCodeList 此参数用于筛选特定失败代码的函数输出。Use this parameter to filter the output of the function for a specific failure code. 默认情况下,此参数的值为“*”,这使函数能够搜索所有作业,而不考虑失败代码。By default, the value of this parameter is "*", which makes the function search for all jobs irrespective of failure code. NN “Success”"Success"
DatasourceSetNameDatasourceSetName 此参数用于筛选特定父资源的函数输出。Use this parameter to filter the output of the function to a particular parent resource. 例如,要返回属于虚拟机“testvm”的 SQL in Azure VM 备份实例,请指定“testvm”作为此参数的值。For example, to return SQL in Azure VM backup instances belonging to the virtual machine "testvm", specify testvm as the value of this parameter. 默认情况下,此值为“*”,这使函数能够跨所有备份实例搜索记录。By default, the value is "*", which makes the function search for records across all backup instances. NN “testvm”"testvm"
BackupInstanceNameBackupInstanceName 此参数用于按名称搜索特定备份实例上的作业。Use this parameter to search for jobs on a particular backup instance by name. 默认情况下,此值为“*”,这使函数能够跨所有备份实例搜索记录。By default, the value is "*", which makes the function search for records across all backup instances. NN “testvm”"testvm"
ExcludeLogExcludeLog 此参数用于排除函数返回的日志作业(有助于提高查询性能)。Use this parameter to exclude log jobs from being returned by the function (helps in query performance). 默认情况下,此参数的值为 true,这使函数能够排除日志作业。By default, the value of this parameter is true, which makes the function exclude log jobs. NN true

返回的字段Returned Fields

字段名称Field Name 说明Description
UniqueIdUniqueId 用于指示作业唯一 ID 的主键Primary key denoting unique ID of the job
OperationCategoryOperationCategory 正在执行的操作的类别。Category of the operation being performed. 例如,“Backup”、“Restore”For example, Backup, Restore
操作Operation 正在执行的操作的详细信息。Details of the operation being performed. 例如,“Log”(用于日志备份)For example, Log (for log backup)
状态Status 作业的状态。Status of the job. 例如,“Completed”、“Failed”、“CompletedWithWarnings”For example, Completed, Failed, CompletedWithWarnings
ErrorTitleErrorTitle 作业的失败代码Failure code of the job
StartTimeStartTime 启动作业的日期和时间Date and time at which the job started
DurationInSecsDurationInSecs 作业持续时间(秒)Duration of the job in seconds
DataTransferredInMBsDataTransferredInMBs 作业传输的数据 (MB)Data transferred by the job in MBs
RestoreJobRPDateTimeRestoreJobRPDateTime 要恢复的恢复点的创建日期和时间The date and time when the recovery point that's being recovered was created
RestoreJobRPLocationRestoreJobRPLocation 要恢复的恢复点的存储位置The location where the recovery point that's being recovered was stored
BackupInstanceUniqueIdBackupInstanceUniqueId 引用与作业关联的备份实例的外键Foreign key that refers to the backup instance associated with the job
BackupInstanceIdBackupInstanceId 与作业关联的备份实例的 Azure 资源管理器 (ARM) IDAzure Resource Manager (ARM) ID of the backup instance associated with the job
BackupInstanceFriendlyNameBackupInstanceFriendlyName 与作业关联的备份实例的名称Name of the backup instance associated with the job
DatasourceResourceIdDatasourceResourceId 与作业关联的基础数据源的 Azure 资源管理器 (ARM) ID。Azure Resource Manager (ARM) ID of the underlying datasource associated with the job. 例如,“VM 的 Azure 资源管理器 (ARM) ID”For example, Azure Resource Manager (ARM) ID of the VM
DatasourceFriendlyNameDatasourceFriendlyName 与作业关联的基础数据源的友好名称Friendly name of the underlying datasource associated with the job
DatasourceTypeDatasourceType 与作业关联的数据源的类型。Type of the datasource associated with the job. 例如,“Microsoft.Compute/virtualMachines”For example "Microsoft.Compute/virtualMachines"
BackupSolutionBackupSolution 作业与之关联的备份解决方案。Backup Solution that the job is associated with. 例如,“Azure VM Backup”、“SQL in Azure VM Backup”等。For example, Azure VM Backup, SQL in Azure VM Backup, and so on.
DatasourceSetResourceIdDatasourceSetResourceId 数据源父资源的 Azure 资源管理器 (ARM) ID(如果适用)。Azure Resource Manager (ARM) ID of the parent resource of the datasource (wherever applicable). 例如,对于 SQL in Azure VM 数据源,此字段将包含存在 SQL 数据库的 VM 的 Azure 资源管理器 (ARM) IDFor example, for a SQL in Azure VM datasource, this field will contain the Azure Resource Manager (ARM) ID of the VM in which the SQL Database exists
DatasourceSetTypeDatasourceSetType 数据源父资源的类型(如果适用)。Type of the parent resource of the datasource (wherever applicable). 例如,对于 SAP HANA in Azure VM 数据源,此字段将为“Microsoft.Compute/virtualMachines”,因为父资源为 Azure VMFor example, for an SAP HANA in Azure VM datasource, this field will be Microsoft.Compute/virtualMachines since the parent resource is an Azure VM
VaultResourceIdVaultResourceId 与作业关联的保管库的 Azure 资源管理器 (ARM) IDAzure Resource Manager (ARM) ID of the vault associated with the job
VaultUniqueIdVaultUniqueId 引用与作业关联的保管库的外键Foreign key that refers to the vault associated with the job
VaultNameVaultName 与作业关联的保管库的名称Name of the vault associated with the job
VaultTagsVaultTags 与作业关联的保管库的标记Tags of the vault associated with the job
VaultSubscriptionIdVaultSubscriptionId 与作业关联的保管库的订阅 IDSubscription ID of the vault associated with the job
VaultLocationVaultLocation 与作业关联的保管库的位置Location of the vault associated with the job
VaultStore_StorageReplicationTypeVaultStore_StorageReplicationType 与作业关联的保管库的存储复制类型Storage Replication Type of the vault associated with the job
VaultTypeVaultType 保管库的类型,即“Microsoft.RecoveryServices/vaults”Type of the vault, which is "Microsoft.RecoveryServices/vaults"
TimeGeneratedTimeGenerated 记录的时间戳Timestamp of the record

_AzureBackup_GetBackupInstances()_AzureBackup_GetBackupInstances()

此函数用于返回与恢复服务保管库关联的备份实例的列表,以及有关每个备份实例的详细信息,如云存储使用量、关联的策略等。This function returns the list of backup instances that are associated with your Recovery Services vaults, along with detailed information about each backup instance, such as cloud storage consumption, associated policy, and so on.

ParametersParameters

参数名称Parameter Name 说明Description 必需?Required? 示例值Example value
RangeStartRangeStart 仅在以下情况下将此参数与 RangeEnd 参数一起使用:需要获取从 RangeStart 到 RangeEnd 的时间段内所有与备份实例相关的记录。Use this parameter along with RangeEnd parameter only if you need to fetch all backup instance-related records in the time period from RangeStart to RangeEnd. 默认情况下,RangeStart 和 RangeEnd 的值为 null,这将使函数仅检索每个备份实例的最新记录。By default, the value of RangeStart and RangeEnd are null, which will make the function retrieve only the latest record for each backup instance. NN “2021-03-03 00:00:00”"2021-03-03 00:00:00"
RangeEndRangeEnd 仅在以下情况下将此参数与 RangeStart 参数一起使用:需要获取从 RangeStart 到 RangeEnd 的时间段内所有与备份实例相关的记录。Use this parameter along with RangeStart parameter only if you need to fetch all backup instance-related records in the time period from RangeStart to RangeEnd. 默认情况下,RangeStart 和 RangeEnd 的值为 null,这将使函数仅检索每个备份实例的最新记录。By default, the value of RangeStart and RangeEnd are null, which will make the function retrieve only the latest record for each backup instance. NN “2021-03-10 00:00:00”"2021-03-10 00:00:00"
VaultSubscriptionListVaultSubscriptionList 此参数用于筛选存在备份数据的一组特定订阅的函数输出。Use this parameter to filter the output of the function for a certain set of subscriptions where backup data exists. 指定以逗号分隔的订阅 ID 列表作为此函数的参数有助于仅检索指定订阅中的那些备份实例。Specifying a comma-separated list of subscription IDs as a parameter to this function helps you retrieve only those backup instances that are in the specified subscriptions. 默认情况下,此参数的值为“*”,这使函数能够跨所有订阅搜索记录。By default, the value of this parameter is '*', which makes the function search for records across all subscriptions. NN “00000000-0000-0000-0000-000000000000,11111111-1111-1111-1111-111111111111”"00000000-0000-0000-0000-000000000000,11111111-1111-1111-1111-111111111111"
VaultLocationListVaultLocationList 此参数用于筛选存在备份数据的一组特定区域的函数输出。Use this parameter to filter the output of the function for a certain set of regions where backup data exists. 指定以逗号分隔的区域列表作为此函数的参数有助于仅检索指定区域中的那些备份实例。Specifying a comma-separated list of regions as a parameter to this function helps you retrieve only those backup instances that are in the specified regions. 默认情况下,此参数的值为“*”,这使函数能够跨所有区域搜索记录。By default, the value of this parameter is '*', which makes the function search for records across all regions. NN “chinanorth,chinanorth”"chinanorth,chinanorth"
VaultListVaultList 此参数用于筛选一组特定保管库的函数输出。Use this parameter to filter the output of the function for a certain set of vaults. 指定以逗号分隔的保管库名称列表作为此函数的参数有助于检索仅与指定保管库相关的备份实例记录。Specifying a comma-separated list of vault names as a parameter to this function helps you retrieve records of backup instances pertaining only to the specified vaults. 默认情况下,此参数的值为“*”,这使函数能够跨所有保管库搜索备份实例记录。By default, the value of this parameter is '*', which makes the function search for records of backup instances across all vaults. NN “vault1,vault2,vault3”"vault1,vault2,vault3"
VaultTypeListVaultTypeList 此参数用于筛选与特定保管库类型相关的记录的函数输出。Use this parameter to filter the output of the function to records pertaining to a particular vault type. 目前唯一受支持的保管库类型为“Microsoft.RecoveryServices/vaults”,这是此参数的默认值。Currently the only supported vault type is "Microsoft.RecoveryServices/vaults", which is the default value of this parameter. NN “Microsoft.RecoveryServices/vaults”"Microsoft.RecoveryServices/vaults"
ExcludeLegacyEventExcludeLegacyEvent 此参数用于选择是否在旧 AzureDiagnostics 表中查询数据。Use this parameter to choose whether to query data in the legacy AzureDiagnostics table or not. 如果此参数的值为 false,则函数同时查询 AzureDiagnostics 表和特定于资源的表中的数据。If the value of this parameter is false, the function queries data from both the AzureDiagnostics table and the Resource specific tables. 如果此参数的值为 true,则函数仅查询特定于资源的表中的数据。If the value of this parameter is true, the function queries data from only the Resource specific tables. 默认值为 true。Default value is true. NN true
BackupSolutionListBackupSolutionList 此参数用于筛选 Azure 环境中使用的一组特定备份解决方案的函数输出。Use this parameter to filter the output of the function for a certain set of backup solutions used in your Azure environment. 例如,如果将“Azure Virtual Machine Backup,SQL in Azure VM Backup,DPM”指定为此参数的值,则函数仅返回与使用 Azure 虚拟机备份、Azure VM 备份中的 SQL 或用 DPM 备份到 Azure 备份的项相关的记录。For example, if you specify "Azure Virtual Machine Backup,SQL in Azure VM Backup,DPM" as the value of this parameter, the function only returns records that are related to items backed up using Azure Virtual Machine backup, SQL in Azure VM backup or DPM to Azure backup. 默认情况下,此参数的值为“*”,这使函数能够返回与备份报表支持的所有备份解决方案相关的记录(支持的值为“Azure Virtual Machine Backup”、“SQL in Azure VM Backup”、“SAP HANA in Azure VM Backup”、“Azure Storage (Azure Files) Backup”、“Azure Backup Agent”、“DPM”、“Azure Backup Server”或以逗号分隔的任意这些值的组合)。By default, the value of this parameter is '*', which makes the function return records pertaining to all backup solutions that are supported by Backup Reports (supported values are "Azure Virtual Machine Backup", "SQL in Azure VM Backup", "SAP HANA in Azure VM Backup", "Azure Storage (Azure Files) Backup", "Azure Backup Agent", "DPM", "Azure Backup Server" or a comma-separated combination of any of these values). NN “Azure Virtual Machine Backup,SQL in Azure VM Backup,DPM,Azure Backup Agent”"Azure Virtual Machine Backup,SQL in Azure VM Backup,DPM,Azure Backup Agent"
ProtectionInfoListProtectionInfoList 此参数用于选择是仅包含受到积极保护的那些备份实例,还是也包含已停止受到保护的那些实例以及初始备份挂起的实例。Use this parameter to choose whether to include only those backup instances that are actively protected, or to also include those instances for which protection has been stopped and instances for which initial backup is pending. 支持的值为“Protected”、“ProtectionStopped”、“InitialBackupPending”或以逗号分隔的这些值的任意组合。Supported values are "Protected", "ProtectionStopped", "InitialBackupPending" or a comma-separated combination of any of these values. 默认情况下,此值为“*”,这使函数能够搜索所有备份实例,而不考虑保护详细信息。By default, the value is "*", which makes the function search for all backup instances irrespective of protection details. NN “Protected”"Protected"
DatasourceSetNameDatasourceSetName 此参数用于筛选特定父资源的函数输出。Use this parameter to filter the output of the function to a particular parent resource. 例如,要返回属于虚拟机“testvm”的 SQL in Azure VM 备份实例,请指定“testvm”作为此参数的值。For example, to return SQL in Azure VM backup instances belonging to the virtual machine "testvm", specify testvm as the value of this parameter. 默认情况下,此值为“*”,这使函数能够跨所有备份实例搜索记录。By default, the value is "*", which makes the function search for records across all backup instances. NN “testvm”"testvm"
BackupInstanceNameBackupInstanceName 此参数用于按名称搜索特定备份实例。Use this parameter to search for a particular backup instance by name. 默认情况下,此值为“*”,这使函数能够搜索所有备份实例。By default, the value is "*", which makes the function search for all backup instances. NN “testvm”"testvm"
DisplayAllFieldsDisplayAllFields 此参数用于选择是否仅检索函数返回的字段的子集。Use this parameter to choose whether to retrieve only a subset of the fields returned by the function. 如果此参数的值为 false,则函数将从函数输出中消除与存储和保留点相关的信息。If the value of this parameter is false, the function eliminates storage and retention point related information from the output of the function. 将此函数用作较大查询中的中间步骤,且需要通过消除不需要进行分析的列来优化查询性能时,此函数非常有用。This is useful if you are using this function as an intermediate step in a larger query and need to optimize the performance of the query by eliminating columns which you do not require for analysis. 默认情况下,此参数的值为 true,这使函数能够返回与备份实例相关的所有字段。By default, the value of this parameter is true, which makes the function return all fields pertaining to the backup instance. NN true

返回的字段Returned Fields

字段名称Field Name 说明Description
UniqueIdUniqueId 用于指示备份实例唯一 ID 的主键Primary key denoting unique ID of the backup instance
IDId 备份实例的 Azure 资源管理器 (ARM) IDAzure Resource Manager (ARM) ID of the backup instance
FriendlyNameFriendlyName 备份实例的友好名称Friendly name of the backup instance
ProtectionInfoProtectionInfo 有关备份实例保护设置的信息。Information about the protection settings of the backup instance. 例如,“protection configured”、“protection stopped”、“initial backup pending”For example, protection configured, protection stopped, initial backup pending
LatestRecoveryPointLatestRecoveryPoint 与备份实例关联的最新恢复点的日期和时间Date and time of the latest recovery point associated with the backup instance
OldestRecoveryPointOldestRecoveryPoint 与备份实例关联的最早恢复点的日期和时间Date and time of the oldest recovery point associated with the backup instance
SourceSizeInMBsSourceSizeInMBs 备份实例的前端大小 (MB)Frontend size of the backup instance in MBs
VaultStore_StorageConsumptionInMBsVaultStore_StorageConsumptionInMBs 保管库标准层中备份实例使用的云存储总量Total cloud storage consumed by the backup instance in the vault-standard tier
DataSourceFriendlyNameDataSourceFriendlyName 对应于备份实例的数据源的友好名称Friendly name of the datasource corresponding to the backup instance
BackupSolutionBackupSolution 备份实例与之关联的备份解决方案。Backup Solution that the backup instance is associated with. 例如,“Azure VM Backup”、“SQL in Azure VM Backup”等。For example, Azure VM Backup, SQL in Azure VM Backup, and so on.
DatasourceTypeDatasourceType 对应于备份实例的数据源的类型。Type of the datasource corresponding to the backup instance. 例如,“Microsoft.Compute/virtualMachines”For example "Microsoft.Compute/virtualMachines"
DatasourceResourceIdDatasourceResourceId 对应于备份实例的基础数据源的 Azure 资源管理器 (ARM) ID。Azure Resource Manager (ARM) ID of the underlying datasource corresponding to the backup instance. 例如,“VM 的 Azure 资源管理器 (ARM) ID”For example, Azure Resource Manager (ARM) ID of the VM
DatasourceSetFriendlyNameDatasourceSetFriendlyName 数据源父资源的友好名称(如果适用)。Friendly name of the parent resource of the datasource (wherever applicable). 例如,对于 SQL in Azure VM 数据源,此字段将包含存在 SQL 数据库的 VM 的名称For example, for a SQL in Azure VM datasource, this field will contain the name of the VM in which the SQL Database exists
DatasourceSetResourceIdDatasourceSetResourceId 数据源父资源的 Azure 资源管理器 (ARM) ID(如果适用)。Azure Resource Manager (ARM) ID of the parent resource of the datasource (wherever applicable). 例如,对于 SQL in Azure VM 数据源,此字段将包含存在 SQL 数据库的 VM 的 Azure 资源管理器 (ARM) IDFor example, for a SQL in Azure VM datasource, this field will contain the Azure Resource Manager (ARM) ID of the VM in which the SQL Database exists
DatasourceSetTypeDatasourceSetType 数据源父资源的类型(如果适用)。Type of the parent resource of the datasource (wherever applicable). 例如,对于 SAP HANA in Azure VM 数据源,此字段将为“Microsoft.Compute/virtualMachines”,因为父资源为 Azure VMFor example, for an SAP HANA in Azure VM datasource, this field will be Microsoft.Compute/virtualMachines since the parent resource is an Azure VM
PolicyNamePolicyName 与备份实例关联的策略名称Name of the policy associated with the backup instance
PolicyUniqueIdPolicyUniqueId 引用与备份实例关联的策略的外键Foreign key that refers to the policy associated with the backup instance
PolicyIdPolicyId 与备份实例关联的策略的 Azure 资源管理器 (ARM) IDAzure Resource Manager (ARM) ID of the policy associated with the backup instance
VaultResourceIdVaultResourceId 与备份实例关联的保管库的 Azure 资源管理器 (ARM) IDAzure Resource Manager (ARM) ID of the vault associated with the backup instance
VaultUniqueIdVaultUniqueId 引用与备份实例关联的保管库的外键Foreign key which refers to the vault associated with the backup instance
VaultNameVaultName 与备份实例关联的保管库的名称Name of the vault associated with the backup instance
VaultTagsVaultTags 与备份实例关联的保管库的标记Tags of the vault associated with the backup instance
VaultSubscriptionIdVaultSubscriptionId 与备份实例关联的保管库的订阅 IDSubscription ID of the vault associated with the backup instance
VaultLocationVaultLocation 与备份实例关联的保管库的位置Location of the vault associated with the backup instance
VaultStore_StorageReplicationTypeVaultStore_StorageReplicationType 与备份实例关联的保管库的存储复制类型Storage Replication Type of the vault associated with the backup instance
VaultTypeVaultType 保管库的类型,即“Microsoft.RecoveryServices/vaults”Type of the vault, which is "Microsoft.RecoveryServices/vaults"
TimeGeneratedTimeGenerated 记录的时间戳Timestamp of the record

_AzureBackup_GetBillingGroups()_AzureBackup_GetBillingGroups()

此函数可返回所有与备份相关的计费实体(计费组)的列表,以及有关关键计费组件的信息(如前端大小和云存储总量)。This function returns a list of all backup-related billing entities (billing groups) along with information on key billing components such as frontend size and total cloud storage.

ParametersParameters

参数名称Parameter Name 说明Description 必需?Required? 示例值Example value
RangeStartRangeStart 仅在以下情况下将此参数与 RangeEnd 参数一起使用:需要获取从 RangeStart 到 RangeEnd 的时间段内所有与计费组相关的记录。Use this parameter along with RangeEnd parameter only if you need to fetch all billing group related records in the time period from RangeStart to RangeEnd. 默认情况下,RangeStart 和 RangeEnd 的值为 null,这将使函数仅检索每个计费组的最新记录。By default, the value of RangeStart and RangeEnd are null, which will make the function retrieve only the latest record for each billing group. NN “2021-03-03 00:00:00”"2021-03-03 00:00:00"
RangeEndRangeEnd 仅在以下情况下将此参数与 RangeStart 参数一起使用:需要获取从 RangeStart 到 RangeEnd 的时间段内所有与计费组相关的记录。Use this parameter along with RangeStart parameter only if you need to fetch all billing group related records in the time period from RangeStart to RangeEnd. 默认情况下,RangeStart 和 RangeEnd 的值为 null,这将使函数仅检索每个计费组的最新记录。By default, the value of RangeStart and RangeEnd are null, which will make the function retrieve only the latest record for each billing group. NN “2021-03-10 00:00:00”"2021-03-10 00:00:00"
VaultSubscriptionListVaultSubscriptionList 此参数用于筛选存在备份数据的一组特定订阅的函数输出。Use this parameter to filter the output of the function for a certain set of subscriptions where backup data exists. 指定以逗号分隔的订阅 ID 列表作为此函数的参数有助于仅检索指定订阅中的那些计费组。Specifying a comma-separated list of subscription IDs as a parameter to this function helps you retrieve only those billing groups that are in the specified subscriptions. 默认情况下,此参数的值为“*”,这使函数能够跨所有订阅搜索记录。By default, the value of this parameter is '*', which makes the function search for records across all subscriptions. NN “00000000-0000-0000-0000-000000000000,11111111-1111-1111-1111-111111111111”"00000000-0000-0000-0000-000000000000,11111111-1111-1111-1111-111111111111"
VaultLocationListVaultLocationList 此参数用于筛选存在备份数据的一组特定区域的函数输出。Use this parameter to filter the output of the function for a certain set of regions where backup data exists. 指定以逗号分隔的区域列表作为此函数的参数有助于仅检索指定区域中的那些计费组。Specifying a comma-separated list of regions as a parameter to this function helps you retrieve only those billing groups that are in the specified regions. 默认情况下,此参数的值为“*”,这使函数能够跨所有区域搜索记录。By default, the value of this parameter is '*', which makes the function search for records across all regions. NN “chinanorth,chinanorth”"chinanorth,chinanorth"
VaultListVaultList 此参数用于筛选一组特定保管库的函数输出。Use this parameter to filter the output of the function for a certain set of vaults. 指定以逗号分隔的保管库名称列表作为此函数的参数有助于检索仅与指定保管库相关的备份实例记录。Specifying a comma-separated list of vault names as a parameter to this function helps you retrieve records of backup instances pertaining only to the specified vaults. 默认情况下,此参数的值为“*”,这使函数能够跨所有保管库搜索计费组记录。By default, the value of this parameter is '*', which makes the function search for records of billing groups across all vaults. NN “vault1,vault2,vault3”"vault1,vault2,vault3"
VaultTypeListVaultTypeList 此参数用于筛选与特定保管库类型相关的记录的函数输出。Use this parameter to filter the output of the function to records pertaining to a particular vault type. 目前唯一受支持的保管库类型为“Microsoft.RecoveryServices/vaults”,这是此参数的默认值。Currently the only supported vault type is "Microsoft.RecoveryServices/vaults", which is the default value of this parameter. NN “Microsoft.RecoveryServices/vaults”"Microsoft.RecoveryServices/vaults"
ExcludeLegacyEventExcludeLegacyEvent 此参数用于选择是否在旧 AzureDiagnostics 表中查询数据。Use this parameter to choose whether to query data in the legacy AzureDiagnostics table or not. 如果此参数的值为 false,则函数同时查询 AzureDiagnostics 表和特定于资源的表中的数据。If the value of this parameter is false, the function queries data from both the AzureDiagnostics table and the Resource specific tables. 如果此参数的值为 true,则函数仅查询特定于资源的表中的数据。If the value of this parameter is true, the function queries data from only the Resource specific tables. 默认值为 true。Default value is true. NN true
BackupSolutionListBackupSolutionList 此参数用于筛选 Azure 环境中使用的一组特定备份解决方案的函数输出。Use this parameter to filter the output of the function for a certain set of backup solutions used in your Azure environment. 例如,如果将“Azure Virtual Machine Backup,SQL in Azure VM Backup,DPM”指定为此参数的值,则函数仅返回与使用 Azure 虚拟机备份、Azure VM 备份中的 SQL 或用 DPM 备份到 Azure 备份的项相关的记录。For example, if you specify "Azure Virtual Machine Backup,SQL in Azure VM Backup,DPM" as the value of this parameter, the function only returns records that are related to items backed up using Azure Virtual Machine backup, SQL in Azure VM backup or DPM to Azure backup. 默认情况下,此参数的值为“*”,这使函数能够返回与备份报表支持的所有备份解决方案相关的记录(支持的值为“Azure Virtual Machine Backup”、“SQL in Azure VM Backup”、“SAP HANA in Azure VM Backup”、“Azure Storage (Azure Files) Backup”、“Azure Backup Agent”、“DPM”、“Azure Backup Server”或以逗号分隔的任意这些值的组合)。By default, the value of this parameter is '*', which makes the function return records pertaining to all backup solutions that are supported by Backup Reports (supported values are "Azure Virtual Machine Backup", "SQL in Azure VM Backup", "SAP HANA in Azure VM Backup", "Azure Storage (Azure Files) Backup", "Azure Backup Agent", "DPM", "Azure Backup Server" or a comma-separated combination of any of these values). NN “Azure Virtual Machine Backup,SQL in Azure VM Backup,DPM,Azure Backup Agent”"Azure Virtual Machine Backup,SQL in Azure VM Backup,DPM,Azure Backup Agent"
BillingGroupNameBillingGroupName 此参数用于按名称搜索特定计费组。Use this parameter to search for a particular billing group by name. 默认情况下,此值为“*”,这使函数能够搜索所有计费组。By default, the value is "*", which makes the function search for all billing groups. NN “testvm”"testvm"

返回的字段Returned Fields

字段名称Field Name 说明Description
UniqueIdUniqueId 用于指示计费组唯一 ID 的主键Primary key denoting unique ID of the billing group
FriendlyNameFriendlyName 计费组的友好名称Friendly name of the billing group
名称Name 计费组的名称Name of the billing group
类型Type 计费组的类型。Type of billing group. 例如,“ProtectedContainer”或“BackupItem”For example, ProtectedContainer or BackupItem
SourceSizeInMBsSourceSizeInMBs 计费组的前端大小 (MB)Frontend size of the billing group in MBs
VaultStore_StorageConsumptionInMBsVaultStore_StorageConsumptionInMBs 保管库标准层中计费组使用的云存储总量Total cloud storage consumed by the billing group in the vault-standard tier
BackupSolutionBackupSolution 计费组与之关联的备份解决方案。Backup Solution that the billing group is associated with. 例如,“Azure VM Backup”、“SQL in Azure VM Backup”等。For example, Azure VM Backup, SQL in Azure VM Backup, and so on.
VaultResourceIdVaultResourceId 与计费组关联的保管库的 Azure 资源管理器 (ARM) IDAzure Resource Manager (ARM) ID of the vault associated with the billing group
VaultUniqueIdVaultUniqueId 引用与计费组关联的保管库的外键Foreign key which refers to the vault associated with the billing group
VaultNameVaultName 与计费组关联的保管库的名称Name of the vault associated with the billing group
VaultTagsVaultTags 与计费组关联的保管库的标记Tags of the vault associated with the billing group
VaultSubscriptionIdVaultSubscriptionId 与计费组关联的保管库的订阅 IDSubscription ID of the vault associated with the billing group
VaultLocationVaultLocation 与计费组关联的保管库的位置Location of the vault associated with the billing group
VaultStore_StorageReplicationTypeVaultStore_StorageReplicationType 与计费组关联的保管库的存储复制类型Storage Replication Type of the vault associated with the billing group
VaultTypeVaultType 保管库的类型,即“Microsoft.RecoveryServices/vaults”Type of the vault, which is "Microsoft.RecoveryServices/vaults"
TimeGeneratedTimeGenerated 记录的时间戳Timestamp of the record
ExtendedPropertiesExtendedProperties 计费组的其他属性Additional properties of the billing group

趋势函数Trend Functions

_AzureBackup_GetBackupInstancesTrends()_AzureBackup_GetBackupInstancesTrends()

此函数可返回每个备份实例的历史记录,使你能够在多个粒度级别查看与备份实例计数和存储使用量相关的每日、每周和每月的关键趋势。This function returns historical records for each backup instance, allowing you to view key daily, weekly and monthly trends related to backup instance count and storage consumption, at multiple levels of granularity.

ParametersParameters

参数名称Parameter Name 说明Description 必需?Required? 示例值Example value
RangeStartRangeStart 在以下情况下将此参数与 RangeEnd 参数一起使用:检索从 RangeStart 到 RangeEnd 的时间段内所有与备份实例相关的记录。Use this parameter along with RangeEnd parameter to retrieve all backup instance related records in the time period from RangeStart to RangeEnd. YY “2021-03-03 00:00:00”"2021-03-03 00:00:00"
RangeEndRangeEnd 在以下情况下将此参数与 RangeStart 参数一起使用:检索从 RangeStart 到 RangeEnd 的时间段内所有与备份实例相关的记录。Use this parameter along with RangeStart parameter to retrieve all backup instance related records in the time period from RangeStart to RangeEnd. YY “2021-03-10 00:00:00”"2021-03-10 00:00:00"
VaultSubscriptionListVaultSubscriptionList 此参数用于筛选存在备份数据的一组特定订阅的函数输出。Use this parameter to filter the output of the function for a certain set of subscriptions where backup data exists. 指定以逗号分隔的订阅 ID 列表作为此函数的参数有助于仅检索指定订阅中的那些备份实例。Specifying a comma-separated list of subscription IDs as a parameter to this function helps you retrieve only those backup instances that are in the specified subscriptions. 默认情况下,此参数的值为“*”,这使函数能够跨所有订阅搜索记录。By default, the value of this parameter is '*', which makes the function search for records across all subscriptions. NN “00000000-0000-0000-0000-000000000000,11111111-1111-1111-1111-111111111111”"00000000-0000-0000-0000-000000000000,11111111-1111-1111-1111-111111111111"
VaultLocationListVaultLocationList 此参数用于筛选存在备份数据的一组特定区域的函数输出。Use this parameter to filter the output of the function for a certain set of regions where backup data exists. 指定以逗号分隔的区域列表作为此函数的参数有助于仅检索指定区域中的那些备份实例。Specifying a comma-separated list of regions as a parameter to this function helps you retrieve only those backup instances that are in the specified regions. 默认情况下,此参数的值为“*”,这使函数能够跨所有区域搜索记录。By default, the value of this parameter is '*', which makes the function search for records across all regions. NN “chinanorth,chinanorth”"chinanorth,chinanorth"
VaultListVaultList 此参数用于筛选一组特定保管库的函数输出。Use this parameter to filter the output of the function for a certain set of vaults. 指定以逗号分隔的保管库名称列表作为此函数的参数有助于检索仅与指定保管库相关的备份实例记录。Specifying a comma-separated list of vault names as a parameter to this function helps you retrieve records of backup instances pertaining only to the specified vaults. 默认情况下,此参数的值为“*”,这使函数能够跨所有保管库搜索备份实例记录。By default, the value of this parameter is '*', which makes the function search for records of backup instances across all vaults. NN “vault1,vault2,vault3”"vault1,vault2,vault3"
VaultTypeListVaultTypeList 此参数用于筛选与特定保管库类型相关的记录的函数输出。Use this parameter to filter the output of the function to records pertaining to a particular vault type. 目前唯一受支持的保管库类型为“Microsoft.RecoveryServices/vaults”,这是此参数的默认值。Currently the only supported vault type is "Microsoft.RecoveryServices/vaults", which is the default value of this parameter. NN “Microsoft.RecoveryServices/vaults”"Microsoft.RecoveryServices/vaults"
ExcludeLegacyEventExcludeLegacyEvent 此参数用于选择是否在旧 AzureDiagnostics 表中查询数据。Use this parameter to choose whether to query data in the legacy AzureDiagnostics table or not. 如果此参数的值为 false,则函数同时查询 AzureDiagnostics 表和特定于资源的表中的数据。If the value of this parameter is false, the function queries data from both the AzureDiagnostics table and the Resource specific tables. 如果此参数的值为 true,则函数仅查询特定于资源的表中的数据。If the value of this parameter is true, the function queries data from only the Resource specific tables. 默认值为 true。Default value is true. NN true
BackupSolutionListBackupSolutionList 此参数用于筛选 Azure 环境中使用的一组特定备份解决方案的函数输出。Use this parameter to filter the output of the function for a certain set of backup solutions used in your Azure environment. 例如,如果将“Azure Virtual Machine Backup,SQL in Azure VM Backup,DPM”指定为此参数的值,则函数仅返回与使用 Azure 虚拟机备份、Azure VM 备份中的 SQL 或用 DPM 备份到 Azure 备份的项相关的记录。For example, if you specify "Azure Virtual Machine Backup,SQL in Azure VM Backup,DPM" as the value of this parameter, the function only returns records that are related to items backed up using Azure Virtual Machine backup, SQL in Azure VM backup or DPM to Azure backup. 默认情况下,此参数的值为“*”,这使函数能够返回与备份报表支持的所有备份解决方案相关的记录(支持的值为“Azure Virtual Machine Backup”、“SQL in Azure VM Backup”、“SAP HANA in Azure VM Backup”、“Azure Storage (Azure Files) Backup”、“Azure Backup Agent”、“DPM”、“Azure Backup Server”或以逗号分隔的任意这些值的组合)。By default, the value of this parameter is '*', which makes the function return records pertaining to all backup solutions that are supported by Backup Reports (supported values are "Azure Virtual Machine Backup", "SQL in Azure VM Backup", "SAP HANA in Azure VM Backup", "Azure Storage (Azure Files) Backup", "Azure Backup Agent", "DPM", "Azure Backup Server" or a comma-separated combination of any of these values). NN “Azure Virtual Machine Backup,SQL in Azure VM Backup,DPM,Azure Backup Agent”"Azure Virtual Machine Backup,SQL in Azure VM Backup,DPM,Azure Backup Agent"
ProtectionInfoListProtectionInfoList 此参数用于选择是仅包含受到积极保护的那些备份实例,还是也包含已停止受到保护的那些实例以及初始备份挂起的实例。Use this parameter to choose whether to include only those backup instances that are actively protected, or to also include those instances for which protection has been stopped and instances for which initial backup is pending. 支持的值为“Protected”、“ProtectionStopped”、“InitialBackupPending”或以逗号分隔的这些值的任意组合。Supported values are "Protected", "ProtectionStopped", "InitialBackupPending" or a comma-separated combination of any of these values. 默认情况下,此值为“*”,这使函数能够搜索所有备份实例,而不考虑保护详细信息。By default, the value is "*", which makes the function search for all backup instances irrespective of protection details. NN “Protected”"Protected"
DatasourceSetNameDatasourceSetName 此参数用于筛选特定父资源的函数输出。Use this parameter to filter the output of the function to a particular parent resource. 例如,要返回属于虚拟机“testvm”的 SQL in Azure VM 备份实例,请指定“testvm”作为此参数的值。For example, to return SQL in Azure VM backup instances belonging to the virtual machine "testvm", specify testvm as the value of this parameter. 默认情况下,此值为“*”,这使函数能够跨所有备份实例搜索记录。By default, the value is "*", which makes the function search for records across all backup instances. NN “testvm”"testvm"
BackupInstanceNameBackupInstanceName 此参数用于按名称搜索特定备份实例。Use this parameter to search for a particular backup instance by name. 默认情况下,此值为“*”,这使函数能够搜索所有备份实例。By default, the value is "*", which makes the function search for all backup instances. NN “testvm”"testvm"
DisplayAllFieldsDisplayAllFields 此参数用于选择是否仅检索函数返回的字段的子集。Use this parameter to choose whether to retrieve only a subset of the fields returned by the function. 如果此参数的值为 false,则函数将从函数输出中消除与存储和保留点相关的信息。If the value of this parameter is false, the function eliminates storage and retention point related information from the output of the function. 将此函数用作较大查询中的中间步骤,且需要通过消除不需要进行分析的列来优化查询性能时,此函数非常有用。This is useful if you are using this function as an intermediate step in a larger query and need to optimize the performance of the query by eliminating columns which you do not require for analysis. 默认情况下,此参数的值为 true,这使函数能够返回与备份实例相关的所有字段。By default, the value of this parameter is true, which makes the function return all fields pertaining to the backup instance. NN true
AggregationTypeAggregationType 此参数用于指定应检索数据的时间粒度。Use this parameter to specify the time granularity at which data should be retrieved. 如果此参数的值为“Daily”,则函数将每天返回每个备份实例的记录,使你能够分析存储使用量和备份实例计数的每日趋势。If the value of this parameter is "Daily", the function returns a record per backup instance per day, allowing you to analyze daily trends of storage consumption and backup instance count. 如果此参数的值为“Weekly”,则函数将每周返回每个备份实例的记录,使你能够分析每周趋势。If the value of this parameter is "Weekly", the function returns a record per backup instance per week, allowing you to analyze weekly trends. 同样,可以指定“Monthly”以分析每月趋势。Similarly, you can specify "Monthly" to analyze monthly trends. 默认值为“Daily”。Default value is "Daily". 如果在更大的时间范围内查看数据,建议使用“Weekly”或“Monthly”,以提高查询性能并便于趋势分析。If you are viewing data across larger time ranges, it is recommended to use "Weekly" or "Monthly" for better query performance and ease of trend analysis. NN “Weekly”"Weekly"

返回的字段Returned Fields

字段名称Field Name 说明Description
UniqueIdUniqueId 用于指示备份实例唯一 ID 的主键Primary key denoting unique ID of the backup instance
IDId 备份实例的 Azure 资源管理器 (ARM) IDAzure Resource Manager (ARM) ID of the backup instance
FriendlyNameFriendlyName 备份实例的友好名称Friendly name of the backup instance
ProtectionInfoProtectionInfo 有关备份实例保护设置的信息。Information about the protection settings of the backup instance. 例如,“protection configured”、“protection stopped”、“initial backup pending”For example, protection configured, protection stopped, initial backup pending
LatestRecoveryPointLatestRecoveryPoint 与备份实例关联的最新恢复点的日期和时间Date and time of the latest recovery point associated with the backup instance
OldestRecoveryPointOldestRecoveryPoint 与备份实例关联的最早恢复点的日期和时间Date and time of the oldest recovery point associated with the backup instance
SourceSizeInMBsSourceSizeInMBs 备份实例的前端大小 (MB)Frontend size of the backup instance in MBs
VaultStore_StorageConsumptionInMBsVaultStore_StorageConsumptionInMBs 保管库标准层中备份实例使用的云存储总量Total cloud storage consumed by the backup instance in the vault-standard tier
DataSourceFriendlyNameDataSourceFriendlyName 对应于备份实例的数据源的友好名称Friendly name of the datasource corresponding to the backup instance
BackupSolutionBackupSolution 备份实例与之关联的备份解决方案。Backup Solution that the backup instance is associated with. 例如,“Azure VM Backup”、“SQL in Azure VM Backup”等。For example, Azure VM Backup, SQL in Azure VM Backup, and so on.
DatasourceTypeDatasourceType 对应于备份实例的数据源的类型。Type of the datasource corresponding to the backup instance. 例如,“Microsoft.Compute/virtualMachines”For example "Microsoft.Compute/virtualMachines"
DatasourceResourceIdDatasourceResourceId 对应于备份实例的基础数据源的 Azure 资源管理器 (ARM) ID。Azure Resource Manager (ARM) ID of the underlying datasource corresponding to the backup instance. 例如,“VM 的 Azure 资源管理器 (ARM) ID”For example, Azure Resource Manager (ARM) ID of the VM
DatasourceSetFriendlyNameDatasourceSetFriendlyName 数据源父资源的友好名称(如果适用)。Friendly name of the parent resource of the datasource (wherever applicable). 例如,对于 SQL in Azure VM 数据源,此字段将包含存在 SQL 数据库的 VM 的名称For example, for a SQL in Azure VM datasource, this field will contain the name of the VM in which the SQL Database exists
DatasourceSetResourceIdDatasourceSetResourceId 数据源父资源的 Azure 资源管理器 (ARM) ID(如果适用)。Azure Resource Manager (ARM) ID of the parent resource of the datasource (wherever applicable). 例如,对于 SQL in Azure VM 数据源,此字段将包含存在 SQL 数据库的 VM 的 Azure 资源管理器 (ARM) IDFor example, for a SQL in Azure VM datasource, this field will contain the Azure Resource Manager (ARM) ID of the VM in which the SQL Database exists
DatasourceSetTypeDatasourceSetType 数据源父资源的类型(如果适用)。Type of the parent resource of the datasource (wherever applicable). 例如,对于 SAP HANA in Azure VM 数据源,此字段将为“Microsoft.Compute/virtualMachines”,因为父资源为 Azure VMFor example, for an SAP HANA in Azure VM datasource, this field will be Microsoft.Compute/virtualMachines since the parent resource is an Azure VM
PolicyNamePolicyName 与备份实例关联的策略名称Name of the policy associated with the backup instance
PolicyUniqueIdPolicyUniqueId 引用与备份实例关联的策略的外键Foreign key that refers to the policy associated with the backup instance
PolicyIdPolicyId 与备份实例关联的策略的 Azure 资源管理器 (ARM) IDAzure Resource Manager (ARM) ID of the policy associated with the backup instance
VaultResourceIdVaultResourceId 与备份实例关联的保管库的 Azure 资源管理器 (ARM) IDAzure Resource Manager (ARM) ID of the vault associated with the backup instance
VaultUniqueIdVaultUniqueId 引用与备份实例关联的保管库的外键Foreign key which refers to the vault associated with the backup instance
VaultNameVaultName 与备份实例关联的保管库的名称Name of the vault associated with the backup instance
VaultTagsVaultTags 与备份实例关联的保管库的标记Tags of the vault associated with the backup instance
VaultSubscriptionIdVaultSubscriptionId 与备份实例关联的保管库的订阅 IDSubscription ID of the vault associated with the backup instance
VaultLocationVaultLocation 与备份实例关联的保管库的位置Location of the vault associated with the backup instance
VaultStore_StorageReplicationTypeVaultStore_StorageReplicationType 与备份实例关联的保管库的存储复制类型Storage Replication Type of the vault associated with the backup instance
VaultTypeVaultType 保管库的类型,即“Microsoft.RecoveryServices/vaults”Type of the vault, which is "Microsoft.RecoveryServices/vaults"
TimeGeneratedTimeGenerated 记录的时间戳Timestamp of the record

_AzureBackup_GetBillingGroupsTrends()_AzureBackup_GetBillingGroupsTrends()

此函数返回每个计费实体的历史记录,使你能够在多个粒度级别查看与前端大小计数和存储使用量相关的每日、每周和每月的关键趋势。This function returns historical records for each billing entity, allowing you to view key daily, weekly and monthly trends related to frontend size and storage consumption, at multiple levels of granularity.

ParametersParameters

参数名称Parameter Name 说明Description 必需?Required? 示例值Example value
RangeStartRangeStart 在以下情况下将此参数与 RangeEnd 参数一起使用:检索从 RangeStart 到 RangeEnd 的时间段内所有与计费组相关的记录。Use this parameter along with RangeEnd parameter to retrieve all billing group related records in the time period from RangeStart to RangeEnd. YY “2021-03-03 00:00:00”"2021-03-03 00:00:00"
RangeEndRangeEnd 在以下情况下将此参数与 RangeStart 参数一起使用:检索从 RangeStart 到 RangeEnd 的时间段内所有与计费组相关的记录。Use this parameter along with RangeStart parameter to retrieve all billing group related records in the time period from RangeStart to RangeEnd. YY “2021-03-10 00:00:00”"2021-03-10 00:00:00"
VaultSubscriptionListVaultSubscriptionList 此参数用于筛选存在备份数据的一组特定订阅的函数输出。Use this parameter to filter the output of the function for a certain set of subscriptions where backup data exists. 指定以逗号分隔的订阅 ID 列表作为此函数的参数有助于仅检索指定订阅中的那些计费组。Specifying a comma-separated list of subscription IDs as a parameter to this function helps you retrieve only those billing groups that are in the specified subscriptions. 默认情况下,此参数的值为“*”,这使函数能够跨所有订阅搜索记录。By default, the value of this parameter is '*', which makes the function search for records across all subscriptions. NN “00000000-0000-0000-0000-000000000000,11111111-1111-1111-1111-111111111111”"00000000-0000-0000-0000-000000000000,11111111-1111-1111-1111-111111111111"
VaultLocationListVaultLocationList 此参数用于筛选存在备份数据的一组特定区域的函数输出。Use this parameter to filter the output of the function for a certain set of regions where backup data exists. 指定以逗号分隔的区域列表作为此函数的参数有助于仅检索指定区域中的那些计费组。Specifying a comma-separated list of regions as a parameter to this function helps you retrieve only those billing groups that are in the specified regions. 默认情况下,此参数的值为“*”,这使函数能够跨所有区域搜索记录。By default, the value of this parameter is '*', which makes the function search for records across all regions. NN “chinanorth,chinanorth”"chinanorth,chinanorth"
VaultListVaultList 此参数用于筛选一组特定保管库的函数输出。Use this parameter to filter the output of the function for a certain set of vaults. 指定以逗号分隔的保管库名称列表作为此函数的参数有助于检索仅与指定保管库相关的备份实例记录。Specifying a comma-separated list of vault names as a parameter to this function helps you retrieve records of backup instances pertaining only to the specified vaults. 默认情况下,此参数的值为“*”,这使函数能够跨所有保管库搜索计费组记录。By default, the value of this parameter is '*', which makes the function search for records of billing groups across all vaults. NN “vault1,vault2,vault3”"vault1,vault2,vault3"
VaultTypeListVaultTypeList 此参数用于筛选与特定保管库类型相关的记录的函数输出。Use this parameter to filter the output of the function to records pertaining to a particular vault type. 目前唯一受支持的保管库类型为“Microsoft.RecoveryServices/vaults”,这是此参数的默认值。Currently the only supported vault type is "Microsoft.RecoveryServices/vaults", which is the default value of this parameter. NN “Microsoft.RecoveryServices/vaults”"Microsoft.RecoveryServices/vaults"
ExcludeLegacyEventExcludeLegacyEvent 此参数用于选择是否在旧 AzureDiagnostics 表中查询数据。Use this parameter to choose whether to query data in the legacy AzureDiagnostics table or not. 如果此参数的值为 false,则函数同时查询 AzureDiagnostics 表和特定于资源的表中的数据。If the value of this parameter is false, the function queries data from both the AzureDiagnostics table and the Resource specific tables. 如果此参数的值为 true,则函数仅查询特定于资源的表中的数据。If the value of this parameter is true, the function queries data from only the Resource specific tables. 默认值为 true。Default value is true. NN true
BackupSolutionListBackupSolutionList 此参数用于筛选 Azure 环境中使用的一组特定备份解决方案的函数输出。Use this parameter to filter the output of the function for a certain set of backup solutions used in your Azure environment. 例如,如果将“Azure Virtual Machine Backup,SQL in Azure VM Backup,DPM”指定为此参数的值,则函数仅返回与使用 Azure 虚拟机备份、Azure VM 备份中的 SQL 或用 DPM 备份到 Azure 备份的项相关的记录。For example, if you specify "Azure Virtual Machine Backup,SQL in Azure VM Backup,DPM" as the value of this parameter, the function only returns records that are related to items backed up using Azure Virtual Machine backup, SQL in Azure VM backup or DPM to Azure backup. 默认情况下,此参数的值为“*”,这使函数能够返回与备份报表支持的所有备份解决方案相关的记录(支持的值为“Azure Virtual Machine Backup”、“SQL in Azure VM Backup”、“SAP HANA in Azure VM Backup”、“Azure Storage (Azure Files) Backup”、“Azure Backup Agent”、“DPM”、“Azure Backup Server”或以逗号分隔的任意这些值的组合)。By default, the value of this parameter is '*', which makes the function return records pertaining to all backup solutions that are supported by Backup Reports (supported values are "Azure Virtual Machine Backup", "SQL in Azure VM Backup", "SAP HANA in Azure VM Backup", "Azure Storage (Azure Files) Backup", "Azure Backup Agent", "DPM", "Azure Backup Server" or a comma-separated combination of any of these values). NN “Azure Virtual Machine Backup,SQL in Azure VM Backup,DPM,Azure Backup Agent”"Azure Virtual Machine Backup,SQL in Azure VM Backup,DPM,Azure Backup Agent"
BillingGroupNameBillingGroupName 此参数用于按名称搜索特定计费组。Use this parameter to search for a particular billing group by name. 默认情况下,此值为“*”,这使函数能够搜索所有计费组。By default, the value is "*", which makes the function search for all billing groups. NN “testvm”"testvm"
AggregationTypeAggregationType 此参数用于指定应检索数据的时间粒度。Use this parameter to specify the time granularity at which data should be retrieved. 如果此参数的值为“Daily”,则函数将每天返回每个计费组的记录,使你能够分析存储使用量和前端大小的每日趋势。If the value of this parameter is "Daily", the function returns a record per billing group per day, allowing you to analyze daily trends of storage consumption and frontend size. 如果此参数的值为“Weekly”,则函数将每周返回每个备份实例的记录,使你能够分析每周趋势。If the value of this parameter is "Weekly", the function returns a record per backup instance per week, allowing you to analyze weekly trends. 同样,可以指定“Monthly”以分析每月趋势。Similarly, you can specify "Monthly" to analyze monthly trends. 默认值为“Daily”。Default value is "Daily". 如果在更大的时间范围内查看数据,建议使用“Weekly”或“Monthly”,以提高查询性能并便于趋势分析。If you are viewing data across larger time ranges, it is recommended to use "Weekly" or "Monthly" for better query performance and ease of trend analysis. NN “Weekly”"Weekly"

返回的字段Returned Fields

字段名称Field Name 说明Description
UniqueIdUniqueId 用于指示计费组唯一 ID 的主键Primary key denoting unique ID of the billing group
FriendlyNameFriendlyName 计费组的友好名称Friendly name of the billing group
名称Name 计费组的名称Name of the billing group
类型Type 计费组的类型。Type of billing group. 例如,“ProtectedContainer”或“BackupItem”For example, ProtectedContainer or BackupItem
SourceSizeInMBsSourceSizeInMBs 计费组的前端大小 (MB)Frontend size of the billing group in MBs
VaultStore_StorageConsumptionInMBsVaultStore_StorageConsumptionInMBs 保管库标准层中计费组使用的云存储总量Total cloud storage consumed by the billing group in the vault-standard tier
BackupSolutionBackupSolution 计费组与之关联的备份解决方案。Backup Solution that the billing group is associated with. 例如,“Azure VM Backup”、“SQL in Azure VM Backup”等。For example, Azure VM Backup, SQL in Azure VM Backup, and so on.
VaultResourceIdVaultResourceId 与计费组关联的保管库的 Azure 资源管理器 (ARM) IDAzure Resource Manager (ARM) ID of the vault associated with the billing group
VaultUniqueIdVaultUniqueId 引用与计费组关联的保管库的外键Foreign key which refers to the vault associated with the billing group
VaultNameVaultName 与计费组关联的保管库的名称Name of the vault associated with the billing group
VaultTagsVaultTags 与计费组关联的保管库的标记Tags of the vault associated with the billing group
VaultSubscriptionIdVaultSubscriptionId 与计费组关联的保管库的订阅 IDSubscription ID of the vault associated with the billing group
VaultLocationVaultLocation 与计费组关联的保管库的位置Location of the vault associated with the billing group
VaultStore_StorageReplicationTypeVaultStore_StorageReplicationType 与计费组关联的保管库的存储复制类型Storage Replication Type of the vault associated with the billing group
VaultTypeVaultType 保管库的类型,即“Microsoft.RecoveryServices/vaults”Type of the vault, which is "Microsoft.RecoveryServices/vaults"
TimeGeneratedTimeGenerated 记录的时间戳Timestamp of the record
ExtendedPropertiesExtendedProperties 计费组的其他属性Additional properties of the billing group

示例查询Sample Queries

下面的这些示例查询可以帮助你开始使用系统函数。Below are some sample queries to help you get started with using system functions.

  • 给定时间范围内所有失败的 Azure VM 备份作业All failed Azure VM backup jobs in a given time range

    _AzureBackup_GetJobs("2021-03-05", "2021-03-06") //call function with RangeStart and RangeEnd parameters set, and other parameters with default value
    | where BackupSolution=="Azure Virtual Machine Backup" and Status=="Failed"
    | project BackupInstanceFriendlyName, BackupInstanceId, OperationCategory, Status,  JobStartDateTime=StartTime, JobDuration=DurationInSecs/3600, ErrorTitle, DataTransferred=DataTransferredInMBs
    
  • 给定时间范围内的所有 SQL 日志备份作业All SQL log backup jobs in a given time range

    _AzureBackup_GetJobs("2021-03-05", "2021-03-06","*","*","*","*",true,"*","*","*","*","*","*",false) //call function with RangeStart and RangeEnd parameters set, ExcludeLog parameter as false, and other parameters with default value
    | where BackupSolution=="SQL in Azure VM Backup" and Operation=="Log"
    | project BackupInstanceFriendlyName, BackupInstanceId, OperationCategory, Status,  JobStartDateTime=StartTime, JobDuration=DurationInSecs/3600, ErrorTitle, DataTransferred=DataTransferredInMBs
    
  • VM“testvm”使用的备份存储的每周趋势Weekly trend of backup storage consumed for VM "testvm"

    _AzureBackup_GetBackupInstancesTrends("2021-01-01", "2021-03-06","*","*","*","*",false,"*","*","*","*",true, "Weekly") //call function with RangeStart and RangeEnd parameters set, AggregationType parameter as Weekly, and other parameters with default value
    | where BackupSolution == "Azure Virtual Machine Backup"
    | where FriendlyName == "testvm"
    | project TimeGenerated, VaultStore_StorageConsumptionInMBs
    | render timechart 
    

后续步骤Next steps

详细了解备份报告Learn more about Backup Reports