このエンドポイントを使用して、CSA のカスタム ルールを管理します。 カスタムルールとは、ドメイン固有言語(DSL)の仕様によって定義されたルールのことです。このエンドポイントを使用すると、プロファイルとポリシーで使用するために、 Netskope UI との間でカスタム ルールをインポートおよびエクスポートできます。ルールを変更する際は、必ずNetskopeのUIでApply Changesをクリックしてください。1回のAPI呼び出しで、最大500個のカスタムルールをインポートまたはエクスポートできます。
リクエストエンドポイント
https://<tenant-URL>/api/v1/public_cloud/rules?token=<token>&<parameters>
カスタムルールのインポート
Valid parameters include:
| 鍵 | タイプ | Value | デスクリプション |
|---|---|---|---|
op | string | import | 手術は完了しました。 |
rules | JSONオブジェクトの配列 | {
"rule_name": "<rule_name>",
"description": "<description_optional>",
"remediation_steps": "<remediation_optional>",
"severity": "<Critical|High|Medium|Low>",
"code": "<code>",
"cloud_provider": "<aws|googlecloud|azure>"
} | インポートするルールの一覧。 |
cloud_provider | string | azure | aws | googlecloud | IaaSプラットフォーム プロバイダー。 |
rule_name | string | Required | カスタムルールの名前。 |
description | string | Optional | カスタムルールのデスクリプション。 |
remediation_steps | string | Optional | ルールの修復テキスト。 |
severity | string | Critical | High | Low | Medium | カスタムルールの厳格さ。 |
code | string | Ex: RedShiftCluster should have LoggingEnabled eq true | DSL仕様コード。 |
modify_by | string | Ex: admin@netskope.com | 電子メールアドレス |
インポートリクエストの例
POST 'https://<tenant-URL>/api/v1/public_cloud/rules?token=f39866cb86ab84a0208e9e1ee&op=import' --header 'Content-Type: application/json' --data-raw '{
"rules": [
{
"rule_name": "AWS_C3",
"description": "",
"remediation_steps": "",
"severity": "High",
"code": "RedShiftCluster should have LoggingEnabled eq true",
"cloud_provider": "aws"
},
{
"rule_name": "AWS_C4",
"description": "",
"remediation_steps": "",
"severity": "High",
"code": "RedShiftCluster should have LoggingEnabled eq true",
"cloud_provider": "aws"
}
],
"modify_by": "admin@netskope.com"
}'
エクスポートカスタムルール
Valid parameters include:
| 鍵 | タイプ | Value | デスクリプション |
|---|---|---|---|
op | string | export | 手術は完了しました。 |
cloud_provider | string | azure | aws | googlecloud | IaaSプラットフォーム プロバイダー。 |
severity | string | Critical | High | Low | Medium | カスタムルールの厳格さ。 |
state | string | Ex: deployed | デプロイ済みのルールでフィルタリングします。 |
輸出依頼の例
GET 'https://<tenant-URL>/api/v1/public_cloud/rules?token=f39866cb86ab84a0208e9e1ee&op=export&severity=Critical|High&cloud_provider=aws'

