示例

POST /api/smart_class_parameters/328495940-cluster/override_values
{
  "override_value": {
    "match": "os=abc",
    "value": "liftoff"
  }
}
201
{
  "created_at": "2019-09-11 14:40:10 UTC",
  "updated_at": "2019-09-11 14:40:10 UTC",
  "id": 1018350796,
  "match": "os=abc",
  "value": "liftoff",
  "omit": false,
  "use_puppet_default": false
}

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer

smart_variable_id
选填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

smart_class_parameter_id
选填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

override_value
必填

Validations:

  • Must be a Hash

override_value[match]
必填

替代匹配

Validations:

  • Must be a String

override_value[value]
选填 , 允许空值

覆盖值(omit 为 false 时必需)

Validations:

  • Must be one of types: string, boolean, integer, real, array, hash, yaml, json

override_value[use_puppet_default]
选填 , 允许空值

已弃用,请使用 omit

Validations:

  • Must be one of: true, false, 1, 0.

override_value[omit]
选填 , 允许空值

Foreman 不会在分类输出中发送此参数,替代 use_puppet_default

Validations:

  • Must be one of: true, false, 1, 0.