Create Customization Specs
Released in v7.0.0Creates a customization specification.
Request
URLURL
https://{api_host}/rest/vcenter/guest/customization-specs
Header Parameters
Header Parameters
string
vmware-api-session-id
Required
Required session ID, acquired from Create Session API under CIS product
vmware-api-session-id Example
b00db39f948d13ea1e59b4d6fce56389
Request Body
Request Body
GuestCustomizationSpecsCreateRequestBody of type application/json (required){
"spec": {
"description": "string",
"name": "string",
"spec": {
"configuration_spec": {},
"global_DNS_settings": {},
"interfaces": [
{
"adapter": {}
}
]
}
}
}
spec
Required
The information i.e. name, description and the settings i.e hostname, ip address etc for the new customization specification that needs to be created.
Response
Response
Response BodyResponse Body
200 OK returns
GuestCustomizationSpecsCreateResponseBody
of type application/json
The name of the customization specification that is created. The result will be an identifier for the resource type: com.vmware.vcenter.guest.CustomizationSpec.
{
"value": "string"
}
string
value
Optional
The name of the customization specification that is created. The result will be an identifier for the resource type: com.vmware.vcenter.guest.CustomizationSpec.
cURL Command
curl -X POST -H "vmware-api-session-id: b00db39f948d13ea1e59b4d6fce56389" -H "Content-Type: application/json" -d '{"spec":{"description":"string","name":"string","spec":{"configuration_spec":{"linux_config":{"domain":"string","hostname":{"fixed_name":"string","prefix":"string","type":"enum"},"script_text":"string","time_zone":"string"},"windows_config":{"reboot":"enum","sysprep":{"domain":{"domain":"string","domain_password":"string","domain_username":"string","type":"enum","workgroup":"string"},"gui_run_once_commands":["string"],"gui_unattended":{"auto_logon":false,"auto_logon_count":0,"password":"string","time_zone":0},"user_data":{"computer_name":{"fixed_name":"string","prefix":"string","type":"enum"},"full_name":"string","organization":"string","product_key":"string"}},"sysprep_xml":"string"}},"global_DNS_settings":{"dns_servers":["string"],"dns_suffix_list":["string"]},"interfaces":[{"adapter":{"ipv4":{"gateways":["string"],"ip_address":"string","prefix":0,"type":"enum"},"ipv6":{"gateways":["string"],"ipv6":[{"ip_address":"string","prefix":0}],"type":"enum"},"windows":{"dns_domain":"string","dns_servers":["string"],"net_BIOS_mode":"enum","wins_servers":["string"]}},"mac_address":"string"}]}}}' https://{api_host}/rest/vcenter/guest/customization-specs
Errors
400
com.vmware.vapi.std.errors.already_exists : if a customization specification is already present with the same name. | com.vmware.vapi.std.errors.invalid_argument : if the specified specification is not a valid one.
403
com.vmware.vapi.std.errors.unauthorized : if the user doesn't have the required privileges.
503
com.vmware.vapi.std.errors.service_unavailable : if the system is unable to communicate with a service to complete the request.
default
'Default' means this response is used for all HTTP codes that are not covered individually for this operation.