Rule
This contains APIs related to Governance Rule Management
Clone a Rule with the given ID.
Account Identifier for the Entity.
Bad Request
This is Failure entity as defied in Harness
Internal server error
Newly Created Cloned Rule
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"
}
]
}Create a new governance rule.
Account Identifier for the Entity.
Bad Request
This is Failure entity as defied in Harness
Internal server error
Returns newly created 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
Account Identifier for the Entity.
Bad Request
This is Failure entity as defied in Harness
Internal server error
Updated 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 with the given ID.
Unique identifier for the rule
Account Identifier for the Entity.
Bad Request
This is Failure entity as defied in Harness
Internal server error
Returns governance rule.
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 with the given ID.
Unique identifier for the rule
Account Identifier for the Entity.
Bad Request
This is Failure entity as defied in Harness
Internal server error
A boolean whether the delete was successful or not
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.
Account Identifier for the Entity.
Bad Request
This is Failure entity as defied in Harness
Internal server error
Returns evaluation id of jobs which are enqueued.
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
Account Identifier for the Entity.
Target account_id/subscription_id/project_id
Target region required for AWS/AZURE
Rule id/uuid
Set to true for dry run or false for actual run
trueEnqueued governance rule for evaluation and return list evaluation ids
Bad Request
Internal server error
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.
Account Identifier for the Entity.
Bad Request
This is Failure entity as defied in Harness
Internal server error
Return List of resources for which cost co-relation is supported.
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"
}
]
}Get custodian schema for governance rule validation
Bad Request
This is Failure entity as defied in Harness
Internal server error
Custodian Governance Rule Schema
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
Account Identifier for the Entity.
Bad Request
This is Failure entity as defied in Harness
Internal server error
Returns potential rules that can be enabled for recommendation for account
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
Account Identifier for the Entity.
Search by Rule name pattern
Bad Request
This is Failure entity as defied in Harness
Internal server error
Returns List of rules
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"
}
]
}Get targets with governance enabled and valid permission
Account Identifier for the Entity.
View governance target list
Cloud Provider
Only Target ids
Dry Run
Bad Request
This is Failure entity as defied in Harness
Internal server error
List of Governance Targets
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 Aws/Azure Regions for filtering resources.
Account Identifier for the Entity.
Cloud Provider
Bad Request
This is Failure entity as defied in Harness
Internal server error
Return List of Aws/Azure 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"
}
]
}Toggle a Rule for Recommendation
Account Identifier for the Entity.
Rule Id
Enable rule for Recommendation
Bad Request
This is Failure entity as defied in Harness
Internal server error
True/false if toggle is successful
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 for syntactical errors.
Account Identifier for the Entity.
Bad Request
This is Failure entity as defied in Harness
Internal server error
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?