@BetaApi
  public final Operation setTagsInstance(String instance, Tags tagsResource) {

    SetTagsInstanceHttpRequest request =
        SetTagsInstanceHttpRequest.newBuilder()
            .setInstance(instance)
            .setTagsResource(tagsResource)
            .build();
    return setTagsInstance(request);
  }
@ BetaApi public final Operation setTagsInstance ( String instance , Tags tagsResource ) { SetTagsInstanceHttpRequest request = SetTagsInstanceHttpRequest . newBuilder ( ) . setInstance ( instance ) . setTagsResource ( tagsResource ) . build ( ) ; return setTagsInstance ( request ) ; }
Sets network tags for the specified instance to the data included in the request.

<p>Sample code:

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

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