---
title: "Creates a Recommendation Exclusion Rule"
method: POST
path: "/v1/recommendations/exclusion_rule/create"
tags: ["Recommendation"]
---

# Creates a Recommendation Exclusion Rule

`POST /v1/recommendations/exclusion_rule/create`

Create a Recommendation Exclusion Rule

## Request body

- RecommendationExclusionRuleRequest
  - `name` string, required — Recommendation Exclusion Rule Name
  - `activation_date` string, date-time — Rule Activation date
  - `description` string — Rule Description
  - `expiry_date` string, date-time — Rule expiry date
  - `is_enabled` boolean — Rule status
  - `scope` 'account' | 'tenant', required — Rule Scope
  - `resource_scope` RecommendationResourceScopeBase, required
    - `tenant_ids` string[], required — List of tenant IDs to which the recommendation rule is applied.
    - `service_name` 'AWS' | 'Azure' | 'AzureStack' | 'Azure_CSP' | 'Azure_CSP-Direct' | 'Azure_EA' | 'Azure_MCA' | 'Cloudstack' | 'GCP' | 'MS_VMM' | 'OCI' | 'Openstack' | 'PrivateCloud' | 'Rackspace' | 'VMware' | 'VMware_VCD' | 'vCenter', required — Cloud Provider to select
    - `service_account_ids` string[] — List of service account IDs to which the recommendation rule is applied.
    - `filters` QueryOperator
      - `__type` string, required — Concrete type used for polymorphic deserialization (discriminator)
  - `policy_classification` PolicyClassificationWithSubClassifications, required
    - `access` string[] — List of Access sub-classifications
    - `cost` string[] — List of Cost sub-classifications
    - `data` string[] — List of Data sub-classifications
    - `network` string[] — List of Network sub-classifications
    - `operation` string[] — List of Operation sub-classifications
    - `performance` string[] — List of performance sub-classifications
    - `resource` string[] — List of Resource sub-classifications
    - `security` string[] — List of security sub classifications

## Response `200`

Success

- RecommendationExclusionRuleResponse
  - `name` string, required — Recommendation Exclusion Rule Name
  - `activation_date` string, date-time — Rule Activation date
  - `description` string — Rule Description
  - `expiry_date` string, date-time — Rule expiry date
  - `is_enabled` boolean — Rule status
  - `scope` 'account' | 'tenant', required — Rule Scope
  - `resource_scope` RecommendationResourceScopeBase, required
    - `tenant_ids` string[], required — List of tenant IDs to which the recommendation rule is applied.
    - `service_name` 'AWS' | 'Azure' | 'AzureStack' | 'Azure_CSP' | 'Azure_CSP-Direct' | 'Azure_EA' | 'Azure_MCA' | 'Cloudstack' | 'GCP' | 'MS_VMM' | 'OCI' | 'Openstack' | 'PrivateCloud' | 'Rackspace' | 'VMware' | 'VMware_VCD' | 'vCenter', required — Cloud Provider to select
    - `service_account_ids` string[] — List of service account IDs to which the recommendation rule is applied.
    - `filters` QueryOperator
      - `__type` string, required — Concrete type used for polymorphic deserialization (discriminator)
  - `policy_classification` PolicyClassificationWithSubClassifications
    - `access` string[] — List of Access sub-classifications
    - `cost` string[] — List of Cost sub-classifications
    - `data` string[] — List of Data sub-classifications
    - `network` string[] — List of Network sub-classifications
    - `operation` string[] — List of Operation sub-classifications
    - `performance` string[] — List of performance sub-classifications
    - `resource` string[] — List of Resource sub-classifications
    - `security` string[] — List of security sub classifications
  - `rule_id` string — ID of the Rule
  - `created_by` string — Name of the user who created the rule.
  - `created_at` string, date-time — Recommendation exclusion rule created time
  - `updated_by` string — Name of the user who recently updated the rule.
  - `updated_at` string, date-time — Recommendation exclusion rule updated time

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `500` — Internal Server Error

---

[API](https://skmtc.dev/corestack/apis/corestack-external-api.md) · [All operations](https://skmtc.dev/corestack/apis/corestack-external-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/corestack/corestack-external-api/revisions/bf2cdf20826d/schema)
