示例

POST /api/smart_proxies/182953976/import_puppetclasses
{
  "smart_proxy": {}
}
200
{
  "message": "Successfully updated environment and puppetclasses from the on-disk puppet installation",
  "environments_with_new_puppetclasses": 0,
  "environments_updated_puppetclasses": 1,
  "environments_obsolete": 1,
  "environments_ignored": 1,
  "results": [
    {
      "name": "env1",
      "actions": [
        "ignored"
      ],
      "ignored_environment": "env1"
    },
    {
      "name": "env2",
      "actions": [
        "updated",
        "obsolete"
      ],
      "updated_puppetclasses": [
        "a"
      ],
      "obsolete_puppetclasses": [
        "b",
        "c"
      ]
    }
  ]
}

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

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_proxy_id
选填

Validations:

  • Must be a String

environment_id
选填

Validations:

  • Must be a String

dryrun
选填

Validations:

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

except
选填

自选用逗号分开包含 ‘new’、‘updated’ 或 ‘obsolete’ 的字符串,用来限制导入的 Puppet 类别。

Validations:

  • Must be a String