EnterpriseLimitsByDatacentersResource


Create a datacenter limit


Allow an enterprise to use a datacenter or public cloud region. When you create the datacenter limit, a cloud location is created for the enterprise. To allow an enterprise to use a datacenter with unlimited resources at this level, set limit values to 0. To create a datacenter limit, the data entity should contain a link to a datacenter or public cloud region with a "rel" value of "location". It may also include links to resources that the enterprise is allowed to use in a dataenter, such as datastore tiers and backup policies.

POST https://example.com/api/admin/enterprises/{enterprise}/limits

Roles : [ROLE_USERS_MANAGE_ENTERPRISE]

Content-Type : limit Accept : limit

Error Codes

  • CONSTR-LIMITRANGE - The property 'ramLimitsInMb' invalid limit range for ram: soft = 0; hard = 1.
  • DC-0 - The requested datacenter does not exist
  • DSTIER-0 - The requested datastore tier does not exist
  • GEN-5 - Invalid credentials
  • LIMIT-16 - Datacenter identifier from tier link does not match the identifier from datacenter link
  • LIMIT-21 - Datacenter identifier from datastore tier link does not match the identifier from datacenter link
  • LIMIT-24 - Invalid link of the backup policy to allow
  • LIMIT-27 - Datacenter identifier from hardware profile link does not match the identifier from datacenter link
  • LIMIT-7 - Duplicate limits by enterprise and datacenter
  • LOCATION-1 - The location link is required
  • PROFILEDC-2 - The requested hardware profile does not exist in this datacenter
  • PUBLICREGION-14 - The requested public cloud region does not support storage limits
  • PUBLICREGION-15 - The requested public cloud region does not support repository limits
  • PUBLICREGION-8 - The requested public cloud region does not exist
  • RS-2 - The remote service does not exist
  • TIER-0 - The requested storage tier does not exist

Example

List datacenter limits of an enterprise


Retrieve the limits of an enterprise in all datacenters, or in a single datacenter given its identifier. If an enterprise does not have a datacenter limit for a particular datacenter, the enterprise is not allowed to use that datacenter. This functionality also applies to public cloud regions in the same way.

GET https://example.com/api/admin/enterprises/{enterprise}/limits

Roles : [ROLE_USERS_MANAGE_ENTERPRISE, ROLE_VDC_ENUMERATE, ROLE_APPLIB_VIEW, ROLE_PHYS_DC_ALLOW_MODIFY_NETWORK]

Parameter Type Default Value Description
datacenter Integer Optional identifier of the datacenter. If supplied, and the datacenter is allowed, return the limit for the datacenter; if it's not allowed, return a permissions error; also return an error if the datacenter does not exist.

Accept : limits

Example

Delete a datacenter limit


Prohibit an enterprise from using a datacenter or public cloud region.

DELETE https://example.com/api/admin/enterprises/{enterprise}/limits/{limit}

Roles : [ROLE_USERS_MANAGE_ENTERPRISE]

Example

Get a datacenter limit


Get datacenter limits for all the allowed datacenters of the current enterprise.

GET https://example.com/api/admin/enterprises/{enterprise}/limits/{limit}

Roles : [ROLE_USERS_MANAGE_ENTERPRISE]

Accept : limit

Error Codes

  • LIMIT-8 - Limits by enterprise and datacenter do not exist

Example

Update a datacenter limit


Update the limit for the enterprise in a given datacenter or public cloud region. If the limit has links to one or more tiers, the platform will allow the enterprise to use the corresponding tiers.

PUT https://example.com/api/admin/enterprises/{enterprise}/limits/{limit}

Roles : [ROLE_USERS_MANAGE_ENTERPRISE]

Content-Type : limit Accept : limit

Error Codes

  • CONSTR-LIMITRANGE - The property 'cpuCountLimits' invalid limit range for cpu: soft = 1000; hard = 100.
  • LIMIT-16 - Datacenter identifier from tier link does not match the identifier from datacenter link
  • LIMIT-17 - Cannot restrict the tier because the enterprise has already created volumes in it
  • LIMIT-18 - Not enough permissions to create/edit the limit in this datacenter
  • LIMIT-22 - Cannot restrict the datastore tier because the enterprise has already created virtual machines in it
  • LIMIT-24 - Invalid link of the backup policy to allow
  • LIMIT-26 - Invalid link of hardware profile to allow
  • LIMIT-27 - Datacenter identifier from hardware profile link does not match the identifier from datacenter link
  • PUBLICREGION-14 - The requested public cloud region does not support storage limits
  • PUBLICREGION-15 - The requested public cloud region does not support repository limits
  • TIER-0 - The requested storage tier does not exist

Example

List virtual appliances of an enterprise in a datacenter


List all virtual appliances defined in the datacenter by an enterprise (from a datacenter limit).

GET https://example.com/api/admin/enterprises/{enterprise}/limits/{limit}/action/virtualappliances

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS]

Error Codes

  • LIMIT-8 - Limits by enterprise and datacenter do not exist

Example