前のトピック: config メソッド(template オブジェクト)

次のトピック: lock メソッド(template オブジェクト)

config_boundary メソッド(template オブジェクト)

説明

アプリケーション テンプレートの境界を表示します。

構文
/api/v1/template/config_boundary?template=template&vdc=controller-name 
引数
template

アプリケーション テンプレートの名前

controller-name

ターゲットの仮想データ センターの名前

トランザクション タイプ

同期

リクエスト タイプ

GET

アプリケーション テンプレート VDS_CentOS51_r15 の境界を表示します。

GET http://192.168.123.200/api/v1/template/config_boundary?template=VDS_CentOS51_r15&vdc=mygrid 

サンプル出力

XML

<boundary> 
   <name>main</name> 
   <property dns1> 
      <mandatory>1</mandatory> 
      <type>string</type> 
   </property dns1> 
   <property dns2> 
      <dflt></dflt> 
      <type>string</type> 
   </property dns2> 
   .
   .  
   .  
   <resource bw> 
      <dflt>1000K</dflt> 
      <max>2G</max> 
      <min>1000K</min> 
   </resource bw> 
   .  
   .  
</boundary>



JSON

{ 
   "property dns1" : { 
      "type" : "string", 
      "mandatory" : 1 
   }, 
   "property hostname" : { 
      "type" : "string", 
      "mandatory" : 1 
   }, 
   .  
   .  
   .  
   "resource mem" : { 
      "min" : "128M", 
      "max" : "32G", 
      "dflt" : "256M" 
   }, 
   .  
   .  
} 

メモ

JSON の出力はすべて UTF8 にエンコードされています。 UTF8 デコードを使用して UTF8 にエンコードされた出力をデコードします。

UTF8 にエンコードされた JSON 出力をデコードするシンプルな PHP スクリプトの例を以下に示します。

<? 
$json = '{"a": "¥u00e3¥u0081¥u0082" }'; 
$j = json_decode($json); 
echo utf8_decode($j->{'a'}); 
?>

HTTP エラー コード
404

エンティティ vdc mygrid が見つかりません。WS_API アプリケーションに設定されていない VDC 名が指定されました。

400.4

必要な引数(template)がありません。 リクエストに引数 template=template がありません。

500.2

リクエストの処理に失敗しました。アプリケーション VDS_CentOS_r1 が存在しません。 リクエストで指定されたテンプレートが VDC に存在しません。