Configurations - Create In Resource Group
建立/覆寫 Azure Advisor 設定。
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Advisor/configurations/default?api-version=2023-01-01
URI 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
configuration
|
path | True |
Advisor 組態名稱。 值必須是 'default' |
|
resource
|
path | True |
string |
Azure 資源群組的名稱。 |
subscription
|
path | True |
string |
Azure 訂用帳戶標識碼。 |
api-version
|
query | True |
string |
要與用戶端要求搭配使用的 API 版本。 |
要求本文
名稱 | 類型 | Description |
---|---|---|
properties.digests |
Advisor 摘要設定。 僅適用於訂用帳戶 |
|
properties.duration |
Advisor 低 CPU 使用率評估的最小持續時間。 僅適用於訂用帳戶。 有效值:7(預設值)、14、21、30、60 或 90。 |
|
properties.exclude |
boolean |
從 Advisor 評估中排除資源。 有效值:False (預設值) 或 True。 |
properties.lowCpuThreshold |
Advisor 低 CPU 使用率評估的最小百分比閾值。 僅適用於訂用帳戶。 有效值:5 (預設值)、10、15 或 20。 |
回應
名稱 | 類型 | Description |
---|---|---|
200 OK |
已成功建立/覆寫組態。 |
|
Other Status Codes |
描述作業失敗原因的錯誤回應。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow。
類型:
oauth2
Flow:
implicit
授權 URL:
https://login.microsoftonline.com/common/oauth2/authorize
範圍
名稱 | Description |
---|---|
user_impersonation | 模擬您的用戶帳戶 |
範例
PutConfigurations
範例要求
PUT https://management.azure.com/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Advisor/configurations/default?api-version=2023-01-01
{
"properties": {
"lowCpuThreshold": "5",
"duration": "7",
"exclude": true,
"digests": [
{
"name": "digestConfigName",
"actionGroupResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/microsoft.insights/actionGroups/actionGroupName",
"frequency": 30,
"categories": [
"HighAvailability",
"Security",
"Performance",
"Cost",
"OperationalExcellence"
],
"language": "en",
"state": "Active"
}
]
}
}
範例回覆
{
"id": "/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Advisor/configurations/v2/default",
"type": "Microsoft.Advisor/configurations",
"name": "default",
"properties": {
"lowCpuThreshold": "5",
"duration": "7",
"exclude": true,
"digests": [
{
"name": "digestConfigName",
"actionGroupResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/microsoft.insights/actionGroups/actionGroupName",
"frequency": 30,
"categories": [
"HighAvailability",
"Security",
"Performance",
"Cost",
"OperationalExcellence"
],
"language": "en",
"state": "Active"
}
]
}
}
定義
名稱 | Description |
---|---|
Arm |
|
ARMError |
ARM 錯誤回應本文。 |
Category |
要傳送摘要的類別。 如果未提供類別,則會針對所有類別傳送摘要。 |
Config |
Advisor 設定數據結構。 |
Configuration |
Advisor 組態名稱。 值必須是 'default' |
Cpu |
Advisor 低 CPU 使用率評估的最小百分比閾值。 僅適用於訂用帳戶。 有效值:5 (預設值)、10、15 或 20。 |
created |
建立資源的身分識別類型。 |
Digest |
Advisor Digest 設定實體 |
Digest |
摘要組態的狀態。 |
Duration |
Advisor 低 CPU 使用率評估的最小持續時間。 僅適用於訂用帳戶。 有效值:7(預設值)、14、21、30、60 或 90。 |
system |
與建立和上次修改資源相關的元數據。 |
ArmErrorResponse
名稱 | 類型 | Description |
---|---|---|
error |
ARM 錯誤回應本文。 |
ARMErrorResponseBody
ARM 錯誤回應本文。
名稱 | 類型 | Description |
---|---|---|
code |
string |
取得或設定字串,這個字串可用來以程式設計方式識別錯誤。 |
message |
string |
取得或設定字串,詳細說明錯誤並提供偵錯資訊。 |
Category
要傳送摘要的類別。 如果未提供類別,則會針對所有類別傳送摘要。
值 | Description |
---|---|
Cost | |
HighAvailability | |
OperationalExcellence | |
Performance | |
Security |
ConfigData
Advisor 設定數據結構。
名稱 | 類型 | Description |
---|---|---|
id |
string (arm-id) |
資源的完整資源標識碼。 例如 “/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}” |
name |
string |
資源的名稱 |
properties.digests |
Advisor 摘要設定。 僅適用於訂用帳戶 |
|
properties.duration |
Advisor 低 CPU 使用率評估的最小持續時間。 僅適用於訂用帳戶。 有效值:7(預設值)、14、21、30、60 或 90。 |
|
properties.exclude |
boolean |
從 Advisor 評估中排除資源。 有效值:False (預設值) 或 True。 |
properties.lowCpuThreshold |
Advisor 低 CPU 使用率評估的最小百分比閾值。 僅適用於訂用帳戶。 有效值:5 (預設值)、10、15 或 20。 |
|
systemData |
包含 createdBy 和 modifiedBy 資訊的 Azure Resource Manager 元數據。 |
|
type |
string |
資源的型別。 例如“Microsoft.Compute/virtualMachines” 或 “Microsoft.Storage/storageAccounts” |
ConfigurationName
Advisor 組態名稱。 值必須是 'default'
值 | Description |
---|---|
default |
CpuThreshold
Advisor 低 CPU 使用率評估的最小百分比閾值。 僅適用於訂用帳戶。 有效值:5 (預設值)、10、15 或 20。
值 | Description |
---|---|
10 | |
15 | |
20 | |
5 |
createdByType
建立資源的身分識別類型。
值 | Description |
---|---|
Application | |
Key | |
ManagedIdentity | |
User |
DigestConfig
Advisor Digest 設定實體
名稱 | 類型 | Description |
---|---|---|
actionGroupResourceId |
string |
摘要所使用的動作群組資源標識碼。 |
categories |
Category[] |
要傳送摘要的類別。 如果未提供類別,則會針對所有類別傳送摘要。 |
frequency |
integer (int32) |
摘要會以天為單位觸發的頻率。 值必須介於 7 到 30 天之間。 |
language |
string |
摘要內容本文的語言。 值必須是其中一種 Azure 入口網站支持語言的 ISO 639-1 程式代碼。 否則,它會轉換成一個。 預設值為英文(en)。 |
name |
string |
摘要組態的名稱。 值不區分大小寫,而且在訂用帳戶內必須是唯一的。 |
state |
摘要組態的狀態。 |
DigestConfigState
摘要組態的狀態。
值 | Description |
---|---|
Active | |
Disabled |
Duration
Advisor 低 CPU 使用率評估的最小持續時間。 僅適用於訂用帳戶。 有效值:7(預設值)、14、21、30、60 或 90。
值 | Description |
---|---|
14 | |
21 | |
30 | |
60 | |
7 | |
90 |
systemData
與建立和上次修改資源相關的元數據。
名稱 | 類型 | Description |
---|---|---|
createdAt |
string (date-time) |
資源建立的時間戳(UTC)。 |
createdBy |
string |
建立資源的身分識別。 |
createdByType |
建立資源的身分識別類型。 |
|
lastModifiedAt |
string (date-time) |
上次修改的資源時間戳 (UTC) |
lastModifiedBy |
string |
上次修改資源的身分識別。 |
lastModifiedByType |
上次修改資源的身分識別類型。 |