I can't get aws route53 service's ListResourceRecordSets to filter by StartRecord Type. Even with the StartRecordType filter, it returns all records (cname and A) instead of the type I select.
I also noticed I would get a validation error if StartRecordName was not included, so it seems if StartRecordType is used, then StartRecordName is required.
The code below returns all records, but does not filter as it should.
AWSLogin(instance)
svc := route53.New(instance.AWSSession)
listParams := &route53.ListResourceRecordSetsInput{
HostedZoneId: aws.String("Z2798GPJN9CUFJ"), // Required
StartRecordName: aws.String("subdomain.subdomain.mydomain.com"),
StartRecordType: aws.String(route53.RRTypeA),
// StartRecordType: aws.String(route53.RRTypeCname),
}
respList, err := svc.ListResourceRecordSets(listParams)
if err != nil {
fmt.Println(err.Error())
return
}
fmt.Println("All Type "A" records:")
fmt.Println(respList)