diff --git a/components/schemas/infrastructure/clusters/Cluster.yml b/components/schemas/infrastructure/clusters/Cluster.yml index e1439b0d..0fa7b790 100644 --- a/components/schemas/infrastructure/clusters/Cluster.yml +++ b/components/schemas/infrastructure/clusters/Cluster.yml @@ -7,6 +7,7 @@ required: - creator - hub_id - state + - non_essential - features - events properties: @@ -23,6 +24,9 @@ properties: anyOf: - $ref: ../../common/ACL.yml - type: "null" + non_essential: + type: boolean + description: Marks a cluster as non-essential. Non-essential cluster resources are excluded by default from certain metrics and summaries unless opted in. state: $ref: ./ClusterState.yml features: diff --git a/platform/paths/infrastructure/clusters/cluster.yml b/platform/paths/infrastructure/clusters/cluster.yml index 96914e55..ba366f88 100644 --- a/platform/paths/infrastructure/clusters/cluster.yml +++ b/platform/paths/infrastructure/clusters/cluster.yml @@ -47,7 +47,11 @@ patch: application/json: schema: type: object - + properties: + non_essential: + type: boolean + description: > + Set to true to mark the cluster as 'non-essential'. Non-essential cluster resources are excluded by default from certain metrics and summaries unless opted in. responses: 200: description: Returns a cluster. diff --git a/platform/paths/infrastructure/clusters/clusters.yml b/platform/paths/infrastructure/clusters/clusters.yml index cfc502f4..b745ca84 100644 --- a/platform/paths/infrastructure/clusters/clusters.yml +++ b/platform/paths/infrastructure/clusters/clusters.yml @@ -6,6 +6,25 @@ get: - Clusters parameters: - $ref: ../../../../components/parameters/PageParam.yml + - name: filter + in: query + style: deepObject + required: false + description: | + ## Filter Field + The filter field is a key-value object, where the key is what you would like to filter, and the value is the value you're filtering for. + schema: + type: object + properties: + essential: + type: string + description: | + `filter[essential]=true` filter for essential/non-essential clusters. + state: + type: string + description: | + `filter[state]=value1,value2` state filtering will allow you to filter by the cluster's current state. + `filter[stack_build]=ID` stack build filtering by ID. Submit the ID of the stack build you wish to filter for and the return sill be any environments that have the stack build deployed to them. responses: 200: description: Returns a list of clusters.