Create a rule that assigns an attempt to a pool based on conditions. A rule consists of a priority, conditions, and a pool ID. Rules are evaluated in priority order, from the lowest value to the highest value. Multiple rules cannot have the same priority. If all of a rule's conditions are met, an attempt is assigned to its pool. If none of the rules are met, an attempt is assigned to a default pool.
Security
ApiKeyAuth
Conditions that must be met for the rule to assign an attempt to a pool. If multiple conditions are specified, all conditions must be met.
- awshttps://api-workflow.treasuredata.com/api/pool_rules
- aws-tokyohttps://api-workflow.treasuredata.co.jp/api/pool_rules
- eu01https://api-workflow.eu01.treasuredata.com/api/pool_rules
- ap02https://api-workflow.ap02.treasuredata.com/api/pool_rules
- ap03https://api-workflow.ap03.treasuredata.com/api/pool_rules
- invocation_type
- project_name
- workflow_name
- workflow_type
curl -i -X POST \
https://api-workflow.treasuredata.com/api/pool_rules \
-H 'Authorization: TD1 <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"conditions": [
{
"type": "invocation_type",
"values": [
"on_demand"
]
}
],
"poolId": "42",
"priority": 10
}'Pool rule created
Conditions that must be met for the rule to assign an attempt to a pool. If multiple conditions are specified, all conditions must be met.
Response
- invocation_type
- project_name
- workflow_name
- workflow_type
{ "conditions": [ { … } ], "id": "42", "poolId": "42", "priority": 10 }