@BetaApi
  public final Operation setLabelsInstance(
      String instance, InstancesSetLabelsRequest instancesSetLabelsRequestResource) {

    SetLabelsInstanceHttpRequest request =
        SetLabelsInstanceHttpRequest.newBuilder()
            .setInstance(instance)
            .setInstancesSetLabelsRequestResource(instancesSetLabelsRequestResource)
            .build();
    return setLabelsInstance(request);
  }
@ BetaApi public final Operation setLabelsInstance ( String instance , InstancesSetLabelsRequest instancesSetLabelsRequestResource ) { SetLabelsInstanceHttpRequest request = SetLabelsInstanceHttpRequest . newBuilder ( ) . setInstance ( instance ) . setInstancesSetLabelsRequestResource ( instancesSetLabelsRequestResource ) . build ( ) ; return setLabelsInstance ( request ) ; }
Sets labels on an instance. To learn more about labels, read the Labeling Resources
documentation.

<p>Sample code:

<pre><code>
try (InstanceClient instanceClient = InstanceClient.create()) {
ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
InstancesSetLabelsRequest instancesSetLabelsRequestResource = InstancesSetLabelsRequest.newBuilder().build();
Operation response = instanceClient.setLabelsInstance(instance.toString(), instancesSetLabelsRequestResource);
}
</code></pre>

@param instance Name of the instance scoping this request.
@param instancesSetLabelsRequestResource
@throws com.google.api.gax.rpc.ApiException if the remote call fails