You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package main
import (
"fmt"
"log"
"github.com/aliyun/alibaba-cloud-sdk-go/services/domainintl"
)
func main() {
// Initialize the Domain client
client, err := domainintl.NewClientWithAccessKey("cn-hangzhou", "<your-access-key-id>", "<your-access-key-secret>")
if err != nil {
log.Fatalf("Error initializing client: %v", err)
}
// Create the request for QueryContactInfo
request := domainintl.CreateQueryContactInfoRequest()
request.DomainName = "example.com" // replace with your domain name
// Send the request and get the response
response, err := client.QueryContactInfo(request)
if err != nil {
log.Fatalf("Error querying contact info: %v", err)
}
// Print the response
fmt.Println("Response:", response)
// Check if the zh* fields are present in the response
if response.ZhProvince != "" {
fmt.Println("ZhProvince:", response.ZhProvince)
} else {
fmt.Println("ZhProvince field is missing.")
}
}
QueryContactInfo
文档:https://next.api.aliyun.com/document/Domain/2018-01-29/QueryContactInfo
domain-intl
QueryContactInfo
的响应不包含文档中的 zh* 字段,如:ZhProvince
The text was updated successfully, but these errors were encountered: