# Create

Launch stage: GA

`POST /api/disaster-recovery/v1/{parent=accounts/*}/stable-urls`

Create a new stable URL.

API scopes: disaster-recovery

Clouds: AWS, Azure

## Path parameters

- `parent` (string, optional)
  The parent resource. Format: accounts/{account_id}.

## Query parameters

- `validate_only` (boolean, optional)
  When true, validates the request without creating the stable URL.
  Default: `false`
- `stable_url_id` (string, optional)
  Client-provided identifier for the stable URL. Used to construct the
   resource name as {parent}/stable-urls/{stable_url_id}.

## Request body

- `stable_url` (object, optional)
  The stable URL to create.
  - `name` (string, optional)
    Fully qualified resource name.
     Format: accounts/{account_id}/stable-urls/{stable_url_id}.
  - `url` (string, optional)
    The stable URL endpoint. Generated on creation and
     immutable thereafter. For non-Private-Link workspaces this is
     `https://<spog_host>/?w=<connection_id>`. For Private-Link workspaces
     this is the per-connection hostname.
  - `initial_workspace_id` (string, optional)
    The workspace this stable URL is initially bound to. Used only in Create
     requests to associate the stable URL with a workspace. Not returned in
     responses.
  - `failover_group_name` (string, optional)
    Fully qualified resource name of the FailoverGroup this stable URL is
     currently linked to, in the format
     `accounts/{account_id}/failover-groups/{failover_group_id}`. Empty when
     the stable URL is not attached to any failover group.
  - `effective_workspace_id` (string, optional)
    The workspace this stable URL currently routes to. Set to
     `initial_workspace_id` at creation, advanced to the failover group's primary
     while attached (including across a failover), and preserved when the stable
     URL is detached from its failover group. Read this to see where an unattached
     stable URL points: after a failover followed by a detach it reflects the
     post-failover primary, not `initial_workspace_id`.
  - `stable_workspace_id` (string, optional)
    The stable workspace ID for this stable URL. Generated on creation and
     immutable thereafter; identifies the URL across failovers and is the same
     value embedded in the `url` (as the `w=` query parameter for SPOG URLs,
     or in the `conn-<id>` hostname for Private-Link URLs).

## Returns

Returns the StableUrl object.

## Response

```json
{
  "name": "string",
  "url": "string",
  "initial_workspace_id": "string",
  "failover_group_name": "string",
  "effective_workspace_id": "string",
  "stable_workspace_id": "string"
}
```

