Introduction
A fault domain consists of one or more ESXI hosts and Datastore Clusters grouped together according to their physical location in the datacenter.
The following table shows a brief description and HTTP methods allowed to interact with Fault Domains.
Panel | ||||
---|---|---|---|---|
On this page:
|
Resource | URI | Description | GET | POST | PUT | PATCH |
---|---|---|---|---|---|---|
Fault Domain | /domain | Fault Domain resource. List fault domains and their attributes |
Note | |||||
---|---|---|---|---|---|
| |||||
Remember, you can also show what methods are allowed and method description, parameters, etc. by making an OPTIONS HTTP request to /v2/domain.
|
List
In order to list allowed Fault Domains you should make a GET request to the endpoint /v2/domain passing your access token. As a result, you will get a reference URI /v2/domain/<moref> to get detailed information about that domain, human readable name and Managed Object Reference (moref).
Name | Type | Description |
---|---|---|
Name | string | Fault Domain Human readable name |
moref | string | vCenter Managed Object Reference (moref) |
_links | array | List of URIs related to the resource. |
The following examples implements HTTPie and CURL to list available fault domains:
Code Block |
---|
http -a $TK GET "https://vss-api.eis.utoronto.ca:8001/v2/domain" "Authorization: Bearer $TK" curl -H "Authorization: Bearer $TK" -u $TK -X GET "https://vss-api.eis.utoronto.ca:8001/v2/dmoain" |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{ "_links": { "api": "https://vss-api.eis.utoronto.ca:8001/v2/", "self": "https://vss-api.eis.utoronto.ca:8001/v2/domain" }, "data": [ { "_links": { "self": "https://vss-api.eis.utoronto.ca:8001/v2/domain/domain-c4252" }, "moref": "domain-c4252", "name": "FD2" }, { "_links": { "self": "https://vss-api.eis.utoronto.ca:8001/v2/domain/domain-c4402" }, "moref": "domain-c4402", "name": "FD1" }, { "_links": { "self": "https://vss-api.eis.utoronto.ca:8001/v2/domain/domain-c5877" }, "moref": "domain-c5877", "name": "FD3" } ], "meta": { "count": 3, "time": "0.19787s", "user": "jm" } } |
Filters
This resource has two main filters to narrow down the number of Fault Domains shown in the result.
Name | Description |
---|---|
Name | Fault Domain human readable name |
moref | vCenter Managed Object Reference (moref) |
The following examples show how to structure a GET request, with filters:
Code Block |
---|
http -a $TK GET "https://vss-api.eis.utoronto.ca:8001/v2/domain?name=FD2" http -a $TK GET "https://vss-api.eis.utoronto.ca:8001/v2/domain?moref=4402" |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{ "_links": { "api": "https://vss-api.eis.utoronto.ca:8001/v2/", "self": "https://vss-api.eis.utoronto.ca:8001/v2/domain" }, "data": [ { "_links": { "self": "https://vss-api.eis.utoronto.ca:8001/v2/domain/domain-c4252" }, "moref": "domain-c4252", "name": "FD2" } ], "meta": { "count": 1, "time": "0.20156s", "user": "jm" } } |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{ "_links": { "api": "https://vss-api.eis.utoronto.ca:8001/v2/", "self": "https://vss-api.eis.utoronto.ca:8001/v2/domain" }, "data": [ { "_links": { "self": "https://vss-api.eis.utoronto.ca:8001/v2/domain/domain-c4402" }, "moref": "domain-c4402", "name": "FD1" } ], "meta": { "count": 1, "time": "0.20156s", "user": "jm" } } |
List specific Fault Domain Info
Some of the attributes will have an object value. Such is the case of items in attribute vms.
Name | Type | Description |
---|---|---|
name | string | Fault Domain name. |
moref | string | vCenter Managed object reference. |
status | string | Fault Domain general "health" value:
|
vms | array | Array of Virtual Machines hosted in given fault domain. |
The following example, requests information about a particular Fault domain using the base resource /v2/domain and appending the moref to get the URI /v2/domain/domain-c5877:
Code Block |
---|
http -a $TK GET https://vss-api.eis.utoronto.ca:8001/v2/domain/domain-c5877 "Authorization: Bearer $TK" curl -H "Authorization: Bearer $TK" -u $TK -X GET https://vss-api.eis.utoronto.ca:8001/v2/domain/domain-c5877 |
HTTP response body would look something like:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{ "_links": { "domain": "https://vss-api.eis.utoronto.ca:8001/v2/domain", "self": "https://vss-api.eis.utoronto.ca:8001/v2/domain/domain-c5877" }, "data": { "datastoreCount": 15, "hostsCount": 4, "moref": "domain-c5877", "name": "FD3", "status": "green", "vms": [ { "_links": { "self": "https://vss-api.eis.utoronto.ca:8001/v2/vm/5012f4f0-443b-9cc4-1256-3d78093e7d30" }, "name": "Ubuntu_64b-14.04" }, { "_links": { "self": "https://vss-api.eis.utoronto.ca:8001/v2/vm/50122e44-9ddd-2497-7b6c-a3bc52749c52" }, "name": "CentOS_64b-7" }, { "_links": { "self": "https://vss-api.eis.utoronto.ca:8001/v2/vm/5012dae7-925b-b97a-97b8-4a40e5663147" }, "name": "Ubuntu_64b-14.10" }, { "_links": { "self": "https://vss-api.eis.utoronto.ca:8001/v2/vm/5012826a-6a1a-815a-249d-7d6eb640f020" }, "name": "1604T-Ubuntu1" }, { "_links": { "self": "https://vss-api.eis.utoronto.ca:8001/v2/vm/50125d11-a8d6-2af7-c01e-dc6f6be0e607" }, "name": "1604T-Ubuntu34" }, { "_links": { "self": "https://vss-api.eis.utoronto.ca:8001/v2/vm/501210c6-7d40-b31f-b326-f66325ca27a0" }, "name": "1604T-Ubuntu2" }, { "_links": { "self": "https://vss-api.eis.utoronto.ca:8001/v2/vm/50123c4c-c810-5c0f-6203-eac67f0cb7e8" }, "name": "Ubuntu_64b-16.04_LTS" } ] }, "meta": { "count": 8, "time": "1.62886s", "user": "jm" } } |
Note |
---|
Attribute VMs contain Hypermedia Control to each VM you have access to in that particular Fault Domain. |