Hitachi

JP1 Version 11 JP1/Operations Analytics REST APIリファレンス


2.4.4 ユーザープロファイルの更新

指定したユーザープロファイルの更新を行います。

権限

Admin, Modify

APIのバージョン

v1

リクエスト形式

PUT http[s]://host:port/Analytics/version/objects/UserThresholdProfiles/{id}

リクエストボディー

リクエストボディーの構造とオブジェクトの属性を次に示します。

UserThresholdProfile

{
        "profileName":"...",
        "description":"...",
        "resourceType":"...",
        "profileType":"...",
        "thresholdValues":[{
            "monitoring":"...",
            "metricType":"...",
            "displayName":"...",
            "unit":"...",
            "proportion":"...",
            "thresholdValueOfWarning":"...",
            "thresholdValueOfError":"...",
            "stepSize":"...",
            "max":"...",
            "min":"..."
        },
        :
        ]
}

UserThresholdProfile (Type: UserThresholdProfile)

属性

データ型

説明

profileName

string

ユーザープロファイルの名称。128文字以下の文字列を指定します。

description

string

ユーザープロファイルの説明。256文字以下の文字列を指定します。

resourceType

string

ユーザープロファイルが適用できるリソース種別。以下の値のみ指定可能。

・VM:仮想マシン

・VOLUME:ボリューム

・WINDOWS:Windows

・LINUX_UNIX:LinuxまたはUNIX

profileType

string

ユーザープロファイルの変更種別

・User:ユーザーが作成したプロファイル

・Default:デフォルトで登録されているプロファイル

・Preset:初期値が設定されたプロファイル

thresholdValues

UserThresholdValue[]

ユーザープロファイルに設定されているしきい値の内容。

thresholdValues (Type: UserThresholdValue)

属性

データ型

説明

monitoring

boolean

監視しているしきい値かどうか。

・true:監視している。

・false:監視していない。

省略時はfalseが設定されます。

metricType

string

しきい値の識別子。未サポートのメンバーです。

displayName

string

しきい値の表示名。

unit

string

しきい値の単位を表す文字列。

proportion

boolean

しきい値の方向。

true:測定値がしきい値を下回る場合に異常または警告となる。

false:測定値がしきい値を上回る場合に異常または警告になる。

thresholdValueOfWarning

float

警告を表すしきい値。しきい値は以下の条件に合わせて指定する必要があります。

・stepSizeの倍数

・max以下

・min以上

thresholdValueOfError

float

エラーを表すしきい値。しきい値は以下の条件に合わせて指定する必要があります。

・stepSizeの倍数

・max以下

・min以上

stepSize

float

しきい値の増加量。

max

double

しきい値がとりえる最大値。

min

double

しきい値がとりえる最小値。

レスポンスボディー

レスポンスボディーの構造とオブジェクトの属性を次に示します。

UserThresholdProfile

{
        "instanceID":"...",
        "profileName":"...",
        "description":"...",
        "resourceType":"...",
        "profileType":"...",
        "thresholdValues":[{
            "instanceID":"...",
            "monitoring":"...",
            "metricType":"...",
            "displayName":"...",
            "unit":"...",
            "proportion":"...",
            "thresholdValueOfWarning":"...",
            "thresholdValueOfError":"...",
            "stepSize":"...",
            "max":"...",
            "min":"..."
        },
        :
        ],
        "numOfResources":"...",
        "autoAssignFilters":["...", ...]
}

UserThresholdProfile (Type: UserThresholdProfile)

属性

データ型

説明

instanceID

long

インスタンスを特定するID。

profileName

string

ユーザープロファイルの名称。128文字以下の文字列を指定します。

description

string

ユーザープロファイルの説明。256文字以下の文字列を指定します。

resourceType

string

ユーザープロファイルが適用できるリソース種別。以下の値のみ指定可能。

・VM:仮想マシン

・VOLUME:ボリューム

・WINDOWS:Windows

・LINUX_UNIX:LinuxまたはUNIX

profileType

string

ユーザープロファイルの変更種別

・User:ユーザーが作成したプロファイル

・Default:デフォルトで登録されているプロファイル

・Preset:初期値が設定されたプロファイル

thresholdValues

UserThresholdValue[]

ユーザープロファイルに設定されているしきい値の内容。

numOfResources

int

ユーザープロファイルが割り当たっているリソースの数

autoAssignFilters

string[]

自動割り当てルールのルール名。

thresholdValues (Type: UserThresholdValue)

属性

データ型

説明

instanceID

long

インスタンスを特定するID

monitoring

boolean

監視しているしきい値かどうか。

・true:監視している。

・false:監視していない。

省略時はfalseが設定されます。

metricType

string

しきい値の識別子。未サポートのメンバーです。

displayName

string

しきい値の表示名。

unit

string

しきい値の単位を表す文字列。

proportion

boolean

しきい値の方向。

true:測定値がしきい値を下回る場合に異常または警告となる。

false:測定値がしきい値を上回る場合に異常または警告になる。

thresholdValueOfWarning

float

警告を表すしきい値。しきい値は以下の条件に合わせて指定する必要があります。

・stepSizeの倍数

・max以下

・min以上

thresholdValueOfError

float

エラーを表すしきい値。しきい値は以下の条件に合わせて指定する必要があります。

・stepSizeの倍数

・max以下

・min以上

stepSize

float

しきい値の増加量。

max

double

しきい値がとりえる最大値。

min

double

しきい値がとりえる最小値。

ステータスコード

HTTPステータスコード

Reason phrase

説明

200

OK

正常終了

400

Bad Request

リクエストボディ形式不正

401

Unauthorized

ログイン権限がない

403

Forbidden

更新権限がない

404

Not Found

リソースが存在しない

409

Conflict

nameが一致するリソースが存在する

412

Precondition Failed

サーバーが起動していない

500

Internal Server Error

サーバーサイドエラー

使用例

[Request Header]
PUT /Analytics/v1/objects/UserThresholdProfiles/63 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: 1331


[Request Body]
{
"instanceID" : 63,
"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.0,
"thresholdValueOfError" : 2222.0,
"stepSize" : 1.0,
"max" : 3.4028235E38,
"min" : 0.0
}, {
"instanceID" : 761,
"monitoring" : false,
"metricType" : "STO_VOLUME_TOTAL_XFER_RATE",
"displayName" : "Volume IO Rate",
"unit" : "MBps",
"proportion" : false,
"thresholdValueOfWarning" : 421.0,
"thresholdValueOfError" : 450.0,
"stepSize" : 1.0,
"max" : 3.4028235E38,
"min" : 0.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.4028235E38,
"min" : 0.0
} ],
"numOfResources" : 0,
"autoAssignFilters" : [ ]
}

[Response Header]
HTTP/1.1 200 OK
Date: Fri, 27 Nov 2015 08:42:46 GMT
Server: Cosminexus HTTP Server
Cache-Control: no-cache
WWW-Authenticate: HSSO e6ef783f42e697183f8c7a8539cf44beed12e8c_WVlGcHsLfg5ffg0I_V0810
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.0,
"thresholdValueOfError" : 2222.0,
"stepSize" : 1.0,
"max" : 3.4028235E38,
"min" : 0.0
}, {
"instanceID" : 768,
"monitoring" : false,
"metricType" : "STO_VOLUME_TOTAL_XFER_RATE",
"displayName" : "Volume IO Rate",
"unit" : "MBps",
"proportion" : false,
"thresholdValueOfWarning" : 421.0,
"thresholdValueOfError" : 450.0,
"stepSize" : 1.0,
"max" : 3.4028235E38,
"min" : 0.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.4028235E38,
"min" : 0.0
} ],
"numOfResources" : 0,
"autoAssignFilters" : [ ]
}