Skip to content
Ona Docs

UpdateCustomDomain

client.organizations.customDomains.update(CustomDomainUpdateParams { domainName, organizationId, awsAccountId, 2 more } body, RequestOptionsoptions?): CustomDomainUpdateResponse { customDomain }
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"
ParametersExpand Collapse
body: CustomDomainUpdateParams { domainName, organizationId, awsAccountId, 2 more }
domainName: string

domain_name is the custom domain name

maxLength253
minLength4
organizationId: string

organization_id is the ID of the organization to update custom domain for

formatuuid
DeprecatedawsAccountId?: string | null

aws_account_id is the AWS account ID (deprecated: use cloud_account_id)

cloudAccountId?: string | null

cloud_account_id is the unified cloud account identifier (AWS Account ID or GCP Project ID)

provider?: CustomDomainProvider | null

provider is the cloud provider for this custom domain

One of the following:
"CUSTOM_DOMAIN_PROVIDER_UNSPECIFIED"
"CUSTOM_DOMAIN_PROVIDER_AWS"
"CUSTOM_DOMAIN_PROVIDER_GCP"
ReturnsExpand Collapse
CustomDomainUpdateResponse { customDomain }

UpdateCustomDomainResponse is the response message for updating a custom domain

customDomain: CustomDomain { id, createdAt, domainName, 5 more }

custom_domain is the updated custom domain

id: string

id is the unique identifier of the custom domain

formatuuid
createdAt: string

created_at is when the custom domain was created

formatdate-time
domainName: string

domain_name is the custom domain name

maxLength253
minLength4
organizationId: string

organization_id is the ID of the organization this custom domain belongs to

formatuuid
updatedAt: string

updated_at is when the custom domain was last updated

formatdate-time
DeprecatedawsAccountId?: string

aws_account_id is the AWS account ID (deprecated: use cloud_account_id)

cloudAccountId?: string

cloud_account_id is the unified cloud account identifier (AWS Account ID or GCP Project ID)

provider is the cloud provider for this custom domain

One of the following:
"CUSTOM_DOMAIN_PROVIDER_UNSPECIFIED"
"CUSTOM_DOMAIN_PROVIDER_AWS"
"CUSTOM_DOMAIN_PROVIDER_GCP"

UpdateCustomDomain

import Gitpod from '@gitpod/sdk';

const client = new Gitpod({
  bearerToken: process.env['GITPOD_API_KEY'], // This is the default and can be omitted
});

const customDomain = await client.organizations.customDomains.update({
  domainName: 'workspaces.acme-corp.com',
  organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047',
  awsAccountId: '987654321098',
});

console.log(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"
  }
}