Rule Enforcement
This contains APIs related to Rule Enforcement
Account Identifier for the Entity.
Bad Request
This is Failure entity as defied in Harness
Not Found
Internal server error
Returns newly created rule enforcement.
POST /gateway/ccm/api/governance/enforcement?accountIdentifier=text HTTP/1.1
Host: nextgen-ce-d788d786-jz7g5
Content-Type: application/json
Accept: */*
Content-Length: 582
{
"ruleEnforcement": {
"uuid": "text",
"accountId": "text",
"name": "text",
"description": "text",
"tags": [
"text"
],
"orgIdentifier": "text",
"projectIdentifier": "text",
"cloudProvider": "AWS",
"ruleIds": [
"text"
],
"ruleSetIDs": [
"text"
],
"executionSchedule": "text",
"executionTimezone": "text",
"targetAccounts": [
"text"
],
"targetRegions": [
"text"
],
"isDryRun": true,
"deleted": true,
"runCount": 1,
"isEnabled": true,
"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 enforcement
Account Identifier for the Entity.
Bad Request
This is Failure entity as defied in Harness
Not Found
Internal server error
Updated Rule enforcement.
PUT /gateway/ccm/api/governance/enforcement?accountIdentifier=text HTTP/1.1
Host: nextgen-ce-d788d786-jz7g5
Content-Type: application/json
Accept: */*
Content-Length: 582
{
"ruleEnforcement": {
"uuid": "text",
"accountId": "text",
"name": "text",
"description": "text",
"tags": [
"text"
],
"orgIdentifier": "text",
"projectIdentifier": "text",
"cloudProvider": "AWS",
"ruleIds": [
"text"
],
"ruleSetIDs": [
"text"
],
"executionSchedule": "text",
"executionTimezone": "text",
"targetAccounts": [
"text"
],
"targetRegions": [
"text"
],
"isDryRun": true,
"deleted": true,
"runCount": 1,
"isEnabled": true,
"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"
}
]
}Delete a Rule enforcement for the given a ID.
Unique identifier for the rule enforcement
Account Identifier for the Entity.
Bad Request
This is Failure entity as defied in Harness
Not Found
Internal server error
A boolean whether the delete was successful or not
DELETE /gateway/ccm/api/governance/enforcement/{enforcementID}?accountIdentifier=text HTTP/1.1
Host: nextgen-ce-d788d786-jz7g5
Accept: */*
{
"status": "SUCCESS",
"code": "DEFAULT_ERROR_CODE",
"message": "text",
"correlationId": "text",
"errors": [
{
"fieldId": "text",
"error": "text"
}
]
}Fetch Rule Enforcements for given RuleIds/RuleSetIds
Account Identifier for the Entity.
Bad Request
This is Failure entity as defied in Harness
Not Found
Internal server error
Returns List of Rule Enforcements wrt given RuleIds/RuleSetIds
POST /gateway/ccm/api/governance/enforcement/count?accountIdentifier=text HTTP/1.1
Host: nextgen-ce-d788d786-jz7g5
Content-Type: application/json
Accept: */*
Content-Length: 82
{
"enforcementCount": {
"accountId": "text",
"ruleIds": [
"text"
],
"ruleSetIds": [
"text"
]
}
}{
"status": "SUCCESS",
"code": "DEFAULT_ERROR_CODE",
"message": "text",
"correlationId": "text",
"errors": [
{
"fieldId": "text",
"error": "text"
}
]
}Get Rule Enforcement details
Account Identifier for the Entity.
Enforcement Id
Bad Request
This is Failure entity as defied in Harness
Enforcement not found
Internal server error
Returns Enforcement details
GET /gateway/ccm/api/governance/enforcement/details?accountIdentifier=text HTTP/1.1
Host: nextgen-ce-d788d786-jz7g5
Accept: */*
{
"status": "SUCCESS",
"code": "DEFAULT_ERROR_CODE",
"message": "text",
"correlationId": "text",
"errors": [
{
"fieldId": "text",
"error": "text"
}
]
}Get Rule Enforcement savings
Account Identifier for the Entity.
Enforcement Id
Time
List of all possible Operators
Bad Request
This is Failure entity as defied in Harness
Not Found
Internal server error
Returns Enforcement savings
POST /gateway/ccm/api/governance/enforcement/savings?accountIdentifier=text HTTP/1.1
Host: nextgen-ce-d788d786-jz7g5
Content-Type: application/json
Accept: */*
Content-Length: 37
[
{
"operator": "NOT_IN",
"timestamp": 1
}
]{
"status": "SUCCESS",
"code": "DEFAULT_ERROR_CODE",
"message": "text",
"correlationId": "text",
"errors": [
{
"fieldId": "text",
"error": "text"
}
]
}Fetch Rule Enforcement
Account Identifier for the Entity.
Page number
0Number of items per page
20Bad Request
This is Failure entity as defied in Harness
Not Found
Internal server error
Returns List of rules Enforcement
GET /gateway/ccm/api/governance/enforcement/list?accountIdentifier=text HTTP/1.1
Host: nextgen-ce-d788d786-jz7g5
Accept: */*
{
"status": "SUCCESS",
"code": "DEFAULT_ERROR_CODE",
"message": "text",
"correlationId": "text",
"errors": [
{
"fieldId": "text",
"error": "text"
}
]
}Fetch Rule Enforcements for account with filters
Account Identifier for the Entity.
This has the query to list the RuleEnforcement
ruleIds
isDryRun
searchKey
targetAccounts
targetRegions
isEnabled
ruleEnforcementSortType
sortOrder
pageNumber
pageSize
Bad Request
This is Failure entity as defied in Harness
Not Found
Internal server error
Returns List of rules Enforcement
POST /gateway/ccm/api/governance/enforcement/list?accountIdentifier=text HTTP/1.1
Host: nextgen-ce-d788d786-jz7g5
Content-Type: application/json
Accept: */*
Content-Length: 193
{
"ruleIds": [
"text"
],
"isDryRun": true,
"searchKey": "text",
"targetAccounts": [
"text"
],
"targetRegions": [
"text"
],
"isEnabled": true,
"sortType": "NAME",
"sortOrder": "ASCENDING",
"pageNumber": 1,
"pageSize": 1
}{
"status": "SUCCESS",
"code": "DEFAULT_ERROR_CODE",
"message": "text",
"correlationId": "text",
"errors": [
{
"fieldId": "text",
"error": "text"
}
]
}Toggle a Rule Enforcement
Account Identifier for the Entity.
Enforcement Id
Enable Enforcement
Bad Request
This is Failure entity as defied in Harness
Not Found
Internal server error
True/false if Rule Enforcement successfully toggled
PUT /gateway/ccm/api/governance/enforcement/toggle?accountIdentifier=text HTTP/1.1
Host: nextgen-ce-d788d786-jz7g5
Accept: */*
{
"status": "SUCCESS",
"code": "DEFAULT_ERROR_CODE",
"message": "text",
"correlationId": "text",
"errors": [
{
"fieldId": "text",
"error": "text"
}
]
}Last updated
Was this helpful?