[英]Unable to create a custom domain using Firebase Hosting API
I'm trying to automate custom domain creation process in Firebase Hosting, I am using Go library, but it doesn't work, I am also happy to know about plain REST alternative.我正在尝试在 Firebase 托管中自动执行自定义域创建过程,我正在使用 Go 库,但它不起作用,我也很高兴知道普通 REST 替代方案。 I always get this error:
我总是收到此错误:
googleapi: Error 400: Domain
test1.example.com
not associated with project, failedPrecondition exit status 1googleapi:错误 400:域
test1.example.com
未与项目关联,failedPrecondition 退出状态 1
firebase, _ := firebasehosting.NewService(context.Background())
domain := &firebasehosting.Domain{
DomainName: "test1.example.com",
Site: "dashboard-v1-staging",
}
createCall := firebase.Projects.Sites.Domains.Create("projects/ID/sites/ID", domain)
_, err = createCall.Do()
if err != nil && !googleapi.IsNotModified(err) {
log.Println(err)
os.Exit(1)
}
I found out that API can't do that yet, and Firebase team is working on that.我发现 API 还不能做到这一点,而 Firebase 团队正在努力。 It was confirmed in the ticket I submitted on Github - https://github.com/googleapis/google-api-go-client/issues/1798
我在 Github - https://github.com/googleapis/google-api-go-client/issues/1798提交的工单中确认了这一点
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.