Skip to content

Update a pool rule

Request

Update a rule that assigns an attempt to a pool based on conditions.

Security
ApiKeyAuth
Path
poolRuleIdinteger, (int32)required

ID of the rule

Bodyapplication/jsonrequired
conditionsArray of objects, [ 1 .. 2 ] items(RestPoolRuleCondition)

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.

poolIdstring, >= 1

ID of the pool that this rule assigns attempts to.

Example:"42"
priorityinteger, (int32), [ 1 .. 10000 ]

Priority of the rule. Rules are evaluated in priority order, from the lowest value to the highest value. Multiple rules cannot have the same priority.

Example:10
curl -i -X PATCH \
  'https://api-workflow.treasuredata.com/api/pool_rules/{poolRuleId}' \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "conditions": [
      {
        "type": "invocation_type",
        "values": [
          "on_demand"
        ]
      }
    ],
    "poolId": "42",
    "priority": 10
  }'

Responses

Pool rule updated

Bodyapplication/json
conditionsArray of objects, [ 1 .. 2 ] items(RestPoolRuleCondition)required

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.

idstring, >= 1required

ID of the pool rule.

Example:"42"
poolIdstring, >= 1required

ID of the pool that this rule assigns attempts to.

Example:"42"
priorityinteger, (int32), [ 1 .. 10000 ]required

Priority of the rule. Rules are evaluated in priority order, from the lowest value to the highest value. Multiple rules cannot have the same priority.

Example:10
Response
{ "conditions": [ {} ], "id": "42", "poolId": "42", "priority": 10 }