3.6. 管理 CLI の操作
3.6.1. 管理 CLI によるリソースの属性の表示
前提条件
read-attribute 操作は、選択した属性の現在のランタイム値を読み取るために使用されるグローバル操作です。この操作を使用すると、デフォルトの値や非定義の値を無視し、ユーザーが設定した値のみを表示できます。要求プロパティーには次のパラメーターが含まれます。
要求プロパティー
name- 選択したリソース下で値を取得する属性の名前。
include-defaultsfalseを設定すると、デフォルト値を無視し、ユーザーが設定した属性のみを表示するよう操作結果を制限できるブール値パラメーター。
手順3.13 選択した属性の現在のランタイム値を表示
read-attribute操作の実行管理 CLI よりread-attributeを使用してリソース属性の値を表示します。操作要求の詳細は「管理 CLI での操作およびコマンドの使用」を参照してください。[standalone@localhost:9999 /]
:read-attribute(name=name-of-attribute)
read-attribute 操作の利点は、特定属性の現在のランタイム値を表示できることです。read-resource 操作でも同様の結果を得ることができますが、include-runtime 要求プロパティーを追加した場合のみ可能で、そのノードに対して使用できる全リソース一覧の一部のみを表示できます。次の例が示すように、read-attribute 操作は粒度の細かい属性クエリを対象としています。
例3.7 read-attribute 操作を実行したパブリックインターフェース IP の表示
read-attribute を使用して現在のランタイムの厳密値を返します。
[standalone@localhost:9999 /] /interface=public:read-attribute(name=resolved-address)
{
"outcome" => "success",
"result" => "127.0.0.1"
}
resolved-address 属性はランタイム値であるため、標準的な read-resource 操作の結果には表示されません。
[standalone@localhost:9999 /] /interface=public:read-resource
{
"outcome" => "success",
"result" => {
"any" => undefined,
"any-address" => undefined,
"any-ipv4-address" => undefined,
"any-ipv6-address" => undefined,
"inet-address" => expression "${jboss.bind.address:127.0.0.1}",
"link-local-address" => undefined,
"loopback" => undefined,
"loopback-address" => undefined,
"multicast" => undefined,
"name" => "public",
"nic" => undefined,
"nic-match" => undefined,
"not" => undefined,
"point-to-point" => undefined,
"public-address" => undefined,
"site-local-address" => undefined,
"subnet-match" => undefined,
"up" => undefined,
"virtual" => undefined
}
}
resolved-address や他のランタイム値を表示するには、include-runtime 要求プロパティーを使用する必要があります。
[standalone@localhost:9999 /] /interface=public:read-resource(include-runtime=true)
{
"outcome" => "success",
"result" => {
"any" => undefined,
"any-address" => undefined,
"any-ipv4-address" => undefined,
"any-ipv6-address" => undefined,
"inet-address" => expression "${jboss.bind.address:127.0.0.1}",
"link-local-address" => undefined,
"loopback" => undefined,
"loopback-address" => undefined,
"multicast" => undefined,
"name" => "public",
"nic" => undefined,
"nic-match" => undefined,
"not" => undefined,
"point-to-point" => undefined,
"public-address" => undefined,
"resolved-address" => "127.0.0.1",
"site-local-address" => undefined,
"subnet-match" => undefined,
"up" => undefined,
"virtual" => undefined
}
}
現在のランタイム属性値が表示されます。

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.