Hitachi

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


2.6.5 コンシューマーの更新

指定したコンシューマーの更新を行います。

権限

Admin, Modify

APIのバージョン

v1

リクエスト形式

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

リクエストボディー

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

Group

{
        "name":"...",
        "gradeKey":"...",
        "description":"...",
        "urls":["...", ...],
        "urlDisplayNames":["...", ...],
        "templateCreatorType":"...",
        "vmAutoAssignment":"...",
        "applicationAssignFollow":"..."
}

Group (Type: Group)

属性

データ型

説明

name

string

コンシューマーの名称。128文字以下の文字列を指定します。

gradeKey

string

グレードを識別するID。

description

string

コンシューマーの説明。1000文字以下の文字列を指定します。

urls

string[]

URL

urlDisplayNames

string[]

URLの表示文字列

templateCreatorType

enum

コンシューマーの変更種別

(指定可能な値は「列挙型一覧」のTemplateCreatorTypeの表を参照してください。)

以下に示す値のみ指定可能です。

  • User
  • Default

vmAutoAssignment

boolean

このコンシューマーに属するハイパーバイザー配下の仮想マシンを自動的に割り当てる場合にtrue

applicationAssignFollow

boolean

このコンシューマーに属するリソース配下のアプリケーションを自動的に割り当てる場合にtrue

レスポンスボディー

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

Group

{
        "instanceID":"...",
        "name":"...",
        "status":"...",
        "gradeKey":"...",
        "gradeName":"...",
        "gradeDisplayOrder":"...",
        "description":"...",
        "urls":["...", ...],
        "urlDisplayNames":["...", ...],
        "templateCreatorType":"...",
        "vmAutoAssignment":"...",
        "applicationAssignFollow":"...",
        "numOfVolumes":"...",
        "numOfVMs":"...",
        "numOfHosts":"...",
        "numOfHypervisors":"...",
        "numOfApplications":"...",
        "vmAutoAssignFilters":["...", ...],
        "hostAutoAssignFilters":["...", ...],
        "volumeIDs":["...", ...],
        "vmIDs":["...", ...],
        "hostIDs":["...", ...],
        "hypervisorIDs":["...", ...],
        "applicationIDs":["...", ...]
}

Group (Type: Group)

属性

データ型

説明

instanceID

long

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

name

string

コンシューマーの名称。128文字以下の文字列を指定します。

status

enum

コンシューマーの状態。

(指定可能な値は「列挙型一覧」のNodeStatusTypeの表を参照してください。)

以下に示す値のみ指定可能です。

  • Normal
  • Warning
  • Error

gradeKey

string

グレードを識別するID。

gradeName

string

グレードの名称。

gradeDisplayOrder

int

グレードの優先順位

description

string

コンシューマーの説明。1000文字以下の文字列を指定します。

urls

string[]

URL

urlDisplayNames

string[]

URLの表示文字列

templateCreatorType

enum

コンシューマーの変更種別

(指定可能な値は「列挙型一覧」のTemplateCreatorTypeの表を参照してください。)

以下に示す値のみ指定可能です。

  • User
  • Default

vmAutoAssignment

boolean

このコンシューマーに属するハイパーバイザー配下の仮想マシンを自動的に割り当てる場合にtrue

applicationAssignFollow

boolean

このコンシューマーに属するリソース配下のアプリケーションを自動的に割り当てる場合にtrue

numOfVolumes

int

コンシューマーが割り当てられているボリュームの数。

numOfVMs

int

コンシューマーが割り当てられている仮想マシンの数。

numOfHosts

int

コンシューマーが割り当てられているホストの数。

numOfHypervisors

int

コンシューマーが割り当てられているハイパーバイザーの数。

numOfApplications

int

コンシューマーが割り当てられているアプリケーションの数。

vmAutoAssignFilters

string[]

仮想サーバに設定されている自動割り当てルールのルール名。

hostAutoAssignFilters

string[]

ホストに設定されている自動割り当てルールのルール名。

volumeIDs

long[]

コンシューマーに割り当てられているボリュームを特定するIDのリスト

vmIDs

long[]

コンシューマーに割り当てられている仮想マシンを特定するIDのリスト

hostIDs

long[]

コンシューマーに割り当てられているホストを特定するIDのリスト

hypervisorIDs

long[]

コンシューマーに割り当てられているハイパーバイザーを特定するIDのリスト

applicationIDs

long[]

コンシューマーに割り当てられているアプリケーションを特定するIDのリスト

ステータスコード

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/Groups/10 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: 376


[Request Body]
{
  "instanceID" : 10,
  "name" : "Group A",
  "status" : "Normal",
  "gradeKey" : "0",
  "gradeName" : "Platinum",
  "gradeDisplayOrder" : 0,
  "description" : "Tel:XXX-YYYYY, User:Administrator",
  "templateCreatorType" : "User",
  "numOfVolumes" : 0,
  "numOfVMs" : 0,
  "numOfHosts" : 0,
  "volumeAutoAssignFilters" : [ ],
  "vmAutoAssignFilters" : [ ],
  "hostAutoAssignFilters" : [ ]
}


[Response Header]
HTTP/1.1 200 OK
Date: Fri, 27 Nov 2015 08:42:47 GMT
Server: Cosminexus HTTP Server
Cache-Control: no-cache
WWW-Authenticate: HSSO f2eae1699945a979e8c7285d8923241d67ed782_WVlGcHsLfg5ffg0I_V0810
X-Frame-Options: SAMEORIGIN
Transfer-Encoding: chunked
Content-Type: application/json


[Response Body]
{
  "instanceID" : 10,
  "name" : "Group A",
  "status" : "Normal",
  "gradeKey" : "0",
  "gradeName" : "Platinum",
  "gradeDisplayOrder" : 0,
  "description" : "Tel:XXX-YYYYY, User:Administrator",
  "templateCreatorType" : "User",
  "numOfVolumes" : 0,
  "numOfVMs" : 0,
  "numOfHosts" : 0,
  "volumeAutoAssignFilters" : [ ],
  "vmAutoAssignFilters" : [ ],
  "hostAutoAssignFilters" : [ ]
}