vcenter resource pool: get
Retrieves information about the resource pool indicated by
resource_pool
.
Request:
HTTP request
GET https://{server}/rest/vcenter/resource-pool/{resource_pool}
Path Parameters
Name | Type | Description |
---|---|---|
Required | ||
resource_pool | string | Identifier of the resource pool for which information should be retrieved. |
Response:
HTTP Status Code: 200
Representation:
{
"value" : {
"name" : "string",
"memory_allocation" : {
"shares" : {
"shares" : 1,
"level" : "LOW"
},
"expandable_reservation" : true,
"limit" : 1,
"reservation" : 1
},
"resource_pools" : [
"obj-103",
"obj-103"
],
"cpu_allocation" : {
"shares" : {
"shares" : 1,
"level" : "LOW"
},
"expandable_reservation" : true,
"limit" : 1,
"reservation" : 1
}
}
}
"value" : {
"name" : "string",
"memory_allocation" : {
"shares" : {
"shares" : 1,
"level" : "LOW"
},
"expandable_reservation" : true,
"limit" : 1,
"reservation" : 1
},
"resource_pools" : [
"obj-103",
"obj-103"
],
"cpu_allocation" : {
"shares" : {
"shares" : 1,
"level" : "LOW"
},
"expandable_reservation" : true,
"limit" : 1,
"reservation" : 1
}
}
}
Response Type:
Name | Type | Description |
---|---|---|
bold = required | ||
value | info | Information about the resource pool. |
value.name | string | Name of the vCenter Server resource pool. |
value.resource_pools | string[] | Identifiers of the child resource pools contained in this resource pool. When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: ResourcePool . When operations return a value of this structure as a result, the field will contain identifiers for the resource type: ResourcePool . |
value.cpu_allocation | resource_allocation_info | Resource allocation information for CPU. This attribute was added in vSphere API 7.0.0.0. Optional. This field is optional because it was added in a newer version than its parent node. |
value.cpu_allocation.reservation | long | Amount of resource that is guaranteed available to a resource pool. Reserved resources are not wasted if they are not used. If the utilization is less than the reservation, the resources can be utilized by other running virtual machines. Units are MB fo memory, and MHz for CPU. This attribute was added in vSphere API 7.0.0.0. |
value.cpu_allocation.expandable_reservation | boolean | In a resource pool with an expandable reservation, the reservation can grow beyond the specified value, if the parent resource pool has unreserved resources. A non-expandable reservation is called a fixed reservation. This attribute was added in vSphere API 7.0.0.0. |
value.cpu_allocation.limit | long | The utilization of a resource pool will not exceed this limit, even if there are available resources. This is typically used to ensure a consistent performance of resource pools independent of available resources. If set to -1, then there is no fixed limit on resource usage (only bounded by available resources and shares). Units are MB for memory, and MHz for CPU. This attribute was added in vSphere API 7.0.0.0. |
value.cpu_allocation.shares | shares_info | Shares are used in case of resource contention. This attribute was added in vSphere API 7.0.0.0. |
value.cpu_allocation.shares.level | string | The allocation level. It maps to a pre-determined set of numeric values for shares. If the shares value does not map to a predefined size, then the level is set as CUSTOM. This attribute was added in vSphere API 7.0.0.0. Defines the possible values for the allocation level. This enumeration was added in vSphere API 7.0.0.0. Value is one of: LOW: For CPU: Shares = 500 * number of virtual CPUs. For Memory: Shares = 5 * virtual machine memory size in MB. . This constant was added in vSphere API 7.0.0.0. NORMAL: For CPU: Shares = 1000 * number of virtual CPUs. For Memory: Shares = 10 * virtual machine memory size in MB. . This constant was added in vSphere API 7.0.0.0. HIGH: For CPU: Shares = 2000 * nmumber of virtual CPUs. For Memory: Shares = 20 * virtual machine memory size in MB. . This constant was added in vSphere API 7.0.0.0. CUSTOM: If set, in case there is resource contention the server uses the shares value to determine the resource allocation. This constant was added in vSphere API 7.0.0.0. |
value.cpu_allocation.shares.shares | long | When vcenter.resource_pool.shares_info.level is set to CUSTOM, it is the number of shares allocated. Otherwise, this value is ignored. There is no unit for this value. It is a relative measure based on the settings for other resource pools. . This attribute was added in vSphere API 7.0.0.0. Optional. It is only relevant when level has value CUSTOM. This field is optional and it is only relevant when the value oflevel is CUSTOM. |
value.memory_allocation | resource_allocation_info | Resource allocation information for memory. This attribute was added in vSphere API 7.0.0.0. Optional. This field is optional because it was added in a newer version than its parent node. |
value.memory_allocation.reservation | long | Amount of resource that is guaranteed available to a resource pool. Reserved resources are not wasted if they are not used. If the utilization is less than the reservation, the resources can be utilized by other running virtual machines. Units are MB fo memory, and MHz for CPU. This attribute was added in vSphere API 7.0.0.0. |
value.memory_allocation.expandable_reservation | boolean | In a resource pool with an expandable reservation, the reservation can grow beyond the specified value, if the parent resource pool has unreserved resources. A non-expandable reservation is called a fixed reservation. This attribute was added in vSphere API 7.0.0.0. |
value.memory_allocation.limit | long | The utilization of a resource pool will not exceed this limit, even if there are available resources. This is typically used to ensure a consistent performance of resource pools independent of available resources. If set to -1, then there is no fixed limit on resource usage (only bounded by available resources and shares). Units are MB for memory, and MHz for CPU. This attribute was added in vSphere API 7.0.0.0. |
value.memory_allocation.shares | shares_info | Shares are used in case of resource contention. This attribute was added in vSphere API 7.0.0.0. |
value.memory_allocation.shares.level | string | The allocation level. It maps to a pre-determined set of numeric values for shares. If the shares value does not map to a predefined size, then the level is set as CUSTOM. This attribute was added in vSphere API 7.0.0.0. Defines the possible values for the allocation level. This enumeration was added in vSphere API 7.0.0.0. Value is one of: LOW: For CPU: Shares = 500 * number of virtual CPUs. For Memory: Shares = 5 * virtual machine memory size in MB. . This constant was added in vSphere API 7.0.0.0. NORMAL: For CPU: Shares = 1000 * number of virtual CPUs. For Memory: Shares = 10 * virtual machine memory size in MB. . This constant was added in vSphere API 7.0.0.0. HIGH: For CPU: Shares = 2000 * nmumber of virtual CPUs. For Memory: Shares = 20 * virtual machine memory size in MB. . This constant was added in vSphere API 7.0.0.0. CUSTOM: If set, in case there is resource contention the server uses the shares value to determine the resource allocation. This constant was added in vSphere API 7.0.0.0. |
value.memory_allocation.shares.shares | long | When vcenter.resource_pool.shares_info.level is set to CUSTOM, it is the number of shares allocated. Otherwise, this value is ignored. There is no unit for this value. It is a relative measure based on the settings for other resource pools. . This attribute was added in vSphere API 7.0.0.0. Optional. It is only relevant when level has value CUSTOM. This field is optional and it is only relevant when the value oflevel is CUSTOM. |
Errors:
HTTP Status Code | Type | Description |
---|---|---|
404 | not_found | If the resource pool indicated by resource_pool does not exist. |
503 | service_unavailable | If the system is unable to communicate with a service to complete the request. |
401 | unauthenticated | If the user can not be authenticated. |
403 | unauthorized | If the user doesn't have the required privileges. |