创建Tag
删除Tag
获取Tag
创建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();
}
}
删除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();
}
}
获取Tag
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();
}
}