DatastoreTiersResource


Create a datastore tier


POST https://example.com/api/admin/datacenters/{datacenter}/datastoretiers

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS, ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS, ROLE_PRICING_VIEW, ROLE_USERS_MANAGE_ENTERPRISE]

Content-Type : datastoretier Accept : datastoretier

Error Codes

  • DSTIER-7 - The name of the datastore tier must be unique by datacenter

Example

List datastore tiers


GET https://example.com/api/admin/datacenters/{datacenter}/datastoretiers

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS, ROLE_PRICING_VIEW, ROLE_USERS_MANAGE_ENTERPRISE]

Accept : datastoretiers

Error Codes

  • DC-0 - The requested datacenter does not exist

Example

Delete a datastore tier


You cannot delete the default tier. You cannot delete tiers that contain shared datastores or datastores that contain hard disks.

DELETE https://example.com/api/admin/datacenters/{datacenter}/datastoretiers/{datastoretier}

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS, ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS, ROLE_PRICING_VIEW, ROLE_USERS_MANAGE_ENTERPRISE]

Example

Get a datastore tier


The datastore tier entity has links to the datastores that belong to the tier

GET https://example.com/api/admin/datacenters/{datacenter}/datastoretiers/{datastoretier}

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS, ROLE_PRICING_VIEW, ROLE_USERS_MANAGE_ENTERPRISE]

Accept : datastoretier

Error Codes

  • DC-0 - The requested datacenter does not exist
  • DSTIER-0 - The requested datastore tier does not exist

Example

Update a datastore tier


You can set the tier as the default and enable or disable the tier. To add (including by moving from other tiers) or remove datastores from the tier, see the separate methods

PUT https://example.com/api/admin/datacenters/{datacenter}/datastoretiers/{datastoretier}

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS]

Content-Type : datastoretier Accept : datastoretier

Error Codes

  • DSTIER-5 - The datacenter must have a default datastore tier
  • DSTIER-7 - The name of the datastore tier must be unique by datacenter

Example

Add datastores to a datastore tier


Use this method to add datastores to a datastore tier and also to move datastores from one tier to another. This method accepts a collection of links to datastores.

If a datastore contains managed VMs, it cannot be added and a 409 conflict error is thrown.
All instances of a shared datastore must always be in the same tier. When you add the datastore instance for one physical machine, the platform will attempt to add all the other instances. If any of the instances contains managed VMs, the shared datastore cannot be added and a 409 conflict error is thrown.
You can obtain a list of datastores to add from the List datastores method in the datacenter resource using the "availabletoadd" parameter with the ID of the datastore tier.

PUT https://example.com/api/admin/datacenters/{datacenter}/datastoretiers/{datastoretier}/action/adddatastores

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS]

Parameter Type Default Value Description
force boolean false If true, add the datastores to the datastore tier although it has deployed VMs

Content-Type : links

Example

Allow all enterprises to use a datastore tier


This action allows the datastore tier to be used by all enterprises that use the tier's datacenter, meaning that they have a datacenter limit for the datacenter. The value of the enabled property does not affect this functionality because the tier will be allowed independently of whether it's enabled or disabled, Then the enabled property will be a second level of restriction. Similarly, this action is independent of whether or not the tier is allowed by default

PUT https://example.com/api/admin/datacenters/{datacenter}/datastoretiers/{datastoretier}/action/allowallenterprises

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS]

Example

Release datastores from a datastore tier


Release datastores from a datastore tier. This method accepts a collection of links to datastores.
Use this method when you do not want to add the datastores to another tier. To move datastores from one tier to another, use the Add datastores method

If a datastore has managed VMs, it cannot be released and a 409 conflict error is thrown.
All instances of a shared datastore must always be in the same tier. When you release the datastore instance for one physical machine, the platform will attempt to release all the other instances. If any of the instances has managed VMs, the shared datastore cannot be released and a 409 conflict error is thrown.

PUT https://example.com/api/admin/datacenters/{datacenter}/datastoretiers/{datastoretier}/action/releasedatastores

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS]

Content-Type : links

Example

Restrict all enterprises from using a datastore tier


This action restricts access to the datastore tier for all enterprises. This means that the tier cannot be used by any enterprise. This action supports the use of parameter force.

If some enterprises have hard disks in the datastore tier, then a list of errors will be returned and no action will be taken. If the request is successful, the force parameter does not modify the result and a 204 (NO CONTENT) response code will be returned

PUT https://example.com/api/admin/datacenters/{datacenter}/datastoretiers/{datastoretier}/action/restrictallenterprises

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS]

Parameter Type Default Value Description
force boolean false If true and some enterprises have hard disks in the datastore tier, then a list of errors will be returned but the enterprises without hard disks will be restricted, so they cannot use this tier.

Example

List datastores in a datastore tier


Retrieve a list of datastores by datastore tier.

GET https://example.com/api/admin/datacenters/{datacenter}/datastoretiers/{datastoretier}/datastores

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS]

Parameter Type Default Value Description
startwith Integer 0 The first element to be retrieved of the filtered search
limit Integer 25 The number of entities to retrieve
by String name Order by
has String If present filter to apply in the search.
asc Boolean true If the value of the 'by' parameter must be sorted in ascending order (true) or descending order (false)

Accept : datastores

Example

List enterprises that are allowed to use a datastore tier


GET https://example.com/api/admin/datacenters/{datacenter}/datastoretiers/{datastoretier}/enterprises

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS]

Parameter Type Default Value Description
startwith Integer 0 The first element to be retrieved of the filtered search
limit Integer 25 The number of entities to retrieve
by String name Order by
has String If present filter to apply in the search.
asc Boolean true If the value of the 'by' parameter must be sorted in ascending order (true) or descending order (false)

Accept : enterprises

Example