Metrics Configurations - Create Or Update
创建或更新群集的指标配置。
创建新的或更新提供的群集的现有指标配置。
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations/{metricsConfigurationName}?api-version=2023-07-01
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
cluster
|
path | True |
string pattern: ^([a-zA-Z0-9][a-zA-Z0-9-_]{0,28}[a-zA-Z0-9])$ |
群集的名称。 |
metrics
|
path | True |
string pattern: ^default$ |
群集的指标配置的名称。 |
resource
|
path | True |
string minLength: 1maxLength: 90 |
资源组的名称。 名称不区分大小写。 |
subscription
|
path | True |
string (uuid) |
目标订阅的 ID。 该值必须是 UUID。 |
api-version
|
query | True |
string minLength: 1 |
用于此作的 API 版本。 |
请求正文
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
extendedLocation | True |
ExtendedLocation 表示将在其中创建资源的 Azure 自定义位置。 |
|
location | True |
string |
资源所在的地理位置 |
properties.collectionInterval | True |
integer (int64) minimum: 1maximum: 1440 |
将收集指标的间隔(以分钟为单位)。 |
properties.enabledMetrics |
string[] |
除了启用的核心指标集外,已选择启用的指标名称列表。 |
|
tags |
object |
资源标记。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
还行 |
|
201 Created |
创建 标头 Azure-AsyncOperation: string |
|
Other Status Codes |
描述作失败的原因的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow。
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
名称 | 说明 |
---|---|
user_impersonation | 模拟用户帐户 |
示例
Create or update metrics configuration of cluster
示例请求
PUT https://management.azure.com/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName/metricsConfigurations/default?api-version=2023-07-01
{
"location": "location",
"tags": {
"key1": "myvalue1",
"key2": "myvalue2"
},
"extendedLocation": {
"type": "CustomLocation",
"name": "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"
},
"properties": {
"enabledMetrics": [
"metric1",
"metric2"
],
"collectionInterval": 15
}
}
示例响应
{
"id": "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName/metricsConfigurations/default",
"name": "default",
"systemData": {
"createdAt": "2021-01-22T13:27:03.008Z",
"createdBy": "identityA",
"createdByType": "Application",
"lastModifiedAt": "2021-01-22T13:29:03.001Z",
"lastModifiedBy": "identityB",
"lastModifiedByType": "User"
},
"type": "Microsoft.NetworkCloud/clusters/metricsConfigurations",
"location": "location",
"tags": {
"key1": "myvalue1",
"key2": "myvalue2"
},
"extendedLocation": {
"type": "CustomLocation",
"name": "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"
},
"properties": {
"enabledMetrics": [
"metric1",
"metric2"
],
"collectionInterval": 15,
"provisioningState": "Succeeded",
"disabledMetrics": [
"metric3",
"metric4"
],
"detailedStatus": "Applied",
"detailedStatusMessage": "Metrics configuration has been successfully applied to all resources."
}
}
Azure-AsyncOperation: https://management.azure.com/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/locations/location/operationStatuses/operationId?api-version=2023-07-01
{
"id": "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName/metricsConfigurations/default",
"name": "default",
"systemData": {
"createdAt": "2021-01-22T13:27:03.008Z",
"createdBy": "identityA",
"createdByType": "Application",
"lastModifiedAt": "2021-01-22T13:29:03.001Z",
"lastModifiedBy": "identityB",
"lastModifiedByType": "User"
},
"type": "Microsoft.NetworkCloud/clusters/metricsConfigurations",
"location": "location",
"tags": {
"key1": "myvalue1",
"key2": "myvalue2"
},
"extendedLocation": {
"type": "CustomLocation",
"name": "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"
},
"properties": {
"enabledMetrics": [
"metric1",
"metric2"
],
"collectionInterval": 15,
"provisioningState": "Accepted",
"disabledMetrics": [
"metric3",
"metric4"
],
"detailedStatus": "Applied",
"detailedStatusMessage": "Metrics configuration has been successfully applied to all resources."
}
}
定义
名称 | 说明 |
---|---|
Cluster |
ClusterMetricsConfiguration 表示本地网络云群集的指标配置。 |
Cluster |
指标配置的更详细状态。 |
Cluster |
指标配置的预配状态。 |
created |
创建资源的标识的类型。 |
Error |
资源管理错误附加信息。 |
Error |
错误详细信息。 |
Error |
错误响应 |
Extended |
ExtendedLocation 表示将在其中创建资源的 Azure 自定义位置。 |
system |
与创建和上次修改资源相关的元数据。 |
ClusterMetricsConfiguration
ClusterMetricsConfiguration 表示本地网络云群集的指标配置。
名称 | 类型 | 说明 |
---|---|---|
extendedLocation |
ExtendedLocation 表示将在其中创建资源的 Azure 自定义位置。 |
|
id |
string (arm-id) |
资源的完全限定资源 ID。 例如“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}” |
location |
string |
资源所在的地理位置 |
name |
string |
资源的名称 |
properties.collectionInterval |
integer (int64) minimum: 1maximum: 1440 |
将收集指标的间隔(以分钟为单位)。 |
properties.detailedStatus |
指标配置的更详细状态。 |
|
properties.detailedStatusMessage |
string |
有关当前详细状态的描述性消息。 |
properties.disabledMetrics |
string[] |
可用于群集但目前已禁用的指标列表。 |
properties.enabledMetrics |
string[] |
除了启用的核心指标集外,已选择启用的指标名称列表。 |
properties.provisioningState |
指标配置的预配状态。 |
|
systemData |
包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。 |
|
tags |
object |
资源标记。 |
type |
string |
资源的类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts” |
ClusterMetricsConfigurationDetailedStatus
指标配置的更详细状态。
值 | 说明 |
---|---|
Applied | |
Error | |
Processing |
ClusterMetricsConfigurationProvisioningState
指标配置的预配状态。
值 | 说明 |
---|---|
Accepted | |
Canceled | |
Failed | |
Provisioning | |
Succeeded |
createdByType
创建资源的标识的类型。
值 | 说明 |
---|---|
Application | |
Key | |
ManagedIdentity | |
User |
ErrorAdditionalInfo
资源管理错误附加信息。
名称 | 类型 | 说明 |
---|---|---|
info |
object |
其他信息。 |
type |
string |
其他信息类型。 |
ErrorDetail
错误详细信息。
名称 | 类型 | 说明 |
---|---|---|
additionalInfo |
错误附加信息。 |
|
code |
string |
错误代码。 |
details |
错误详细信息。 |
|
message |
string |
错误消息。 |
target |
string |
错误目标。 |
ErrorResponse
错误响应
名称 | 类型 | 说明 |
---|---|---|
error |
错误对象。 |
ExtendedLocation
ExtendedLocation 表示将在其中创建资源的 Azure 自定义位置。
名称 | 类型 | 说明 |
---|---|---|
name |
string |
要在其中创建资源的扩展位置的资源 ID。 |
type |
string |
扩展的位置类型,例如 CustomLocation。 |
systemData
与创建和上次修改资源相关的元数据。
名称 | 类型 | 说明 |
---|---|---|
createdAt |
string (date-time) |
资源创建时间戳(UTC)。 |
createdBy |
string |
创建资源的标识。 |
createdByType |
创建资源的标识的类型。 |
|
lastModifiedAt |
string (date-time) |
上次修改的资源时间戳(UTC) |
lastModifiedBy |
string |
上次修改资源的标识。 |
lastModifiedByType |
上次修改资源的标识的类型。 |