Orchestrator Function: VCFA Host Create

by Simon Sparks · 28 February 2026

To use this function add it to the class library file named OrchestratorPluginVCFAService.ts

GitHub Repository: https://github.com/SimonSparksUK/Orchestrator

Filename: OrchestratorPluginVCFAService.ts

Public Function: VcfaHostCreate

publicVcfaHostCreate(strDisplayName:string,strHostnameFQDN:string,strOrganization:string,strVcfaApiToken:string,strKubernetesAPIVersion:string,blnPersist:boolean=true,strSessionMode:"Shared Session"|"Per User Session"):VCFAHost{

letobjRequest:any={
name:strDisplayName,
host:strHostnameFQDN,
tenant:strOrganization,
sessionMode:strSessionMode,
apiToken:strVcfaApiToken,
k8sApiVersion:strKubernetesAPIVersion
};

try{
letobjVCFAHost:VCFAHost;

if (blnPersist===true){
letstrVCFAHostId:string=VCFAHostManager.save(objRequest);

objVCFAHost=this.FindForType<VCFAHost>("Host",strVCFAHostId);
}
else{
objVCFAHost=VCFAHostManager.createHost(objRequest);
}

letblnValid:boolean=objVCFAHost.validate();

if (blnValid===true){
returnobjVCFAHost;
}
else{
returnnull;
}
}
catch (objException){
returnnull;
}
}
TypeScript

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.

You may also like