2.8.3 Creating User Profile
This API creates a user profile.
Execution permission
Admin, Modify
API version
v1
Request format
POST http[s]://host:port/Analytics/version/objects/UserThresholdProfiles
Request body
The structure of the request body and the object attributes are as follows:{ "profileName":"...", "description":"...", "resourceType":"...", "profileType":"...", "thresholdValues":[{ "monitoring":"...", "metricType":"...", "pluginMetricType":"...", "displayName":"...", "unit":"...", "proportion":"...", "thresholdValueOfWarning":"...", "thresholdValueOfError":"...", "stepSize":"...", "max":"...", "min":"..." }, : ] }
UserThresholdProfile (Type: UserThresholdProfile)
Attribute |
Type |
Description |
---|---|---|
profileName |
string |
User profile name. Use 128 or fewer characters. |
description |
string |
Description of the user profile. Use 256 or fewer characters. |
resourceType |
string |
Resource type to which the user profile can be applied. The following value can be specified. ・VM: Virtual machine ・VOLUME: Volume ・WINDOWS: Windows ・LINUX_UNIX: Linux/UNIX |
profileType |
string |
Change type of the user profile. ・User: Profile is created by a user ・Default: Profile is registered by default ・Preset: Profile for which the initial settings are set |
thresholdValues |
UserThresholdValue[] |
Details of the threshold set in the user profile. |
thresholdValues (Type: UserThresholdValue)
Attribute |
Type |
Description |
---|---|---|
monitoring |
boolean |
Whether the threshold is monitored. ・true: Threshold is monitored ・false: Threshold is not monitored If this member is omitted, false is set. |
metricType |
string |
Identifier of the threshold. This member is not supported. |
pluginMetricType |
string |
Type of the metric set for a threshold (Plug-in) |
displayName |
string |
Display name of the threshold |
unit |
string |
String indicating the unit of the threshold |
proportion |
boolean |
Direction of the threshold. true: When the measured value falls below the threshold, an error or warning occurs. false: When the measured value exceeds the threshold, an error or warning occurs. |
thresholdValueOfWarning |
float |
Threshold for displaying warnings. You need to specify this threshold according to the following conditions: ・Multiple of stepSize ・Less than or equal to max ・Greater than or equal to min If the specified value is not allowed, the value is adjusted automatically. |
thresholdValueOfError |
float |
Threshold for showing errors. You need to specify this threshold according to the following conditions: ・Multiple of stepSize ・Less than or equal to max ・Greater than or equal to min If the specified value is not allowed, the value is adjusted automatically. |
stepSize |
float |
Increment for the threshold |
max |
double |
Maximum value that can be specified for the threshold |
min |
double |
Minimum value that can be specified for the threshold |
Response body
The structure of the response body and the object attributes are as follows:{ "instanceID":"...", "profileName":"...", "description":"...", "resourceType":"...", "profileType":"...", "thresholdValues":[{ "instanceID":"...", "monitoring":"...", "metricType":"...", "pluginMetricType":"...", "displayName":"...", "unit":"...", "proportion":"...", "thresholdValueOfWarning":"...", "thresholdValueOfError":"...", "stepSize":"...", "max":"...", "min":"..." }, : ], "numOfResources":"...", "autoAssignFilters":["...", ...] }
UserThresholdProfile (Type: UserThresholdProfile)
Attribute |
Type |
Description |
---|---|---|
instanceID |
long |
ID for identifying instances. |
profileName |
string |
User profile name. Use 128 or fewer characters. |
description |
string |
Description of the user profile. Use 256 or fewer characters. |
resourceType |
string |
Resource type to which the user profile can be applied. The following value can be specified. ・VM: Virtual machine ・VOLUME: Volume ・WINDOWS: Windows ・LINUX_UNIX: Linux/UNIX |
profileType |
string |
Change type of the user profile. ・User: Profile is created by a user ・Default: Profile is registered by default ・Preset: Profile for which the initial settings are set |
thresholdValues |
UserThresholdValue[] |
Details of the threshold set in the user profile. |
numOfResources |
int |
Number of resources to which the user profile is assigned |
autoAssignFilters |
string[] |
Name of the automatic assignment rule |
thresholdValues (Type: UserThresholdValue)
Attribute |
Type |
Description |
---|---|---|
instanceID |
long |
ID for identifying instances |
monitoring |
boolean |
Whether the threshold is monitored. ・true: Threshold is monitored ・false: Threshold is not monitored If this member is omitted, false is set. |
metricType |
string |
Identifier of the threshold. This member is not supported. |
pluginMetricType |
string |
Type of the metric set for a threshold (Plug-in) |
displayName |
string |
Display name of the threshold |
unit |
string |
String indicating the unit of the threshold |
proportion |
boolean |
Direction of the threshold. true: When the measured value falls below the threshold, an error or warning occurs. false: When the measured value exceeds the threshold, an error or warning occurs. |
thresholdValueOfWarning |
float |
Threshold for displaying warnings. You need to specify this threshold according to the following conditions: ・Multiple of stepSize ・Less than or equal to max ・Greater than or equal to min If the specified value is not allowed, the value is adjusted automatically. |
thresholdValueOfError |
float |
Threshold for showing errors. You need to specify this threshold according to the following conditions: ・Multiple of stepSize ・Less than or equal to max ・Greater than or equal to min If the specified value is not allowed, the value is adjusted automatically. |
stepSize |
float |
Increment for the threshold |
max |
double |
Maximum value that can be specified for the threshold |
min |
double |
Minimum value that can be specified for the threshold |
Status codes
Status code |
Reason phrase |
Description |
---|---|---|
201 |
Created |
Success. |
400 |
Bad Request |
A format of request body is invalid. |
401 |
Unauthorized |
No login privilege. |
403 |
Forbidden |
No update privilege. |
404 |
Not Found |
The resource was not found. |
409 |
Conflict |
A resource with the same name exists. |
412 |
Precondition Failed |
The server is not available. |
500 |
Internal Server Error |
Server processing error. |
Example code
[Request Header] POST /Analytics/v1/objects/UserThresholdProfiles HTTP/1.1 Authorization: Basic c3lzdGVtOm1hbmFnZXI= User-Agent: curl/7.33.0 Host: localhost:22015 Accept: application/json Content-Type: application/json Accept-Language: ja Content-Length: 1330 [Request Body] { "profileName": "Default Profile for Volume", "description": "Default Profile for Volume", "resourceType": "VOLUME", "profileType": "User", "thresholdValues": [ { "instanceID": 763, "monitoring": false, "metricType": "STO_VOLUME_TOTAL_IO_RATE", "displayName": "Volume IOPS", "unit": "transfers/sec", "proportion": false, "thresholdValueOfWarning": 0, "thresholdValueOfError": 2222, "stepSize": 1, "max": 3.4028235e+38, "min": 0 }, { "instanceID": 761, "monitoring": false, "metricType": "STO_VOLUME_TOTAL_XFER_RATE", "displayName": "Volume IO Rate", "unit": "MBps", "proportion": false, "thresholdValueOfWarning": 421, "thresholdValueOfError": 450, "stepSize": 1, "max": 3.4028235e+38, "min": 0 }, { "instanceID": 762, "monitoring": true, "metricType": "STO_IO_RESPONSE_TIME_ON_CTRL0", "displayName": "Volume Response Time Per IO Request", "unit": "msec/transfer", "proportion": false, "thresholdValueOfWarning": 499.9, "thresholdValueOfError": 500.1, "stepSize": 0.1, "max": 3.4028235e+38, "min": 0 } ], "originalThresholdProfileID" : 62 } [Response Header] HTTP/1.1 201 Created Date: Fri, 27 Nov 2015 07:59:59 GMT Server: Cosminexus HTTP Server Cache-Control: no-cache WWW-Authenticate: HSSO 92912a219d69363f390aa8d6fa84157ab1e58d6_WVlGcHsLfg5ffg0I_V0810 Location: http://localhost:22015/Analytics/v1/objects/UserThresholdProfiles/63 X-Frame-Options: SAMEORIGIN Transfer-Encoding: chunked Content-Type: application/json [Response Body] { "instanceID": 63, "profileName": "Default Profile for Volume", "description": "Default Profile for Volume", "resourceType": "VOLUME", "profileType": "User", "thresholdValues": [ { "instanceID": 769, "monitoring": false, "metricType": "STO_VOLUME_TOTAL_IO_RATE", "displayName": "Volume IOPS", "unit": "transfers/sec", "proportion": false, "thresholdValueOfWarning": 0, "thresholdValueOfError": 2222, "stepSize": 1, "max": 3.4028235e+38, "min": 0 }, { "instanceID": 768, "monitoring": false, "metricType": "STO_VOLUME_TOTAL_XFER_RATE", "displayName": "Volume IO Rate", "unit": "MBps", "proportion": false, "thresholdValueOfWarning": 421, "thresholdValueOfError": 450, "stepSize": 1, "max": 3.4028235e+38, "min": 0 }, { "instanceID": 767, "monitoring": true, "metricType": "STO_IO_RESPONSE_TIME_ON_CTRL0", "displayName": "Volume Response Time Per IO Request", "unit": "msec/transfer", "proportion": false, "thresholdValueOfWarning": 499.9, "thresholdValueOfError": 500.1, "stepSize": 0.1, "max": 3.4028235e+38, "min": 0 } ], "numOfResources": 0, "autoAssignFilters": [], "originalThresholdProfileID" : 62 }