> For the complete documentation index, see [llms.txt](https://docs.dnscontrol.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dnscontrol.org/provider/sakuracloud.md).

# Sakura Cloud

This is the provider for [Sakura Cloud](https://cloud.sakura.ad.jp/).

### Configuration

To use this provider, add an entry to `creds.json` with `TYPE` set to `SAKURACLOUD` along with API credentials.

Example:

{% code title="creds.json" %}

```json
{
  "sakuracloud": {
    "TYPE": "SAKURACLOUD",
    "access_token": "your-access-token",
    "access_token_secret": "your-access-token-secret"
  }
}
```

{% endcode %}

The `endpoint` is optional. If omitted, the default endpoint is assumed.

Endpoints are as follows:

* `https://secure.sakura.ad.jp/cloud/zone/is1a/api/cloud/1.1` (Ishikari first Zone)
* `https://secure.sakura.ad.jp/cloud/zone/is1b/api/cloud/1.1` (Ishikari second Zone)
* `https://secure.sakura.ad.jp/cloud/zone/tk1a/api/cloud/1.1` (Tokyo first Zone)
* `https://secure.sakura.ad.jp/cloud/zone/tk1b/api/cloud/1.1` (Tokyo second Zone)

DNS service is independent of zones, so you can use any of these endpoints. The default is the Ishikari first Zone.

Alternatively you can also use environment variables.

```shell
export SAKURACLOUD_ACCESS_TOKEN="your-access-token"
export SAKURACLOUD_ACCESS_TOKEN_SECRET="your-access-token-secret"
```

{% code title="creds.json" %}

```json
{
  "sakuracloud": {
    "TYPE": "SAKURACLOUD",
    "access_token": "$SAKURACLOUD_ACCESS_TOKEN",
    "access_token_secret": "$SAKURACLOUD_ACCESS_TOKEN_SECRET"
  }
}
```

{% endcode %}

### Metadata

This provider does not recognize any special metadata fields unique to Sakura Cloud.

### Usage

An example configuration:

{% code title="dnsconfig.js" %}

```javascript
var REG_NONE = NewRegistrar("none");
var DSP_SAKURACLOUD = NewDnsProvider("sakuracloud");

D("example.com", REG_NONE, DnsProvider(DSP_SAKURACLOUD),
  A("test", "192.0.2.1"),
);
```

{% endcode %}

`NAMESERVER` does not need to be set as the name servers for the Sakura Cloud provider cannot be changed.

`SOA` cannot be set as SOA record of Sakura Cloud provider cannot be changed.

### Activation

Sakura Cloud depends on an [API Key](https://manual.sakura.ad.jp/cloud/api/apikey.html).

When creating an API key, select "can modify settings" as "Access level". if you plan to create zones, select "can create and delete resources" as "Access level". None of the options in the "Allow access to other services" field need to be checked.

### Caveats

The limitations of the Sakura Cloud DNS service are described in [the DNS manual](https://manual.sakura.ad.jp/cloud/appliance/dns/index.html), which is written in Japanese.

The limitations not described in that manual are:

* "Null MX", RFC 7505, is not supported.
* SRV records with a Target of "." are not supported.
* SRV records with Port "0" are not supported.
* CAA records with a property value longer than 64 bytes are not allowed.
* Owner names and RDATA targets containing the following labels are not allowed:
  * example
  * exampleN, where N is a numerical character


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.dnscontrol.org/provider/sakuracloud.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
