UpdateCustomDomain
client.Organizations.CustomDomains.Update(ctx, body) (*OrganizationCustomDomainUpdateResponse, error)
POST/gitpod.v1.OrganizationService/UpdateCustomDomain
Updates custom domain configuration settings.
Use this method to:
- Update cloud provider settings
- Change AWS account ID
- Modify domain configuration
Examples
-
Update AWS account ID:
Changes the AWS account ID for the custom domain.
organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" domainName: "workspaces.acme-corp.com" awsAccountId: "987654321098"
UpdateCustomDomain
package main
import (
"context"
"fmt"
"github.com/gitpod-io/gitpod-sdk-go"
"github.com/gitpod-io/gitpod-sdk-go/option"
)
func main() {
client := gitpod.NewClient(
option.WithBearerToken("My Bearer Token"),
)
customDomain, err := client.Organizations.CustomDomains.Update(context.TODO(), gitpod.OrganizationCustomDomainUpdateParams{
DomainName: gitpod.F("workspaces.acme-corp.com"),
OrganizationID: gitpod.F("b0e12f6c-4c67-429d-a4a6-d9838b5da047"),
AwsAccountID: gitpod.F("987654321098"),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", customDomain.CustomDomain)
}
{
"customDomain": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"createdAt": "2019-12-27T18:11:19.117Z",
"domainName": "xxxx",
"organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"updatedAt": "2019-12-27T18:11:19.117Z",
"awsAccountId": "awsAccountId",
"cloudAccountId": "cloudAccountId",
"provider": "CUSTOM_DOMAIN_PROVIDER_UNSPECIFIED"
}
}Returns Examples
{
"customDomain": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"createdAt": "2019-12-27T18:11:19.117Z",
"domainName": "xxxx",
"organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"updatedAt": "2019-12-27T18:11:19.117Z",
"awsAccountId": "awsAccountId",
"cloudAccountId": "cloudAccountId",
"provider": "CUSTOM_DOMAIN_PROVIDER_UNSPECIFIED"
}
}