如何从RDS DBInstance获取标签

时间:2013-02-24 18:22:54

标签: java api tags rds

当我尝试从java上的RDS DBInstances获取标记时出现问题。

AmazonRDS rds = new AmazonRDSClient(credentialsProvider);
ListTagsForResourceRequest request = new ListTagsForResourceRequest();
ListTagsForResourceResult resultedTags = rds.listTagsForResource(request);

Status Code: 500, AWS Service: AmazonRDS, AWS Request ID: ..., AWS Error Code: InternalFailure, AWS Error Message: An internal error has occurred. Please try your query again at a later time.
Stack Trace:
at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:614)
at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:312)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:165)
at com.amazonaws.services.rds.AmazonRDSClient.invoke(AmazonRDSClient.java:1992)
at com.amazonaws.services.rds.AmazonRDSClient.listTagsForResource(AmazonRDSClient.java:746)
at com.vqs.AwsConsoleApp.getRDSInstances(AwsConsoleApp.java:98)
at com.vqs.AwsConsoleApp.main(AwsConsoleApp.java:73)

提前谢谢

1 个答案:

答案 0 :(得分:0)

从Amazon RDS API参考中,看起来需要请求上的ResourceName参数: http://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_ListTagsForResource.html

尝试使用您的一个RDS数据库实例ID设置该请求参数,您应该得到一个好的回复。

我不确定为什么您没有从服务中获得更有用的错误消息。我会将这些信息传递给RDS团队。

希望有所帮助!