in aws-rds-dbproxyendpoint/src/main/java/software/amazon/rds/dbproxyendpoint/ReadHandler.java [50:68]
private ResourceModel describeDBProxyEndpoint(final String proxyEndpointName) {
DescribeDBProxyEndpointsRequest request = new DescribeDBProxyEndpointsRequest().withDBProxyEndpointName(proxyEndpointName);
final DescribeDBProxyEndpointsResult result = clientProxy.injectCredentialsAndInvoke(request, rdsClient::describeDBProxyEndpoints);
if (result != null && result.getDBProxyEndpoints() != null && result.getDBProxyEndpoints().size() == 1) {
DBProxyEndpoint proxyEndpoint = result.getDBProxyEndpoints().get(0);
ResourceModel resourceModel = Utility.resultToModel(proxyEndpoint);
ListTagsForResourceRequest tagRequest = new ListTagsForResourceRequest().withResourceName(proxyEndpoint.getDBProxyEndpointArn());
final ListTagsForResourceResult tagResult = clientProxy.injectCredentialsAndInvoke(tagRequest, rdsClient::listTagsForResource);
if (tagResult != null && tagResult.getTagList()!= null && tagResult.getTagList().size() > 0) {
resourceModel.setTags(convertTags(tagResult.getTagList()));
}
return resourceModel;
} else {
throw new CfnNotFoundException(ResourceModel.TYPE_NAME, proxyEndpointName);
}
}