ポリシーを更新する
put
/oaa-policy/policy/v1/{policygid}
リクエスト
パス・パラメータ
- policygid(required): string
ポリシーの識別子。
サポートされるメディア・タイプ
- application/xml
- application/json
ルート・スキーマ : schema
型:
objectポリシーを作成、変更およびフェッチするためのポリシー・オブジェクト。
ソースの表示
-
agentgid(required): string
ポリシーが属するエージェントの識別子
-
assuranceLevelId(required): string
ポリシーに関連付けられた保証レベルの識別子
-
description(required): string
ポリシーの説明。
-
name(required): string
ポリシー名。
-
policygid: string
ポリシーの識別子
-
scoringEngine: string
ポリシーのスコアリングに使用されるエンジン(集計済、平均、最大、最小、加重平均、加重最大、加重最小)
-
status(required): string
ポリシーのステータス。次のいずれかの値です。Active、DisabledまたはDeleted。
-
weight: integer
保証レベルに複数のポリシーがある場合、ポリシーの重みを定義する0から100までの数値。
ルート・スキーマ : schema
型:
objectポリシーを作成、変更およびフェッチするためのポリシー・オブジェクト。
ソースの表示
-
agentgid(required): string
ポリシーが属するエージェントの識別子
-
assuranceLevelId(required): string
ポリシーに関連付けられた保証レベルの識別子
-
description(required): string
ポリシーの説明。
-
name(required): string
ポリシー名。
-
policygid: string
ポリシーの識別子
-
scoringEngine: string
ポリシーのスコアリングに使用されるエンジン(集計済、平均、最大、最小、加重平均、加重最大、加重最小)
-
status(required): string
ポリシーのステータス。次のいずれかの値です。Active、DisabledまたはDeleted。
-
weight: integer
保証レベルに複数のポリシーがある場合、ポリシーの重みを定義する0から100までの数値。
レスポンス
サポートされるメディア・タイプ
- application/xml
- application/json
201レスポンス
ポリシーが更新されました
ルート・スキーマ: PolicyResponse
型:
ソースの表示
object-
message: string
リクエストのステータスに関連するメッセージ
-
policy: object schema
ポリシーを作成、変更およびフェッチするためのポリシー・オブジェクト。
-
policygid: string
ポリシーの識別子。
-
status: string
リクエストのステータス
ネストされたスキーマ: schema
型:
objectポリシーを作成、変更およびフェッチするためのポリシー・オブジェクト。
ソースの表示
-
agentgid(required): string
ポリシーが属するエージェントの識別子
-
assuranceLevelId(required): string
ポリシーに関連付けられた保証レベルの識別子
-
description(required): string
ポリシーの説明。
-
name(required): string
ポリシー名。
-
policygid: string
ポリシーの識別子
-
scoringEngine: string
ポリシーのスコアリングに使用されるエンジン(集計済、平均、最大、最小、加重平均、加重最大、加重最小)
-
status(required): string
ポリシーのステータス。次のいずれかの値です。Active、DisabledまたはDeleted。
-
weight: integer
保証レベルに複数のポリシーがある場合、ポリシーの重みを定義する0から100までの数値。
401レスポンス
未認可
405レスポンス
無効な入力
ルート・スキーマ: PolicyResponse
型:
ソースの表示
object-
message: string
リクエストのステータスに関連するメッセージ
-
policy: object schema
ポリシーを作成、変更およびフェッチするためのポリシー・オブジェクト。
-
policygid: string
ポリシーの識別子。
-
status: string
リクエストのステータス
ネストされたスキーマ: schema
型:
objectポリシーを作成、変更およびフェッチするためのポリシー・オブジェクト。
ソースの表示
-
agentgid(required): string
ポリシーが属するエージェントの識別子
-
assuranceLevelId(required): string
ポリシーに関連付けられた保証レベルの識別子
-
description(required): string
ポリシーの説明。
-
name(required): string
ポリシー名。
-
policygid: string
ポリシーの識別子
-
scoringEngine: string
ポリシーのスコアリングに使用されるエンジン(集計済、平均、最大、最小、加重平均、加重最大、加重最小)
-
status(required): string
ポリシーのステータス。次のいずれかの値です。Active、DisabledまたはDeleted。
-
weight: integer
保証レベルに複数のポリシーがある場合、ポリシーの重みを定義する0から100までの数値。
500レスポンス
内部サーバー・エラー
503レスポンス
サービス使用不可
例
次の例は、ポリシーを更新するサンプルのリクエストとレスポンスを示します。
JSON形式でポリシーを更新するcURLコマンド
curl --location --request PUT '<PolicyUrl>/oaa-policy/policy/v1/141_73875f1eda644e4196248e5ecc824364c5a6c1954350a9927942c6d50c4ed171' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <Base64Encoded(<username>:<password>)>' \
--data '{
"agentgid": "dede64d3-1d6a-42e9-89e1-714e88f8967c",
"name": "Policy1 Update",
"description": "Policy for AssuranceLevel1 Update",
"status": "Active",
"assuranceLevelId": "AssuranceLevel1"
}'JSON形式のサンプル・レスポンス
{
"status": "200",
"message": "Policy update is successfully.",
"policygid": "141_73875f1eda644e4196248e5ecc824364c5a6c1954350a9927942c6d50c4ed171",
"policy": {
"agentgid": "dede64d3-1d6a-42e9-89e1-714e88f8967c",
"assuranceLevelId": "AssuranceLevel1",
"name": "Policy1 Update",
"description": "Policy for AssuranceLevel1 Update",
"status": "ACTIVE",
"scoringEngine": "Average",
"weight": 100,
"policygid": "141_73875f1eda644e4196248e5ecc824364c5a6c1954350a9927942c6d50c4ed171"
}
}XML形式でポリシーを更新するcURLコマンド
curl --location --request PUT '<PolicyUrl>/oaa-policy/policy/v1/141_73875f1eda644e4196248e5ecc824364c5a6c1954350a9927942c6d50c4ed171' \
--header 'Content-Type: application/xml' \
--header 'Accept: application/xml' \
--header 'Authorization: Basic <Base64Encoded(<username>:<password>)>' \
--data '<?xml version="1.0" encoding="UTF-8" ?>
<PolicyRequest>
<agentgid>dede64d3-1d6a-42e9-89e1-714e88f8967c</agentgid>
<name>Policy1 Update</name>
<description>Policy for AssuranceLevel1 Update</description>
<status>Active</status>
<assuranceLevelId>AssuranceLevel1</assuranceLevelId>
</PolicyRequest>'XML形式のサンプル・レスポンス
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<PolicyResponse>
<status>200</status>
<message>Policy update is successfully.</message>
<policygid>141_73875f1eda644e4196248e5ecc824364c5a6c1954350a9927942c6d50c4ed171</policygid>
<policy>
<agentgid>dede64d3-1d6a-42e9-89e1-714e88f8967c</agentgid>
<assuranceLevelId>AssuranceLevel1</assuranceLevelId>
<name>Policy1 Update</name>
<description>Policy for AssuranceLevel1 Update</description>
<status>ACTIVE</status>
<scoringEngine>Average</scoringEngine>
<weight>100</weight>
<policygid>141_73875f1eda644e4196248e5ecc824364c5a6c1954350a9927942c6d50c4ed171</policygid>
</policy>
</PolicyResponse>