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
Path Parameters
Body ()
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 : items
Type: array
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : CloudBuckLimit
Type: object
Title: CloudBuckLimit
Show Source
Nested Schema : createdOn
Type: object
Nested Schema : modifiedOn
Type: object
Back to Top

Response

Supported Media Types

201 Response

Success
Body ()
Root Schema : schema
Type: file

Default Response

Unexpected error.
Back to Top

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"
	}
  ]
}
Back to Top