+ Create a new policy type .
+ Replace is not currently allowed; to replace, for now do a DELETE and then a PUT again.
+
+ tags:
+ - A1 Mediator
+ operationId: a1.controller.create_policy_type
+ requestBody:
+ content:
+ application/json:
+ schema:
+ "$ref": "#/components/schemas/policy_type_schema"
+ example:
+ name: admission_control_policy
+ description: various parameters to control admission of dual connection
+ policy_type_id: 20000
+ create_schema:
+ $schema: 'http://json-schema.org/draft-07/schema#'
+ type: object
+ properties:
+ enforce:
+ type: boolean
+ default: true
+ window_length:
+ type: integer
+ default: 1
+ minimum: 1
+ maximum: 60
+ description: Sliding window length (in minutes)
+ blocking_rate:
+ type: number
+ default: 10
+ minimum: 1
+ maximum: 100
+ description: '% Connections to block'
+ trigger_threshold:
+ type: integer
+ default: 10
+ minimum: 1
+ description: Minimum number of events in window to trigger blocking
+ additionalProperties: false
+
+ responses:
+ '201':
+ description: "policy type successfully created"
+ '400':
+ description: "illegal ID, or object already existed"
+
+ '/a1-p/policytypes/{policy_type_id}/policies':
+ parameters:
+ - name: policy_type_id
+ in: path
+ required: true
+ schema:
+ "$ref": "#/components/schemas/policy_type_id"
+ get:
+ description: "get a list of all policy instance ids for this policy type id"
+ tags:
+ - A1 Mediator
+ operationId: a1.controller.get_all_instances_for_type
+ responses:
+ 200:
+ description: "list of all policy instance ids for this policy type id"
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ "$ref": "#/components/schemas/policy_instance_id"
+ example: ["3d2157af-6a8f-4a7c-810f-38c2f824bf12", "06911bfc-c127-444a-8eb1-1bffad27cc3d"]
+
+
+ '/a1-p/policytypes/{policy_type_id}/policies/{policy_instance_id}':
+ parameters:
+ - name: policy_type_id
+ in: path
+ required: true
+ schema:
+ "$ref": "#/components/schemas/policy_type_id"
+
+ - name: policy_instance_id
+ in: path
+ required: true
+ schema:
+ "$ref": "#/components/schemas/policy_instance_id"
+
+ get:
+ description: >
+ Retrieve the policy instance