@BetaApi
  public final Operation insertTargetInstance(String zone, TargetInstance targetInstanceResource) {

    InsertTargetInstanceHttpRequest request =
        InsertTargetInstanceHttpRequest.newBuilder()
            .setZone(zone)
            .setTargetInstanceResource(targetInstanceResource)
            .build();
    return insertTargetInstance(request);
  }
@ BetaApi public final Operation insertTargetInstance ( String zone , TargetInstance targetInstanceResource ) { InsertTargetInstanceHttpRequest request = InsertTargetInstanceHttpRequest . newBuilder ( ) . setZone ( zone ) . setTargetInstanceResource ( targetInstanceResource ) . build ( ) ; return insertTargetInstance ( request ) ; }
Creates a TargetInstance resource in the specified project and zone using the data included in
the request.

<p>Sample code:

<pre><code>
try (TargetInstanceClient targetInstanceClient = TargetInstanceClient.create()) {
ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
TargetInstance targetInstanceResource = TargetInstance.newBuilder().build();
Operation response = targetInstanceClient.insertTargetInstance(zone.toString(), targetInstanceResource);
}
</code></pre>

@param zone Name of the zone scoping this request.
@param targetInstanceResource A TargetInstance resource. This resource defines an endpoint
instance that terminates traffic of certain protocols. (== resource_for
beta.targetInstances ==) (== resource_for v1.targetInstances ==)
@throws com.google.api.gax.rpc.ApiException if the remote call fails