Fleets

Update a Policy

Update a policy with new specifications.

patch/v1/fleet/{fleet_name}/policies/{policy_name}

Request

  • Base URL: https://api.edgegap.com
  • URL: https://api.edgegap.com/v1/fleet/{fleet_name}/policies/{policy_name}
  • Auth: API key in header authorization

Path parameters

fleet_namestring required

The name of the fleet

policy_namestring required

The name of the policy

Request body

namestring

Name of the Policy

enabledboolean

If the Policy is enabled. Defaults to true.

type'Location' | 'Tag' | 'Coordinates'

Type of the Policy. See our documentation for more information on the type and it's data.

minimuminteger

Minimum deployments at all time

maximuminteger

Maximum deployments for the provided type.

thresholdnumber

Based on the number of sockets connected, how filled should a session deployment be before initiating a scale-up deployment. Float between 0.1 and 1.

dataobject

JSON object for your filters. See our documentation for more information.

create_timestring

UTC time of policy creation

last_updatedstring

UTC time of policy last update

Example request

{
  "name": "policy_name",
  "enabled": true,
  "type": "Location",
  "minimum": 1,
  "maximum": 1,
  "threshold": 0.9,
  "data": {
    "filters": [
      {
        "field": "city",
        "values": [
          "Montreal"
        ],
        "filter_type": "any"
      }
    ]
  },
  "create_time": "2022-01-01 00:00:00.000000",
  "last_updated": "2022-01-01 00:00:00.000000"
}

Response

Success

namestring

Name of the Policy

enabledboolean

If the Policy is enabled. Defaults to true.

type'Location' | 'Tag' | 'Coordinates'

Type of the Policy. See our documentation for more information on the type and it's data.

minimuminteger

Minimum deployments at all time

maximuminteger

Maximum deployments for the provided type.

thresholdnumber

Based on the number of sockets connected, how filled should a session deployment be before initiating a scale-up deployment. Float between 0.1 and 1.

dataobject

JSON object for your filters. See our documentation for more information.

create_timestring

UTC time of policy creation

last_updatedstring

UTC time of policy last update

Example response

{
  "name": "policy_name",
  "enabled": true,
  "type": "Location",
  "minimum": 1,
  "maximum": 1,
  "threshold": 0.9,
  "data": {
    "filters": [
      {
        "field": "city",
        "values": [
          "Montreal"
        ],
        "filter_type": "any"
      }
    ]
  },
  "create_time": "2022-01-01 00:00:00.000000",
  "last_updated": "2022-01-01 00:00:00.000000"
}

Changes

No recorded changes to this operation across all 1 revision of this API.