Define prefix for cloud host name Available in versions: 25.1 and higher.
Description Add a custom prefix to Azure virtual machines and Amazon instance names.
URL Copy code /Admin/rest/v1/cloud/templates/{templateId}
Copy Code HTTP Method PATCH
Request Headers:
Content-Type: application/xml
Cookies:
Versions 25.1 and later ADM_LWSSO={ADM_LWSSO_COOKIE_VALUE};
Request Body:
PATCH: An XML with the name prefix.
Request ExampleCopy code PATCH http://<Server> /Admin/rest/v1/cloud/templates/{templateId} Content-Type: application/xml Accept: application/xml Cookie: ADM_LWSSO={AdmLwssoCookie};<CloudTemplate> <HostNamePrefix> ABCDEFG</HostNamePrefix> </CloudTemplate>
Copy Code ResponseHeaders:
Content-Type: application/xml
Cookies:
None
HTML Return Code:
One of the HTTP Return Codes
Upon successful deletion, returns HTTP status 200 (OK).
HTML Body:
The response body contains XML of the patched template.
Response ExampleCopy code <CloudHostTemplate> <ID> 16</ID> <Name> azure_win_new</Name> <ResourceType> cloud-host-templates</ResourceType> <AccountID> 3</AccountID> <AccountName> azure</AccountName> <LocationID> 35</LocationID> <LocationName> South Central US</LocationName> <Installation> OneLG</Installation> <Image> /subscriptions/11113fd5-74d9-4094-a256-e104833f6b82/resourceGroups/LRE_ONELG_QA/providers/Microsoft.Compute/images/LR-LRE_Load_Generator_2024.3_Win2022</Image> <Purpose> Load Generator</Purpose> <InstanceType> Standard_D2s_v3</InstanceType> <SecurityGroupID> 7</SecurityGroupID> <SecurityGroupName> My_SecurityGroup_SouthCentralUS_LG_PORTS (/subscriptions/11113fd5-74d9-4094-a256-e104833f6b82/resourceGroups/ ResourceGroup/providers/Microsoft.Network/networkSecurityGroups/ SecurityGroup_SouthCentralUS_LG_PORTS)</SecurityGroupName> <Platform> Windows</Platform> <UseElasticIP> false</UseElasticIP> <Valid> true</Valid> <NetworkId> 4</NetworkId> <NetworkName> ResourceGroup-vnet</NetworkName> <UsePrivateIP> false</UsePrivateIP> <HostNamePrefix> ABCDEFG -</HostNamePrefix> </CloudHostTemplate>
Copy Code
See Also Manage cloud hosts Get all cloud hosts Audit cloud hosts Get Cloud Account