Define Soft or Hard Limits for Resources
post
/metering/api/v1/cloudbucklimits/{accountId}/{entitlementId}
Define new hard or soft limits for resources of a given service entitlement.
Request
Supported Media Types
- application/vnd.com.oracle.oraclecloud.metering.cloudbucklimits+json
Path Parameters
-
accountId: string
Account name, starts with cacct.
-
entitlementId: string
Service Entitlement Id.
Limit definition.
Root Schema : CloudBuckLimits
Type:
object
Title:
CloudBuckLimits
Encapsulates a collection of Hard and Soft Limits for a resource within a subscription.
Show Source
Nested Schema : CloudBuckLimit
Type:
object
Title:
Show Source
CloudBuckLimit
-
action(optional):
string
-
alertLevel(optional):
number
-
createdBy(optional):
string
-
createdOn(optional):
object createdOn
-
entitlementId(optional):
string
-
id(optional):
string
-
limit(optional):
number
-
limitType(optional):
string
-
maxHardLimit(optional):
string
-
modifiedBy(optional):
string
-
modifiedOn(optional):
object modifiedOn
-
resourceName(optional):
string
-
serviceName(optional):
string
-
skuPartId(optional):
string
-
status(optional):
string
-
valueType(optional):
string
Nested Schema : createdOn
Type:
object
Nested Schema : modifiedOn
Type:
object
Response
Supported Media Types
- application/vnd.com.oracle.oraclecloud.metering.cloudbucklimits+json
201 Response
Success
Root Schema : schema
Type:
file
Default Response
Unexpected error.
Examples
cURL Command
The following example shows how to create hard/soft limits for resources by submitting a POST
request on the REST resource using cURL. For more information about cURL, see Use cURL.
Enter the command on a single line. Line breaks are used in this example for readability.
curl -X POST -u joe@example.com -H "X-ID-TENANT-NAME:myDomain" -H "Accept: application/vnd.com.oracle.oraclecloud.metering.cloudbucklimits+json" -H "Content-Type: application/vnd.com.oracle.oraclecloud.metering.cloudbucklimits+json" "https://itra.oraclecloud.com/metering/api/v1/cloudbucklimits/sseyz05242hng/504299053" -d "@requestbody.json"
Example of Request Body
The following shows an example of the request body content in the requestbody.json
file.
{ "items": [ { "resourceName": "OCPU", "serviceName": "Compute", "limit": 10, "createdBy": "abcxyz@oracle.com", "modifiedBy": "abcxyz@oracle.com", "action": "ALERT", "limitType": "SOFT", "valueType": "ABSOLUTE" } ] }
Example of Response Body
The following example shows the response body in JSON format.
{ "canonicalLink":"http://itra.oraclecloud.com/metering/api/v1/cloudbucklimits/sseyz05242hng/504299053", "items":[ { "createdOn":"2017-06-07T00:05:34.053Z", "entitlementId":"844328258", "id":"896430081", "modifiedOn":"2017-06-07T00:05:34.053Z", "resourceName":"OCPU", "serviceName":"Compute", "limit":10.0, "createdBy":"abcxyz@oracle.com", "action":"ALERT", "alertLevel":2.0, "limitType":"SOFT", "valueType":"ABSOLUTE", "status":"ACTIVE" } ] }