# Record


<style>
  span[class^="pill-"] {
    color: white;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 0.6em;
    vertical-align: middle;
    margin-right: 12px;
    font-family: sans-serif;
    font-weight: bold;
    display: inline-block;
    line-height: 1;
  }
  span.pill-GET { background-color: #61affe; }
  span.pill-POST { background-color: #49cc90; }
  span.pill-PUT { background-color: #fca130; }
  span.pill-DELETE { background-color: #f93e3e; }
  span.pill-PATCH { background-color: #50e3c2; }
  span[class^="pill-"]:after {
    content: attr(data-label);
    font-size: 0.9rem;
  }
</style>

DNS zone records management.

[Read more](https://community.exoscale.com/product/networking/dns/overview/)

## <span data-label="POST" class="pill-POST"></span>create-dns-domain-record

Create DNS domain record

```
POST /dns-domain/{domain-id}/record
```

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `domain-id` | `path` | Must be a valid UUID. |

### Request body

Content-Type: `application/json`

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `content` | string | **yes** | DNS domain record content |
| `name` | string | **yes** | DNS domain record name |
| `type` | string | **yes** | DNS domain record type<br/><br/>Allowed values: `NS`, `CAA`, `NAPTR`, `POOL`, `A`, `HINFO`, `CNAME`, `SSHFP`, `SRV`, `AAAA`, `MX`, `TXT`, `ALIAS`, `URL`. |
| `priority` | integer | no | DNS domain record priority<br/><br/>Min: `0`. |
| `ttl` | integer | no | DNS domain record TTL<br/><br/>Min: `0`. |

<details>
<summary>Example</summary>

```json
{
  "content": "string",
  "name": "string",
  "priority": 0,
  "ttl": 0,
  "type": "NS"
}
```
</details>


### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `create-dns-domain-record`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.CreateDNSDomainRecord) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.create_dns_domain_record) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#createDnsDomainRecord(java.util.UUID,com.exoscale.sdk.model.CreateDnsDomainRecordRequest))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api create-dns-domain-record`

## <span data-label="GET" class="pill-GET"></span>get-dns-domain-record

Retrieve DNS domain record details

```
GET /dns-domain/{domain-id}/record/{record-id}
```

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `domain-id` | `path` | Must be a valid UUID. |
| `record-id` | `path` | Must be a valid UUID. |

### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `content` | string | DNS domain record content |
| `created-at` | string | DNS domain record creation date<br/><br/>ISO 8601 date-time. |
| `id` | string | DNS domain record ID<br/><br/>Must be a valid UUID. |
| `name` | string | DNS domain record name |
| `priority` | integer | DNS domain record priority<br/><br/>Min: `0`. |
| `system-record` | boolean | DNS domain record system status |
| `ttl` | integer | DNS domain record TTL<br/><br/>Min: `0`. |
| `type` | string | DNS domain record type<br/><br/>Allowed values: `NS`, `CAA`, `NAPTR`, `POOL`, `A`, `HINFO`, `CNAME`, `SOA`, `SSHFP`, `SRV`, `AAAA`, `MX`, `TXT`, `ALIAS`, `URL`, `SPF`. |
| `updated-at` | string | DNS domain record update date<br/><br/>ISO 8601 date-time. |

<details>
<summary>Example output</summary>

```json
{
  "content": "string",
  "created-at": "2024-01-01T12:00:00Z",
  "id": "string",
  "name": "string",
  "priority": 0,
  "system-record": true,
  "ttl": 0,
  "type": "NS",
  "updated-at": "2024-01-01T12:00:00Z"
}
```
</details>


SDK reference for `get-dns-domain-record`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.GetDNSDomainRecord) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.get_dns_domain_record) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#getDnsDomainRecord(java.util.UUID,java.util.UUID))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api get-dns-domain-record`

## <span data-label="PUT" class="pill-PUT"></span>update-dns-domain-record

Update DNS domain record

```
PUT /dns-domain/{domain-id}/record/{record-id}
```

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `domain-id` | `path` | Must be a valid UUID. |
| `record-id` | `path` | Must be a valid UUID. |

### Request body

Content-Type: `application/json`

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `content` | string | no | DNS domain record content |
| `name` | string | no | DNS domain record name |
| `priority` | integer | no | DNS domain record priority<br/><br/>Min: `0`. |
| `ttl` | integer | no | DNS domain record TTL<br/><br/>Min: `0`. |

<details>
<summary>Example</summary>

```json
{
  "content": "string",
  "name": "string",
  "priority": 0,
  "ttl": 0
}
```
</details>


### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `update-dns-domain-record`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.UpdateDNSDomainRecord) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.update_dns_domain_record) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#updateDnsDomainRecord(java.util.UUID,java.util.UUID,com.exoscale.sdk.model.UpdateDnsDomainRecordRequest))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api update-dns-domain-record`

## <span data-label="DELETE" class="pill-DELETE"></span>delete-dns-domain-record

Delete DNS domain record

```
DELETE /dns-domain/{domain-id}/record/{record-id}
```

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `domain-id` | `path` | Must be a valid UUID. |
| `record-id` | `path` | Must be a valid UUID. |

### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `delete-dns-domain-record`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.DeleteDNSDomainRecord) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.delete_dns_domain_record) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#deleteDnsDomainRecord(java.util.UUID,java.util.UUID))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api delete-dns-domain-record`


---

## Other Operations

## <span data-label="GET" class="pill-GET"></span>list-dns-domain-records

List DNS domain records

```
GET /dns-domain/{domain-id}/record
```

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `domain-id` | `path` | Must be a valid UUID. |

### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `dns-domain-records` | array of [DNS domain record](/reference/api/_schemas/dns-domain-record/) |  |

<details>
<summary>Example output</summary>

```json
{
  "dns-domain-records": [
    {
      "content": "string",
      "created-at": "2024-01-01T12:00:00Z",
      "id": "string",
      "name": "string",
      "priority": 0,
      "system-record": true,
      "ttl": 0,
      "type": "NS",
      "updated-at": "2024-01-01T12:00:00Z"
    }
  ]
}
```
</details>


SDK reference for `list-dns-domain-records`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.ListDNSDomainRecords) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.list_dns_domain_records) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#listDnsDomainRecords(java.util.UUID))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api list-dns-domain-records`


