Configurations - Create In Resource Group
Create/Overwrite Azure Advisor configuration.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Advisor/configurations/default?api-version=2023-01-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
configuration
|
path | True |
Advisor configuration name. Value must be 'default' |
|
resource
|
path | True |
string |
The name of the Azure resource group. |
subscription
|
path | True |
string |
The Azure subscription ID. |
api-version
|
query | True |
string |
The version of the API to be used with the client request. |
Request Body
Name | Type | Description |
---|---|---|
properties.digests |
Advisor digest configuration. Valid only for subscriptions |
|
properties.duration |
Minimum duration for Advisor low CPU utilization evaluation. Valid only for subscriptions. Valid values: 7 (default), 14, 21, 30, 60 or 90. |
|
properties.exclude |
boolean |
Exclude the resource from Advisor evaluations. Valid values: False (default) or True. |
properties.lowCpuThreshold |
Minimum percentage threshold for Advisor low CPU utilization evaluation. Valid only for subscriptions. Valid values: 5 (default), 10, 15 or 20. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Successfully created/overwrote configuration. |
|
Other Status Codes |
Error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
PutConfigurations
Sample request
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"
}
]
}
}
Sample response
{
"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"
}
]
}
}
Definitions
Name | Description |
---|---|
Arm |
|
ARMError |
ARM error response body. |
Category |
Categories to send digest for. If categories are not provided, then digest will be sent for all categories. |
Config |
The Advisor configuration data structure. |
Configuration |
Advisor configuration name. Value must be 'default' |
Cpu |
Minimum percentage threshold for Advisor low CPU utilization evaluation. Valid only for subscriptions. Valid values: 5 (default), 10, 15 or 20. |
created |
The type of identity that created the resource. |
Digest |
Advisor Digest configuration entity |
Digest |
State of digest configuration. |
Duration |
Minimum duration for Advisor low CPU utilization evaluation. Valid only for subscriptions. Valid values: 7 (default), 14, 21, 30, 60 or 90. |
system |
Metadata pertaining to creation and last modification of the resource. |
ArmErrorResponse
Name | Type | Description |
---|---|---|
error |
ARM error response body. |
ARMErrorResponseBody
ARM error response body.
Name | Type | Description |
---|---|---|
code |
string |
Gets or sets the string that can be used to programmatically identify the error. |
message |
string |
Gets or sets the string that describes the error in detail and provides debugging information. |
Category
Categories to send digest for. If categories are not provided, then digest will be sent for all categories.
Name | Type | Description |
---|---|---|
Cost |
string |
|
HighAvailability |
string |
|
OperationalExcellence |
string |
|
Performance |
string |
|
Security |
string |
ConfigData
The Advisor configuration data structure.
Name | Type | Description |
---|---|---|
id |
string |
Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
name |
string |
The name of the resource |
properties.digests |
Advisor digest configuration. Valid only for subscriptions |
|
properties.duration |
Minimum duration for Advisor low CPU utilization evaluation. Valid only for subscriptions. Valid values: 7 (default), 14, 21, 30, 60 or 90. |
|
properties.exclude |
boolean |
Exclude the resource from Advisor evaluations. Valid values: False (default) or True. |
properties.lowCpuThreshold |
Minimum percentage threshold for Advisor low CPU utilization evaluation. Valid only for subscriptions. Valid values: 5 (default), 10, 15 or 20. |
|
systemData |
Azure Resource Manager metadata containing createdBy and modifiedBy information. |
|
type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
ConfigurationName
Advisor configuration name. Value must be 'default'
Name | Type | Description |
---|---|---|
default |
string |
CpuThreshold
Minimum percentage threshold for Advisor low CPU utilization evaluation. Valid only for subscriptions. Valid values: 5 (default), 10, 15 or 20.
Name | Type | Description |
---|---|---|
10 |
string |
|
15 |
string |
|
20 |
string |
|
5 |
string |
createdByType
The type of identity that created the resource.
Name | Type | Description |
---|---|---|
Application |
string |
|
Key |
string |
|
ManagedIdentity |
string |
|
User |
string |
DigestConfig
Advisor Digest configuration entity
Name | Type | Description |
---|---|---|
actionGroupResourceId |
string |
Action group resource id used by digest. |
categories |
Category[] |
Categories to send digest for. If categories are not provided, then digest will be sent for all categories. |
frequency |
integer |
Frequency that digest will be triggered, in days. Value must be between 7 and 30 days inclusive. |
language |
string |
Language for digest content body. Value must be ISO 639-1 code for one of Azure portal supported languages. Otherwise, it will be converted into one. Default value is English (en). |
name |
string |
Name of digest configuration. Value is case-insensitive and must be unique within a subscription. |
state |
State of digest configuration. |
DigestConfigState
State of digest configuration.
Name | Type | Description |
---|---|---|
Active |
string |
|
Disabled |
string |
Duration
Minimum duration for Advisor low CPU utilization evaluation. Valid only for subscriptions. Valid values: 7 (default), 14, 21, 30, 60 or 90.
Name | Type | Description |
---|---|---|
14 |
string |
|
21 |
string |
|
30 |
string |
|
60 |
string |
|
7 |
string |
|
90 |
string |
systemData
Metadata pertaining to creation and last modification of the resource.
Name | Type | Description |
---|---|---|
createdAt |
string |
The timestamp of resource creation (UTC). |
createdBy |
string |
The identity that created the resource. |
createdByType |
The type of identity that created the resource. |
|
lastModifiedAt |
string |
The timestamp of resource last modification (UTC) |
lastModifiedBy |
string |
The identity that last modified the resource. |
lastModifiedByType |
The type of identity that last modified the resource. |