postPlatformProjectsByProjectAppsByAppDomainsWithHttpInfo method

Future<Response> postPlatformProjectsByProjectAppsByAppDomainsWithHttpInfo(
  1. String project,
  2. String app,
  3. AddDomainReq addDomainReq
)

Attaches a hostname — instantly if you already own it, otherwise with a DNS challenge.

Attaches a hostname — instantly if you already own it, otherwise with a DNS challenge. It attaches host to the app, and which of two things happens depends on who owns the name. A host inside the caller org's own subtree is structurally owned, so it goes ACTIVE immediately and answers 201. A bring-your-own host is claimed as PENDING and answers the DNS challenge records to publish; it is NOT rendered into the app's ingress until /verify passes. Claims are globally unique. A host already claimed by another organization is 409, and so is one claimed by a different app in your own; re-adding this app's OWN claim is idempotent and answers its current state at 200. The default host is always attached and re-adding it is 409. A host under the platform's shared apex that is not the caller's own subtree is 403 — it belongs to whoever owns that subtree and can never be grabbed through the custom path. host must be a valid DNS hostname; anything else is 400. Requires a validated principal; 403 without one.

Note: This method returns the HTTP Response.

Parameters:

  • String project (required): Project is the project the application lives under, from the path.

  • String app (required): App is the application's slug, from the path.

  • AddDomainReq addDomainReq (required):

Implementation

Future<Response> postPlatformProjectsByProjectAppsByAppDomainsWithHttpInfo(String project, String app, AddDomainReq addDomainReq,) async {
  // ignore: prefer_const_declarations
  final path = r'/v1/platform/projects/{project}/apps/{app}/domains'
    .replaceAll('{project}', project)
    .replaceAll('{app}', app);

  // ignore: prefer_final_locals
  Object? postBody = addDomainReq;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>['application/json'];


  return apiClient.invokeAPI(
    path,
    'POST',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}