com.baidubce.services.tag
Class TagClient

java.lang.Object
  extended by com.baidubce.AbstractBceClient
      extended by com.baidubce.services.tag.TagClient

public class TagClient
extends AbstractBceClient

Provides the client for accessing the tag service.


Field Summary
 
Fields inherited from class com.baidubce.AbstractBceClient
config, DEFAULT_CONTENT_TYPE, DEFAULT_ENCODING, DEFAULT_SERVICE_DOMAIN, URL_PREFIX
 
Constructor Summary
TagClient()
          Constructs a new client to invoke service methods on tag.
TagClient(BceClientConfiguration clientConfiguration)
          Constructs a new tag client using the client configuration to access tag.
 
Method Summary
 void createTags(CreateTagsRequest request)
          Create tags.
 void createTags(List<Tag> tags)
          Create tags.
 void deleteTags(DeleteTagsRequest request)
          Delete tags.
 void deleteTags(List<Tag> tags)
          Delete tags.
 ListTagResourcesResponse listTagResources()
          Listing all tag resources.
 ListTagResourcesResponse listTagResources(ListTagResourcesRequest request)
          Listing tag resources.
 ListTagResourcesResponse listTagResources(String tagKey, String tagValue)
          Listing tag resources.
 ListTagsResponse listTags()
          Listing all tags.
 ListTagsResponse listTags(ListTagsRequest request)
          Listing tags.
 ListTagsResponse listTags(String tagKey)
          Listing tags.
 ListTagsResponse listTags(String tagKey, String tagValue)
          Listing tags.
 
Methods inherited from class com.baidubce.AbstractBceClient
getClient, getEndpoint, getServiceId, invokeHttpClient, isRegionSupported, setClient, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TagClient

public TagClient()
Constructs a new client to invoke service methods on tag.


TagClient

public TagClient(BceClientConfiguration clientConfiguration)
Constructs a new tag client using the client configuration to access tag.

Parameters:
clientConfiguration - The tag client configuration options controlling how this client connects to tag service(e.g. proxy settings, retry counts, etc).
Method Detail

createTags

public void createTags(List<Tag> tags)
Create tags. Tag will be ignored if it is already created. The default quota of tags is 200. Receive an exception if the total amount of tags exceeds the quota.

Parameters:
tags - List of tag to be created.
Throws:
BceClientException

createTags

public void createTags(CreateTagsRequest request)
Create tags. Tag will be ignored if it is already created. The default quota of tags is 200. Receive an exception if the total amount of tags exceeds the quota.

Parameters:
request - The request containing all options for creating the tags.
Throws:
BceClientException

listTags

public ListTagsResponse listTags()
Listing all tags.

Returns:
Listing result
Throws:
BceClientException

listTags

public ListTagsResponse listTags(String tagKey)
Listing tags.

Parameters:
tagKey - Filtered by tag key
Returns:
Listing result
Throws:
BceClientException

listTags

public ListTagsResponse listTags(String tagKey,
                                 String tagValue)
Listing tags.

Parameters:
tagKey - Filtered by tag key, set value to null if you only want to filtered by tag value
tagValue - Filtered by tag value
Returns:
Listing result
Throws:
BceClientException

listTags

public ListTagsResponse listTags(ListTagsRequest request)
Listing tags.

Parameters:
request - The request containing all options for listing the tags.
Returns:
Listing result
Throws:
BceClientException

deleteTags

public void deleteTags(List<Tag> tags)
Delete tags. Tag will be ignored if it is not exists.

Parameters:
tags - List of tag to be deleted.
Throws:
BceClientException

deleteTags

public void deleteTags(DeleteTagsRequest request)
Delete tags. Tag will be ignored if it is not exists.

Parameters:
request - The request containing all options for deleting the tags.
Throws:
BceClientException

listTagResources

public ListTagResourcesResponse listTagResources()
Listing all tag resources.

Returns:
Listing result
Throws:
BceClientException

listTagResources

public ListTagResourcesResponse listTagResources(String tagKey,
                                                 String tagValue)
Listing tag resources. For other filter conditions(resource type, region), use the listTagResources(ListTagResourcesRequest) method

Parameters:
tagKey - Filtered by tag key, set value to null if you only want to filtered by tag value
tagValue - Filtered by tag value
Returns:
Listing result
Throws:
BceClientException

listTagResources

public ListTagResourcesResponse listTagResources(ListTagResourcesRequest request)
Listing tag resources.

Parameters:
request - The request containing all options for listing the tag resources.
Returns:
Listing result
Throws:
BceClientException


Copyright © 2018. All rights reserved.