For the complete documentation index, see llms.txt. This page is also available as Markdown.

Rule

This contains APIs related to Governance Rule Management

Clone a rule

post

Clone a Rule with the given ID.

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

Body
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/governance/ruleClone
POST /gateway/ccm/api/governance/ruleClone?accountIdentifier=text HTTP/1.1
Host: nextgen-ce-d788d786-ssnpc
Content-Type: application/json
Accept: */*
Content-Length: 29

{
  "ruleClone": {
    "uuid": "text"
  }
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Add a rule

post

Create a new governance rule.

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

Body
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/governance/rule
POST /gateway/ccm/api/governance/rule?accountIdentifier=text HTTP/1.1
Host: nextgen-ce-d788d786-ssnpc
Content-Type: application/json
Accept: */*
Content-Length: 677

{
  "rule": {
    "uuid": "text",
    "accountId": "text",
    "name": "text",
    "description": "text",
    "rulesYaml": "text",
    "tags": [
      "text"
    ],
    "orgIdentifier": "text",
    "projectIdentifier": "text",
    "cloudProvider": "AWS",
    "versionLabel": "text",
    "isStablePolicy": true,
    "storeType": "INLINE",
    "isOOTB": true,
    "deleted": true,
    "forRecommendation": true,
    "resourceType": "text",
    "isMultiPolicyRule": false,
    "subRulePolicyDetails": [
      {
        "name": "text",
        "yaml": "text",
        "resourceType": "text"
      }
    ],
    "savings": 1,
    "forInventory": true,
    "schedule": "text",
    "createdAt": 1,
    "lastUpdatedAt": 1,
    "createdBy": {
      "uuid": "text",
      "name": "text",
      "email": "text",
      "externalUserId": "text"
    },
    "lastUpdatedBy": {
      "uuid": "text",
      "name": "text",
      "email": "text",
      "externalUserId": "text"
    }
  }
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Update a Rule

put

Update a Rule

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

Body
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
put/governance/rule
PUT /gateway/ccm/api/governance/rule?accountIdentifier=text HTTP/1.1
Host: nextgen-ce-d788d786-ssnpc
Content-Type: application/json
Accept: */*
Content-Length: 677

{
  "rule": {
    "uuid": "text",
    "accountId": "text",
    "name": "text",
    "description": "text",
    "rulesYaml": "text",
    "tags": [
      "text"
    ],
    "orgIdentifier": "text",
    "projectIdentifier": "text",
    "cloudProvider": "AWS",
    "versionLabel": "text",
    "isStablePolicy": true,
    "storeType": "INLINE",
    "isOOTB": true,
    "deleted": true,
    "forRecommendation": true,
    "resourceType": "text",
    "isMultiPolicyRule": false,
    "subRulePolicyDetails": [
      {
        "name": "text",
        "yaml": "text",
        "resourceType": "text"
      }
    ],
    "savings": 1,
    "forInventory": true,
    "schedule": "text",
    "createdAt": 1,
    "lastUpdatedAt": 1,
    "createdBy": {
      "uuid": "text",
      "name": "text",
      "email": "text",
      "externalUserId": "text"
    },
    "lastUpdatedBy": {
      "uuid": "text",
      "name": "text",
      "email": "text",
      "externalUserId": "text"
    }
  }
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Get a governance rule

get

Get a governance rule with the given ID.

Path parameters
ruleIDstringRequired

Unique identifier for the rule

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
get/governance/rule/{ruleID}
GET /gateway/ccm/api/governance/rule/{ruleID}?accountIdentifier=text HTTP/1.1
Host: nextgen-ce-d788d786-ssnpc
Accept: */*
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Delete a rule

delete

Delete a Rule with the given ID.

Path parameters
ruleIDstringRequired

Unique identifier for the rule

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
delete/governance/rule/{ruleID}
DELETE /gateway/ccm/api/governance/rule/{ruleID}?accountIdentifier=text HTTP/1.1
Host: nextgen-ce-d788d786-ssnpc
Accept: */*
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Enqueue jobs for evaluation.

post

Enqueue jobs for evaluation.

Query parameters
accountIdentifierstringOptional

Account Identifier for the Entity.

Body
ruleEnforcementIdstringOptional
ruleEnforcementRecommendationIdstringOptional
ruleCloudProviderTypestring · enumOptionalPossible values:
ruleIdstringOptional
policystringOptional
targetRegionstringOptional
isDryRunbooleanOptional
isOOTBbooleanOptional
executionTypestring · enumOptionalPossible values:
isMultiPolicyRulebooleanWrite-onlyOptional
isGovCloudConnectorbooleanWrite-onlyOptional
ruleExecutionIdstringOptional
pricingCostTypestringOptional
multiPolicyRulebooleanOptional
govCloudConnectorbooleanOptional
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/governance/enqueue
POST /gateway/ccm/api/governance/enqueue HTTP/1.1
Host: nextgen-ce-d788d786-ssnpc
Content-Type: application/json
Accept: */*
Content-Length: 692

{
  "ruleEnforcementId": "text",
  "ruleEnforcementRecommendationId": "text",
  "targetAccountDetails": {
    "targetInfo": "text",
    "authType": "text",
    "roleId": "text",
    "targetName": "text",
    "tenantInfo": "text",
    "cloudConnectorId": "text",
    "isGovCloudConnector": true,
    "roleInfo": "text",
    "isCostBreakdownRequired": true,
    "oidcAuthParams": {},
    "type": "text"
  },
  "ruleCloudProviderType": "AWS",
  "ruleId": "text",
  "policy": "text",
  "targetRegion": "text",
  "isDryRun": true,
  "isOOTB": true,
  "executionType": "INTERNAL",
  "isMultiPolicyRule": true,
  "subRulePolicyDetails": [
    {
      "name": "text",
      "yaml": "text",
      "resourceType": "text"
    }
  ],
  "isGovCloudConnector": true,
  "ruleExecutionId": "text",
  "pricingCostType": "text",
  "multiPolicyRule": true,
  "govCloudConnector": true
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Simple Request to enqueue rule for execution

post

Simple Request to enqueue rule for execution

Query parameters
accountIdentifierstringOptional

Account Identifier for the Entity.

Body
targetAccountsstring[]Required

Target account_id/subscription_id/project_id

targetRegionsstring[]Optional

Target region required for AWS/AZURE

ruleIdstringRequired

Rule id/uuid

isDryRunbooleanOptional

Set to true for dry run or false for actual run

Default: true
Responses
202

Enqueued governance rule for evaluation and return list evaluation ids

application/json
post/governance/enqueueAdhocV2
POST /gateway/ccm/api/governance/enqueueAdhocV2 HTTP/1.1
Host: nextgen-ce-d788d786-ssnpc
Content-Type: application/json
Accept: */*
Content-Length: 84

{
  "targetAccounts": [
    "text"
  ],
  "targetRegions": [
    "text"
  ],
  "ruleId": "text",
  "isDryRun": true
}

List resources for which cost co-relation is supported.

get

List resources for which cost co-relation is supported.

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
get/governance/rule/costCoRelationSupportedResources
GET /gateway/ccm/api/governance/rule/costCoRelationSupportedResources?accountIdentifier=text HTTP/1.1
Host: nextgen-ce-d788d786-ssnpc
Accept: */*
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Custodian Schema

get

Get custodian schema for governance rule validation

Query parameters
accountIdentifierstringRequired
projectIdentifierstringOptional
orgIdentifierstringOptional
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
get/governance/ruleSchema
GET /gateway/ccm/api/governance/ruleSchema?accountIdentifier=text HTTP/1.1
Host: nextgen-ce-d788d786-ssnpc
Accept: */*
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Fetch potential rules that can be enabled for recommendation for account

get

Fetch potential rules that can be enabled for recommendation for account

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
get/governance/rule/potentialRulesForRecommendation
GET /gateway/ccm/api/governance/rule/potentialRulesForRecommendation?accountIdentifier=text HTTP/1.1
Host: nextgen-ce-d788d786-ssnpc
Accept: */*
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Fetch rules for account

post

Fetch rules

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

RuleNamePatternstringOptional

Search by Rule name pattern

Body
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/governance/rule/list
POST /gateway/ccm/api/governance/rule/list?accountIdentifier=text HTTP/1.1
Host: nextgen-ce-d788d786-ssnpc
Content-Type: application/json
Accept: */*
Content-Length: 317

{
  "query": {
    "accountId": "text",
    "isOOTB": true,
    "orgIdentifier": "text",
    "projectIdentifier": "text",
    "tags": "text",
    "cloudProvider": "text",
    "policyIds": [
      "text"
    ],
    "isStablePolicy": true,
    "search": "text",
    "limit": 1,
    "offset": 1,
    "orderBy": [
      {
        "field": "PERSPECTIVE_ID",
        "order": "ASCENDING"
      }
    ],
    "resourceType": "text",
    "forRecommendation": true
  }
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Governance Targets

get

Get targets with governance enabled and valid permission

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

viewbooleanOptional

View governance target list

cloudProviderstring · enumRequired

Cloud Provider

Possible values:
onlyTargetIdsbooleanOptional

Only Target ids

isDryRunbooleanOptional

Dry Run

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
get/governance/governanceTargetList
GET /gateway/ccm/api/governance/governanceTargetList?accountIdentifier=text&cloudProvider=AWS HTTP/1.1
Host: nextgen-ce-d788d786-ssnpc
Accept: */*
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

List of Regions for Aws/Azure

get

List Aws/Azure Regions for filtering resources.

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

cloudProviderstring · enumRequired

Cloud Provider

Possible values:
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
get/governance/regions
GET /gateway/ccm/api/governance/regions?accountIdentifier=text&cloudProvider=AWS HTTP/1.1
Host: nextgen-ce-d788d786-ssnpc
Accept: */*
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Enable/Disable a custom Rule to be considered for recommendation

put

Toggle a Rule for Recommendation

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

ruleIdstringOptional

Rule Id

enableRuleForRecommendationbooleanOptional

Enable rule for Recommendation

Body
cloudAccountIdsstring[]Optional
enableGranularRecommendationbooleanOptional
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
put/governance/rule/toggleForRecommendation
PUT /gateway/ccm/api/governance/rule/toggleForRecommendation?accountIdentifier=text HTTP/1.1
Host: nextgen-ce-d788d786-ssnpc
Content-Type: application/json
Accept: */*
Content-Length: 64

{
  "cloudAccountIds": [
    "text"
  ],
  "enableGranularRecommendation": true
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Validate Governance Rule

post

Validate governance rule for syntactical errors.

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

Body
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/governance/ruleValidate
POST /gateway/ccm/api/governance/ruleValidate?accountIdentifier=text HTTP/1.1
Host: nextgen-ce-d788d786-ssnpc
Content-Type: application/json
Accept: */*
Content-Length: 677

{
  "rule": {
    "uuid": "text",
    "accountId": "text",
    "name": "text",
    "description": "text",
    "rulesYaml": "text",
    "tags": [
      "text"
    ],
    "orgIdentifier": "text",
    "projectIdentifier": "text",
    "cloudProvider": "AWS",
    "versionLabel": "text",
    "isStablePolicy": true,
    "storeType": "INLINE",
    "isOOTB": true,
    "deleted": true,
    "forRecommendation": true,
    "resourceType": "text",
    "isMultiPolicyRule": false,
    "subRulePolicyDetails": [
      {
        "name": "text",
        "yaml": "text",
        "resourceType": "text"
      }
    ],
    "savings": 1,
    "forInventory": true,
    "schedule": "text",
    "createdAt": 1,
    "lastUpdatedAt": 1,
    "createdBy": {
      "uuid": "text",
      "name": "text",
      "email": "text",
      "externalUserId": "text"
    },
    "lastUpdatedBy": {
      "uuid": "text",
      "name": "text",
      "email": "text",
      "externalUserId": "text"
    }
  }
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Last updated

Was this helpful?