你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Metric Namespaces - List

Lists资源的指标命名空间。

GET https://management.azure.com/{resourceUri}/providers/microsoft.insights/metricNamespaces?api-version=2017-12-01-preview
GET https://management.azure.com/{resourceUri}/providers/microsoft.insights/metricNamespaces?api-version=2017-12-01-preview&startTime={startTime}

URI 参数

名称 必需 类型 说明
resourceUri
path True

string

资源的标识符。

api-version
query True

string

要用于此操作的 API 版本。

startTime
query

string

ISO 8601 符合查询指标命名空间的日期开始时间。

响应

名称 类型 说明
200 OK

MetricNamespaceCollection

获取指标命名空间列表的请求成功

Other Status Codes

ErrorResponse

描述操作失败原因的错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 流

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名称 说明
user_impersonation 模拟用户帐户

示例

Get Metric Namespaces without filter

Sample Request

GET https://management.azure.com/subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricNamespaces?api-version=2017-12-01-preview&startTime=2020-08-31T15:53:00Z

Sample Response

{
  "value": [
    {
      "id": "/subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricNamespaces/Azure.ApplicationInsights",
      "name": "Azure.ApplicationInsights",
      "type": "Microsoft.Insights/metricNamespaces",
      "classification": "Custom",
      "properties": {
        "metricNamespaceName": "Azure.ApplicationInsights"
      }
    },
    {
      "id": "/subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricNamespaces/microsoft.insights-components",
      "name": "microsoft.insights-components",
      "type": "Microsoft.Insights/metricNamespaces",
      "classification": "Platform",
      "properties": {
        "metricNamespaceName": "microsoft.insights/components"
      }
    }
  ]
}

定义

名称 说明
ErrorResponse

描述错误响应的格式。

MetricNamespace

指标命名空间类指定指标命名空间的元数据。

MetricNamespaceCollection

表示指标命名空间的集合。

MetricNamespaceName

完全限定的指标命名空间名称。

NamespaceClassification

命名空间类型

ErrorResponse

描述错误响应的格式。

名称 类型 说明
code

string

错误代码

message

string

指示操作失败原因的错误消息。

MetricNamespace

指标命名空间类指定指标命名空间的元数据。

名称 类型 说明
classification

NamespaceClassification

命名空间类型

id

string

指标命名空间的 ID。

name

string

命名空间的转义名称。

properties

MetricNamespaceName

包含完全限定命名空间名称的属性。

type

string

命名空间的类型。

MetricNamespaceCollection

表示指标命名空间的集合。

名称 类型 说明
value

MetricNamespace[]

指标命名空间的值。

MetricNamespaceName

完全限定的指标命名空间名称。

名称 类型 说明
metricNamespaceName

string

指标命名空间名称。

NamespaceClassification

命名空间类型

名称 类型 说明
Custom

string

Platform

string

Qos

string