Set this field true if users want Batch to help fetch drivers from a
third party location and install them for GPUs specified in
policy.accelerators or instance_template on their behalf. Default is
false.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[],[],null,["# Interface AllocationPolicy.InstancePolicyOrTemplateOrBuilder (0.16.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.16.0 (latest)](/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplateOrBuilder)\n- [0.15.0](/java/docs/reference/google-cloudevent-types/0.15.0/com.google.events.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplateOrBuilder)\n- [0.14.1](/java/docs/reference/google-cloudevent-types/0.14.1/com.google.events.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplateOrBuilder) \n\n public static interface AllocationPolicy.InstancePolicyOrTemplateOrBuilder extends MessageOrBuilder\n\nImplements\n----------\n\n[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)\n\nMethods\n-------\n\n### getInstallGpuDrivers()\n\n public abstract boolean getInstallGpuDrivers()\n\nSet this field true if users want Batch to help fetch drivers from a\nthird party location and install them for GPUs specified in\npolicy.accelerators or instance_template on their behalf. Default is\nfalse.\n\n`bool install_gpu_drivers = 3;`\n\n### getInstanceTemplate()\n\n public abstract String getInstanceTemplate()\n\nName of an instance template used to create VMs.\nNamed the field as 'instance_template' instead of 'template' to avoid\nc++ keyword conflict.\n\n`string instance_template = 2;`\n\n### getInstanceTemplateBytes()\n\n public abstract ByteString getInstanceTemplateBytes()\n\nName of an instance template used to create VMs.\nNamed the field as 'instance_template' instead of 'template' to avoid\nc++ keyword conflict.\n\n`string instance_template = 2;`\n\n### getPolicy()\n\n public abstract AllocationPolicy.InstancePolicy getPolicy()\n\nInstancePolicy.\n\n`.google.events.cloud.batch.v1.AllocationPolicy.InstancePolicy policy = 1;`\n\n### getPolicyOrBuilder()\n\n public abstract AllocationPolicy.InstancePolicyOrBuilder getPolicyOrBuilder()\n\nInstancePolicy.\n\n`.google.events.cloud.batch.v1.AllocationPolicy.InstancePolicy policy = 1;`\n\n### getPolicyTemplateCase()\n\n public abstract AllocationPolicy.InstancePolicyOrTemplate.PolicyTemplateCase getPolicyTemplateCase()\n\n### hasInstanceTemplate()\n\n public abstract boolean hasInstanceTemplate()\n\nName of an instance template used to create VMs.\nNamed the field as 'instance_template' instead of 'template' to avoid\nc++ keyword conflict.\n\n`string instance_template = 2;`\n\n### hasPolicy()\n\n public abstract boolean hasPolicy()\n\nInstancePolicy.\n\n`.google.events.cloud.batch.v1.AllocationPolicy.InstancePolicy policy = 1;`"]]