diff --git a/api/services/ocean/rightsizing/paths/oceanRightsizingClusterConfiguration.yaml b/api/services/ocean/rightsizing/paths/oceanRightsizingClusterConfiguration.yaml new file mode 100644 index 00000000..715b3366 --- /dev/null +++ b/api/services/ocean/rightsizing/paths/oceanRightsizingClusterConfiguration.yaml @@ -0,0 +1,27 @@ +post: + summary: "Set Cluster Recommendations Percentile" + description: | + Set Recommendations Percentile for the Ocean Cluster. +
+
+ **This action can take a few minutes to complete.** + operationId: "SetClusterRecommendationsPercentile" + tags: + - "Ocean Automatic Rightsizing" + parameters: + - $ref: "../parameters/oceanId.yaml" + - $ref: "../parameters/clusterIdentifier.yaml" + - $ref: "../../../../commons/parameters/accountId.yaml" + requestBody: + required: true + content: + application/json: + schema: + allOf: + - $ref: "../schemas/oceanRightsizingSetClusterRecommendationsPercentileRequest.yaml" + responses: + 200: + description: Ocean Cluster Recommendations Percentile Response + $ref: "../responses/oceanRightsizingClusterConfigurationResponse.yaml" + 400: + description: "Bad Request" \ No newline at end of file diff --git a/api/services/ocean/rightsizing/responses/oceanRightsizingClusterConfigurationResponse.yaml b/api/services/ocean/rightsizing/responses/oceanRightsizingClusterConfigurationResponse.yaml new file mode 100644 index 00000000..99c00b07 --- /dev/null +++ b/api/services/ocean/rightsizing/responses/oceanRightsizingClusterConfigurationResponse.yaml @@ -0,0 +1,37 @@ +description: Ocean Rightsizing Cluster Configuration Response +content: + application/json: + schema: + allOf: + - $ref: "../../../../commons/schemas/responseItemWrapper.yaml" + - type: object + properties: + request: + type: object + properties: + url: + example: "/ocean/{oceanId}/rightSizing/cluster/configuration" + method: + example: "POST" + response: + type: object + properties: + items: + type: array + items: + type: object + properties: + oceanId: + type: string + example: "o-abcd1234" + clusterIdentifier: + type: string + example: "dev-cluster" + config: + type: object + properties: + recommendationsPercentile: + type: integer + example: 85 + kind: + example: "mcs:ocean:rightSizing:clusterConfiguration" \ No newline at end of file diff --git a/api/services/ocean/rightsizing/schemas/oceanRightsizingSetClusterRecommendationsPercentileRequest.yaml b/api/services/ocean/rightsizing/schemas/oceanRightsizingSetClusterRecommendationsPercentileRequest.yaml new file mode 100644 index 00000000..5631ddae --- /dev/null +++ b/api/services/ocean/rightsizing/schemas/oceanRightsizingSetClusterRecommendationsPercentileRequest.yaml @@ -0,0 +1,14 @@ +type: object +required: + - config +properties: + config: + type: object + required: + - recommendationsPercentile + properties: + recommendationsPercentile: + type: integer + description: Change the percentile that the right-sizing recommendations calculation will take into account. + example: 85 + enum: [ 85, 90, 95, 99 ] \ No newline at end of file diff --git a/api/spot.yaml b/api/spot.yaml index 5df10b75..cac798f8 100644 --- a/api/spot.yaml +++ b/api/spot.yaml @@ -933,6 +933,8 @@ paths: $ref: services/ocean/rightsizing/paths/oceanRightsizingRollbacks.yaml /ocean/{oceanId}/rightSizing/rollbacks/acknowledge: $ref: services/ocean/rightsizing/paths/oceanRightsizingAcknowledgeRollbacks.yaml + /ocean/{oceanId}/rightSizing/cluster/configuration: + $ref: services/ocean/rightsizing/paths/oceanRightsizingClusterConfiguration.yaml /security/v1/compliances: $ref: services/security/v1/paths/compliances.yaml /security/v1/compliances/count: