Create a tag
Delete a tag
Query tags
Create a tag
public void testCreatTag() {
IAcsClient client = IAcsClientUtil.getiAcsClient();
CreateTagRequest request = new CreateTagRequest();
try {
request.setTagName("testtag123567");
CreateTagResponse httpResponse = client.getAcsResponse(request);
System.out.println("------testCreatTag------" + JSON.toJSONString(httpResponse));
} catch (ServerException e) {
e.printStackTrace();
} catch (ClientException e) {
e.printStackTrace();
}
}
Delete a tag
public void testDeleteTag() {
IAcsClient client = IAcsClientUtil.getiAcsClient();
DeleteTagRequest request = new DeleteTagRequest();
try {
request.setTagId(24911);
DeleteTagResponse httpResponse = client.getAcsResponse(request);
System.out.println("------testDeleteTag------" + JSON.toJSONString(httpResponse));
} catch (ServerException e) {
e.printStackTrace();
} catch (ClientException e) {
e.printStackTrace();
}
}
Query tags
public void testQueryTagByParam() {
IAcsClient client = IAcsClientUtil.getiAcsClient();
QueryTagByParamRequest request = new QueryTagByParamRequest();
try {
request.setKeyWord("testtag1235");
QueryTagByParamResponse httpResponse = client.getAcsResponse(request);
System.out.println("------testQueryTagByParam------" + JSON.toJSONString(httpResponse));
} catch (ServerException e) {
e.printStackTrace();
} catch (ClientException e) {
e.printStackTrace();
}
}