GetGCPTemplates

This method is used to return the list of GCP Templates in HCL BigFix CLM.

Method Signature:

GetGCPTemplat es(controlId, async, callback, addlparam)

Sample Response:

[
 {
 "entityId": "TEMP-18974BA2-B053-4B65-87D0-990760350DA6",
 "templateID": "5627274967581802710",
 "name": "instancetemplate3demo",
 "description": "5627274967581802710",
 "kind": "compute#instanceTemplate",
 "machineType": "e2-medium",
 "disksJson": [
 {
 "kind": "compute#attachedDisk",
 "type": "PERSISTENT",
 "boot": true,
 "mode": "READ_WRITE",
 "deviceName": "disk-instancetemplate3demo",
 "initializeParams": {
 "sourceImage": "projects/debian-cloud/global/images/debian-11-bullseye-v20240709",
 "diskType": "projects/hclsw-gcp-dilab/zones/us-central1-a/diskTypes/pd-balanced",
 "diskSizeGb": "10"
 }
 }
 ],
 "metadataJson": {
 "kind": "compute#metadata",
 "fingerprint": "MZnMQPSeMZI="
 },
 "networkInterfacesJson": [
 {
 "name": "nic0",
 "kind": "compute#networkInterface",
 "network": "https://www.googleapis.com/compute/v1/projects/hclsw-gcp-dilab/global/networks/vpc3demo",
 "subnetwork": "https://www.googleapis.com/compute/v1/projects/hclsw-gcp-dilab/regions/us-central1/subnetworks/subnet3demo",
 "accessConfigs": [
 {
 "kind": "compute#accessConfig",
 "name": "External NAT",
 "type": "ONE_TO_ONE_NAT",
 "networkTier": "PREMIUM"
 }
 ]
 }
 ],
 "schedulingJson": {
 "onHostMaintenance": "MIGRATE",
 "automaticRestart": true,
 "preemptible": false,
 "provisioningModel": "STANDARD"
 },
 "selfLink": "https://www.googleapis.com/compute/v1/projects/hclsw-gcp-dilab/global/instanceTemplates/instancetemplate3demo",
 "associatedServicePlans": []
 }
]

Parameter Details:

Table 1. GetGCPTemplates
Parameter Name Type Mandatory Description
controlId String N

Id of ‘Select’ control to be populated.

If Id Control of dynamic UI is passed, then control will be populated with values return from this function else “Result set” will be returned in JSON format.

Async Boolean N

In case it’s False:

Function will be called in synchronous mode. i.e. Current execution will wait for method execution to complete

In case it’s True:

Function will be called asynchronously. Execution will not wait for method execution completion. It will jump to next statement.

Callback Function N User can pass function name that can be executed on completion of Parent function call.
addlparam Object N

Addlparam is used for filtering and sorting the records. It contains 3 properties filter/sortby/sortorder.

To Filter:

To filter records based on column name received from output. e.g., filter="keyname='keyvalue'"

To Sort By:

To sort the data based on column name. e.g., sortby="keyname"

To Sort Order:

To define sorting order either ASC (Ascending) or DESC (descending). e.g., sortorder="ASC”