{
  "components": {
    "schemas": {
      "AddressListResponse": {
        "description": "成功時のレスポンス",
        "properties": {
          "Addresses": {
            "description": "アドレス一覧",
            "items": {
              "$ref": "#/components/schemas/ReadAddress"
            },
            "type": "array"
          },
          "Count": {
            "description": "現在のページの件数",
            "format": "int32",
            "type": "integer"
          },
          "From": {
            "description": "現在のページ番号",
            "format": "int32",
            "type": "integer"
          },
          "Total": {
            "description": "対象リソースの総件数",
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "Total",
          "From",
          "Count",
          "Addresses"
        ],
        "type": "object"
      },
      "AddressResponse": {
        "description": "成功時のレスポンス",
        "properties": {
          "Address": {
            "$ref": "#/components/schemas/ReadAddress",
            "description": "アドレス"
          }
        },
        "required": [
          "Address"
        ],
        "type": "object"
      },
      "ApiError": {
        "description": "失敗時のレスポンス",
        "examples": [
          {
            "error_code": "forbidden",
            "error_msg": "要求された操作は許可されていません。権限エラー。",
            "serial": "4f464bf7db102d5e8e2092876506bc77"
          }
        ],
        "properties": {
          "error_code": {
            "type": "string"
          },
          "error_msg": {
            "type": "string"
          },
          "serial": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "CreateInterfaceConnection": {
        "properties": {
          "EphemeralIPv4Address": {
            "description": "IPv4アドレス",
            "type": "string"
          },
          "Interface": {
            "$ref": "#/components/schemas/SakuraResourceNameRef",
            "description": "サーバーNIC (インターフェース)"
          },
          "Subnet": {
            "$ref": "#/components/schemas/SakuraResourceNameRef",
            "description": "サブネット"
          }
        },
        "required": [
          "Interface",
          "Subnet"
        ],
        "type": "object"
      },
      "CreateSubnet": {
        "properties": {
          "Description": {
            "description": "説明",
            "type": "string"
          },
          "IPv4AddressRangeCIDR": {
            "description": "IPv4アドレス範囲 (CIDR形式)\n\n[マニュアル](https://manual.sakura.ad.jp/cloud/network/networking-suite/index.html)内「仕様」に記載の条件を満たすIPアドレス範囲をCIDR形式で表現します。\nIPv4アドレス範囲は、親サブネットグループのIPv4アドレス範囲に含まれ、かつ、同一親サブネットグループ下の他サブネットと重複しない範囲である必要があります。",
            "type": "string"
          },
          "Name": {
            "description": "名前",
            "type": "string"
          },
          "SubnetGroup": {
            "$ref": "#/components/schemas/SakuraResourceNameRef",
            "description": "親サブネットグループ"
          },
          "Zone": {
            "$ref": "#/components/schemas/Zone",
            "description": "ゾーン"
          }
        },
        "required": [
          "Name",
          "Description",
          "IPv4AddressRangeCIDR",
          "Zone",
          "SubnetGroup"
        ],
        "type": "object"
      },
      "CreateSubnetGroup": {
        "properties": {
          "Description": {
            "description": "説明",
            "type": "string"
          },
          "IPv4AddressRangeCIDR": {
            "description": "IPv4アドレス範囲 (CIDR形式)\n\n[マニュアル](https://manual.sakura.ad.jp/cloud/network/networking-suite/index.html)内「仕様」に記載の条件を満たすIPアドレス範囲をCIDR形式で表現します。",
            "type": "string"
          },
          "Name": {
            "description": "名前",
            "type": "string"
          },
          "Region": {
            "$ref": "#/components/schemas/Region",
            "description": "リージョン"
          }
        },
        "required": [
          "Name",
          "Description",
          "IPv4AddressRangeCIDR",
          "Region"
        ],
        "type": "object"
      },
      "CreatedInterfaceConnectionResponse": {
        "description": "成功時のレスポンス",
        "properties": {
          "InterfaceConnection": {
            "$ref": "#/components/schemas/ReadInterfaceConnection",
            "description": "インターフェースコネクション"
          }
        },
        "required": [
          "InterfaceConnection"
        ],
        "type": "object"
      },
      "CreatedSubnetGroupResponse": {
        "description": "成功時のレスポンス",
        "properties": {
          "SubnetGroup": {
            "$ref": "#/components/schemas/ReadSubnetGroup",
            "description": "サブネットグループ"
          }
        },
        "required": [
          "SubnetGroup"
        ],
        "type": "object"
      },
      "CreatedSubnetResponse": {
        "description": "成功時のレスポンス",
        "properties": {
          "Subnet": {
            "$ref": "#/components/schemas/ReadSubnet",
            "description": "サブネット"
          }
        },
        "required": [
          "Subnet"
        ],
        "type": "object"
      },
      "ReadAddress": {
        "properties": {
          "AddressType": {
            "description": "アドレス種別; `EPHEMERAL_ADDRESS` 固定",
            "type": "string"
          },
          "IPAddress": {
            "description": "IPアドレス",
            "type": "string"
          },
          "IPVersion": {
            "description": "アドレスバージョン; `IPv4` 固定",
            "type": "string"
          },
          "SRN": {
            "description": "さくらのリソース名 (SRN)",
            "type": "string"
          },
          "Subnet": {
            "$ref": "#/components/schemas/SakuraResourceNameRef",
            "description": "アドレスが属するサブネット"
          }
        },
        "required": [
          "SRN",
          "AddressType",
          "IPVersion",
          "IPAddress",
          "Subnet"
        ],
        "type": "object"
      },
      "ReadInterfaceConnection": {
        "properties": {
          "EphemeralIPv4Address": {
            "description": "IPv4アドレス",
            "type": "string"
          },
          "SRN": {
            "description": "さくらのリソース名 (SRN)",
            "type": "string"
          }
        },
        "required": [
          "SRN"
        ],
        "type": "object"
      },
      "ReadSubnet": {
        "properties": {
          "Description": {
            "description": "説明",
            "type": "string"
          },
          "IPv4AddressRangeCIDR": {
            "description": "IPv4アドレス範囲 (CIDR形式)\n\n[マニュアル](https://manual.sakura.ad.jp/cloud/network/networking-suite/index.html)内「仕様」に記載の条件を満たすIPアドレス範囲をCIDR形式で表現します。\nIPv4アドレス範囲は、親サブネットグループのIPv4アドレス範囲に含まれ、かつ、同一親サブネットグループ下の他サブネットと重複しない範囲である必要があります。",
            "type": "string"
          },
          "Name": {
            "description": "名前",
            "type": "string"
          },
          "SRN": {
            "description": "さくらのリソース名 (SRN)",
            "type": "string"
          },
          "SubnetGroup": {
            "$ref": "#/components/schemas/SakuraResourceNameRef",
            "description": "親サブネットグループ"
          },
          "Zone": {
            "$ref": "#/components/schemas/Zone",
            "description": "ゾーン"
          }
        },
        "required": [
          "SRN",
          "Name",
          "Description",
          "IPv4AddressRangeCIDR",
          "Zone",
          "SubnetGroup"
        ],
        "type": "object"
      },
      "ReadSubnetGroup": {
        "properties": {
          "Description": {
            "description": "説明",
            "type": "string"
          },
          "IPv4AddressRangeCIDR": {
            "description": "IPv4アドレス範囲 (CIDR形式)\n\n[マニュアル](https://manual.sakura.ad.jp/cloud/network/networking-suite/index.html)内「仕様」に記載の条件を満たすIPアドレス範囲をCIDR形式で表現します。",
            "type": "string"
          },
          "Name": {
            "description": "名前",
            "type": "string"
          },
          "Region": {
            "$ref": "#/components/schemas/Region",
            "description": "リージョン"
          },
          "SRN": {
            "description": "さくらのリソース名 (SRN)",
            "type": "string"
          }
        },
        "required": [
          "SRN",
          "Name",
          "Description",
          "IPv4AddressRangeCIDR",
          "Region"
        ],
        "type": "object"
      },
      "Region": {
        "properties": {
          "Code": {
            "description": "リージョンコード (\"is1\")",
            "type": "string"
          }
        },
        "required": [
          "Code"
        ],
        "type": "object"
      },
      "SakuraResourceNameRef": {
        "properties": {
          "SRN": {
            "description": "さくらのリソース名 (SRN)",
            "type": "string"
          }
        },
        "required": [
          "SRN"
        ],
        "type": "object"
      },
      "SubnetGroupListResponse": {
        "description": "成功時のレスポンス",
        "properties": {
          "Count": {
            "description": "現在のページの件数",
            "format": "int32",
            "type": "integer"
          },
          "From": {
            "description": "現在のページ番号",
            "format": "int32",
            "type": "integer"
          },
          "SubnetGroups": {
            "description": "サブネットグループ一覧",
            "items": {
              "$ref": "#/components/schemas/ReadSubnetGroup"
            },
            "type": "array"
          },
          "Total": {
            "description": "対象リソースの総件数",
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "Total",
          "From",
          "Count",
          "SubnetGroups"
        ],
        "type": "object"
      },
      "SubnetGroupResponse": {
        "description": "成功時のレスポンス",
        "properties": {
          "SubnetGroup": {
            "$ref": "#/components/schemas/ReadSubnetGroup",
            "description": "サブネットグループ"
          }
        },
        "required": [
          "SubnetGroup"
        ],
        "type": "object"
      },
      "SubnetListResponse": {
        "description": "成功時のレスポンス",
        "properties": {
          "Count": {
            "description": "現在のページの件数",
            "format": "int32",
            "type": "integer"
          },
          "From": {
            "description": "現在のページ番号",
            "format": "int32",
            "type": "integer"
          },
          "Subnets": {
            "description": "サブネット一覧",
            "items": {
              "$ref": "#/components/schemas/ReadSubnet"
            },
            "type": "array"
          },
          "Total": {
            "description": "対象リソースの総件数",
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "Total",
          "From",
          "Count",
          "Subnets"
        ],
        "type": "object"
      },
      "SubnetResponse": {
        "description": "成功時のレスポンス",
        "properties": {
          "Subnet": {
            "$ref": "#/components/schemas/ReadSubnet",
            "description": "サブネット"
          }
        },
        "required": [
          "Subnet"
        ],
        "type": "object"
      },
      "UpdateSubnet": {
        "properties": {
          "Description": {
            "description": "説明",
            "type": "string"
          },
          "Name": {
            "description": "名前",
            "type": "string"
          }
        },
        "required": [
          "Name",
          "Description"
        ],
        "type": "object"
      },
      "UpdateSubnetGroup": {
        "properties": {
          "Description": {
            "description": "説明",
            "type": "string"
          },
          "Name": {
            "description": "名前",
            "type": "string"
          }
        },
        "required": [
          "Name",
          "Description"
        ],
        "type": "object"
      },
      "Zone": {
        "properties": {
          "Code": {
            "description": "ゾーンコード (\"is1c\")",
            "type": "string"
          }
        },
        "required": [
          "Code"
        ],
        "type": "object"
      }
    }
  },
  "info": {
    "contact": {
      "name": "SAKURA internet Inc.",
      "url": "https://www.sakura.ad.jp/"
    },
    "description": "ネットワークスイート (CR) APIは、さくらのクラウドのネットワークスイート機能 (Networking Suite) を提供するAPIです。\n# 基本的な使い方\n## APIキーの発行\nAPIを利用するためには、認証のための「APIキー」が必要です。事前にキーを発行しておきます。\nAPIキーは「ユーザID」「パスワード」に相当する「トークン」と呼ばれる認証情報で構成されています。\n|   項目名   | APIキー発行時の項目名        | このドキュメント内での例             |\n|------------|------------------------------|--------------------------------------|\n| ユーザID | アクセストークン(UUID)       | 01234567-89ab-cdef-0123-456789abcdef |\n| パスワード | アクセストークンシークレット | SAMPLETOKENSAMPLETOKENSAMPLETOKENSAM |\n\u003cdiv class=\"warning\"\u003e\n  \u003cb\u003e操作マニュアル\u003c/b\u003e\u003cbr /\u003e\n  \u003cul\u003e\u003cli\u003e\u003ca href=\"https://manual.sakura.ad.jp/cloud/api/apikey.html\"\u003eAPIキー | さくらのクラウド ドキュメント\u003c/a\u003e\u003c/li\u003e\u003c/ul\u003e\n\u003c/div\u003e\n\n\n## 入力パラメータ\nAPIの入力には送信先URLに対して、いくつかのヘッダーとAPIキーを送信します。\n\n- 認証方式はHTTP Basic認証です。APIキーのアクセストークンをユーザーID、アクセストークンシークレットをパスワードとして指定します。\n\n```\n# 入力サンプル\ncurl \\\n  -u '01234567-89ab-cdef-0123-456789abcdef:SAMPLETOKENSAMPLETOKENSAMPLETOKENSAM' \\\n  -X GET \\\n  'https://secure.sakura.ad.jp/cloud/zone/is1c/api/cloud/1.1/networking-suite/subnet-groups'\n```\n\n## APIエンドポイント\nネットワークスイートでは、作成するリソースのスコープに応じてAPIエンドポイントのゾーンを指定します。\n\n- リージョン単位のリソースを操作する場合は、リージョンに対応するゾーンを指定します。\n  - 例: `is1` リージョンの場合、`is1c` ゾーンを指定します。\n- ゾーン単位のリソースを操作する場合は、対象のリソースが属するゾーンを指定します。\n  - 例: `is1c` ゾーンにサブネットを作成する場合、`is1c` ゾーンを指定します。\n\n### リソースのスコープ\n\n| リソース種 | リソース種識別子 | スコープ |\n|------|------|------|\n| サブネットグループ | sakura.networking-suite.subnet-group | リージョン |\n| サブネット | sakura.networking-suite.subnet | ゾーン |\n| インターフェースコネクション | sakura.networking-suite.interface-connection | ゾーン |\n| サブネットアドレス | sakura.networking-suite.address | ゾーン |\n| NIC (インターフェース) | sakura.iaas.interface | ゾーン |\n\nリソース種識別子についての詳細は「さくらのリソース名 (Sakura resource name, SRN)」の項目をご参照ください。\n\n## 「さくらのリソース名 (Sakura resource name, SRN)」について\nさくらのリソース名 (Sakura resource name, SRN) は、さくらのクラウドのリソースを一意に識別するための文字列です。SRNは、リソースのスコープや種類、IDなどを含む構造化された文字列であり、リソースを特定するために使用されます。\nネットワークスイート (CR) APIでは、SRNを使用してサブネットグループやサブネットなどのリソースを識別します。SRNは、リソースの種類やIDを含むため、API呼び出し時にリソースを指定する際に便利です。\n\nSRNは以下の構造を持ちます。\n```\nsrnv1:{{ロケーション識別子}}:{{リソース種識別子}}:{{ID}}\n```\n\n| 項目 | 概要 | 形式例 |\n|------|------|------|\n| ロケーション識別子 | リソースの所在を示す識別子です。 | `sakura-is1c` (石狩第3ゾーン), `sakura-is1` (石狩リージョン) |\n| リソース種識別子 | リソースの種類を示す識別子です。 | `sakura.networking-suite.subnet-group` (サブネットグループ), `sakura.iaas.interface` (インターフェース) |\n| ID | リソースのIDです。 | (形式はリソースによって異なります) |\n\n例1: 石狩リージョンにあるサブネットグループのSRNは以下のような形式です。\n```\nsrnv1:sakura-is1:sakura.networking-suite.subnet-group:1234567890\n```\n\n例2: 石狩第3ゾーンにあるNIC (インターフェース)のSRNは以下のような形式です。\n```\nsrnv1:sakura-is1c:sakura.iaas.interface:2345678901\n```\n\n具体的なSRNの値や指定方法については、各APIごとのドキュメントをご参照ください。\n\n## ドキュメント上に記載のないフィールドについて\nネットワークスイート (CR) APIのレスポンスには、ドキュメント上に記載のないフィールドが含まれる場合があります。これらのフィールドは、将来的な拡張あるいは後方互換性のために予告無く追加・削除されることがあります。ドキュメント上に記載のないフィールドは、アプリケーションでの利用は行わないようにしてください。",
    "license": {
      "name": "Copyright(C) SAKURA internet Inc. all rights reserved."
    },
    "title": "ネットワークスイート (CR) API",
    "version": "0.2.1"
  },
  "openapi": "3.1.0",
  "paths": {
    "/networking-suite/addresses": {
      "get": {
        "description": "割り当て済みのIPアドレスの一覧を取得します。",
        "operationId": "listAddresses",
        "parameters": [
          {
            "description": "サブネットのSRN\n\n指定されたサブネットで割り当て済みのIPアドレスの一覧のみを取得します。",
            "examples": {
              "サブネットとインターフェースコネクションを指定してアドレス取得": {
                "summary": "サブネットとインターフェースコネクションを指定してアドレス取得",
                "value": "subnetSRN=srnv1:sakura-is1c:sakura.networking-suite.subnet:2345678901"
              }
            },
            "explode": false,
            "in": "query",
            "name": "subnetSRN",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "インターフェースコネクションのSRN\n\n指定されたインターフェースコネクションに割り当て済みのIPアドレスのみを取得します。\n\nインターフェースコネクションのSRNは以下のいずれかの方法で取得できます:\n- NIC (インターフェース) をサブネットへ接続する際 (`POST /networking-suite/interface-connections`) のレスポンスに含まれる `InterfaceConnection.SRN` を参照します\n- NICを接続しているサーバーの詳細情報 (`GET /server/{serverid}`; [詳細](https://manual.sakura.ad.jp/cloud-api/1.1/server/index.html)) のレスポンスに含まれる `Server.Interfaces[].NetworkingSuiteInterfaceConnection.ID` を用いてSRNを組み立てます\n    - 例: `Server.Interfaces[].NetworkingSuiteInterfaceConnection.ID` が `4567890123` の場合、SRNは `srnv1:\u003cロケーション識別子\u003e:sakura.networking-suite.interface-connection:4567890123` となります",
            "examples": {
              "サブネットとインターフェースコネクションを指定してアドレス取得": {
                "summary": "サブネットとインターフェースコネクションを指定してアドレス取得",
                "value": "interfaceConnectionSRN=srnv1:sakura-is1c:sakura.networking-suite.interface-connection:4567890123"
              }
            },
            "explode": false,
            "in": "query",
            "name": "interfaceConnectionSRN",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddressListResponse"
                }
              }
            },
            "description": "成功時のレスポンス"
          }
        },
        "summary": "アドレス一覧の取得",
        "tags": [
          "アドレス操作"
        ]
      }
    },
    "/networking-suite/addresses/{addressid}": {
      "get": {
        "description": "割り当て済みのIPアドレスの詳細情報を取得します。",
        "operationId": "readAddress",
        "parameters": [
          {
            "description": "アドレスのID\n\nアドレスのSRNの末尾、ID部分の値を指定します。\n例: `srnv1:sakura-is1c:sakura.networking-suite.address:5678901234` の場合は `5678901234` を指定します。",
            "example": "5678901234",
            "in": "path",
            "name": "addressid",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "Address": {
                    "AddressType": "EPHEMERAL_ADDRESS",
                    "IPAddress": "10.0.0.10",
                    "IPVersion": "IPv4",
                    "SRN": "srnv1:sakura-is1c:sakura.networking-suite.address:5678901234",
                    "Subnet": {
                      "SRN": "srnv1:sakura-is1c:sakura.networking-suite.subnet:2345678901"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/AddressResponse"
                }
              }
            },
            "description": "成功時のレスポンス"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "An unexpected error response."
          }
        },
        "summary": "アドレス詳細の取得",
        "tags": [
          "アドレス操作"
        ]
      }
    },
    "/networking-suite/interface-connections": {
      "post": {
        "description": "NIC (インターフェース) をサブネットに接続するために、インターフェースコネクションを作成します。\n\nネットワークスイートでは、NICとサブネットの接続関係をインターフェースコネクションというリソースで管理します。\nまた、NICをサブネットに接続する際に、エフェメラルIPアドレスを確保のうえ、インターフェースコネクションと紐付けて管理します。エフェメラルIPアドレスはサブネット内で一時的に割り当てられるIPアドレスであり、NICがサブネットから切断されると自動的に解放されます。\n\nNICのSRNは、以下の手順で取得できます。\n1. NICを接続しているサーバーの詳細情報 (`GET /server/{serverid}`; [詳細](https://manual.sakura.ad.jp/cloud-api/1.1/server/index.html)) のレスポンスに含まれる `Server.Interfaces[].ID` を取得します\n2. 取得した `Server.Interfaces[].ID` を用いて、NICのSRNを組み立てます\n    - 例: `Server.Interfaces[].ID` が `3456789012` の場合、SRNは `srnv1:\u003cロケーション識別子\u003e:sakura.iaas.interface:3456789012` となります\n\n接続するNICとサブネットは同一ゾーンに存在する必要があります。異なるゾーンのNICとサブネットを接続することはできません。",
        "operationId": "createInterfaceConnection",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "NICをサブネットに接続 (IPアドレス手動指定)": {
                  "description": "NICをサブネットに接続する際、`EphemeralIPv4Address` フィールドに空いている未使用のエフェメラルIPアドレスを指定することで、手動で割り当てることができます。\n\n[マニュアル](https://manual.sakura.ad.jp/cloud/network/networking-suite/index.html)内「仕様」に記載の条件を満たすIPアドレスを指定する必要があります。IPアドレスはサブネットのIPアドレス範囲に含まれ、かつ、同一サブネット内で他のNICに割り当て済みのIPアドレスやシステムが予約済みのIPアドレスと重複しない必要があります。",
                  "summary": "NICをサブネットに接続 (IPアドレス手動指定)",
                  "value": {
                    "EphemeralIPv4Address": "10.0.0.10",
                    "Interface": {
                      "SRN": "srnv1:sakura-is1c:sakura.iaas.interface:3456789012"
                    },
                    "Subnet": {
                      "SRN": "srnv1:sakura-is1c:sakura.networking-suite.subnet:2345678901"
                    }
                  }
                },
                "NICをサブネットに接続 (IPアドレス自動割当)": {
                  "description": "NICをサブネットに接続する際、`EphemeralIPv4Address` フィールドを省略することで、空いている未使用のエフェメラルIPアドレスを自動的に割り当てます。",
                  "summary": "NICをサブネットに接続 (IPアドレス自動割当)",
                  "value": {
                    "Interface": {
                      "SRN": "srnv1:sakura-is1c:sakura.iaas.interface:3456789012"
                    },
                    "Subnet": {
                      "SRN": "srnv1:sakura-is1c:sakura.networking-suite.subnet:2345678901"
                    }
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/CreateInterfaceConnection"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "examples": {
                  "NICをサブネットに接続 (IPアドレス手動指定)": {
                    "description": "NICをサブネットに接続する際、`EphemeralIPv4Address` フィールドに空いている未使用のエフェメラルIPアドレスを指定することで、手動で割り当てることができます。\n\n[マニュアル](https://manual.sakura.ad.jp/cloud/network/networking-suite/index.html)内「仕様」に記載の条件を満たすIPアドレスを指定する必要があります。IPアドレスはサブネットのIPアドレス範囲に含まれ、かつ、同一サブネット内で他のNICに割り当て済みのIPアドレスやシステムが予約済みのIPアドレスと重複しない必要があります。",
                    "summary": "NICをサブネットに接続 (IPアドレス手動指定)",
                    "value": {
                      "InterfaceConnection": {
                        "EphemeralIPv4Address": "10.0.0.10",
                        "SRN": "srnv1:sakura-is1c:sakura.networking-suite.interface-connection:4567890123"
                      }
                    }
                  },
                  "NICをサブネットに接続 (IPアドレス自動割当)": {
                    "description": "NICをサブネットに接続する際、`EphemeralIPv4Address` フィールドを省略することで、空いている未使用のエフェメラルIPアドレスを自動的に割り当てます。",
                    "summary": "NICをサブネットに接続 (IPアドレス自動割当)",
                    "value": {
                      "InterfaceConnection": {
                        "EphemeralIPv4Address": "10.0.0.10",
                        "SRN": "srnv1:sakura-is1c:sakura.networking-suite.interface-connection:4567890123"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CreatedInterfaceConnectionResponse"
                }
              }
            },
            "description": "成功時のレスポンス"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "An unexpected error response."
          }
        },
        "summary": "NIC (インターフェース) をサブネットに接続",
        "tags": [
          "インターフェース操作"
        ]
      }
    },
    "/networking-suite/interface-connections/{interfaceconnectionid}": {
      "delete": {
        "description": "インターフェースコネクションを削除することで、NIC (インターフェース) をサブネットから切断します。\n\nNICをサブネットから切断すると、NICに割り当てられていたエフェメラルIPアドレスは自動的に解放されます。\n\nインターフェースコネクションを削除してNICをサブネットから切断するには、NICが接続されたサーバーが停止している必要があります。サーバーが起動中の場合、インターフェースコネクションを削除することはできません。",
        "operationId": "deleteInterfaceConnection",
        "parameters": [
          {
            "description": "インターフェースコネクションのID\n\nインターフェースコネクションのSRNの末尾、ID部分の値を指定します。\n\nインターフェースコネクションのIDは、以下のいずれかの方法で取得できます:\n- NIC (インターフェース) をサブネットへ接続する際 (`POST /networking-suite/interface-connections`) のレスポンスに含まれる `InterfaceConnection.SRN` を参照します\n    - 例: `InterfaceConnection.SRN` が `srnv1:sakura-is1c:sakura.networking-suite.interface-connection:4567890123` の場合、IDは `4567890123` となります\n- NICを接続しているサーバーの詳細情報 (`GET /server/{serverid}`; [詳細](https://manual.sakura.ad.jp/cloud-api/1.1/server/index.html)) のレスポンスに含まれる `Server.Interfaces[].NetworkingSuiteInterfaceConnection.ID` を参照します",
            "examples": {
              "インターフェースコネクションを削除してNICをサブネットから切断": {
                "summary": "インターフェースコネクションを削除してNICをサブネットから切断",
                "value": "4567890123"
              }
            },
            "in": "path",
            "name": "interfaceconnectionid",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "成功時のレスポンス (内容なし)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "An unexpected error response."
          }
        },
        "summary": "NIC (インターフェース) をサブネットから切断",
        "tags": [
          "インターフェース操作"
        ]
      }
    },
    "/networking-suite/subnet-groups": {
      "get": {
        "description": "サブネットグループの一覧を取得します。",
        "operationId": "listSubnetGroups",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "サブネットグループ一覧の取得": {
                    "summary": "サブネットグループ一覧の取得",
                    "value": {
                      "Count": 1,
                      "From": 0,
                      "SubnetGroups": [
                        {
                          "Description": "サブネットグループの説明",
                          "IPv4AddressRangeCIDR": "10.0.0.0/20",
                          "Name": "サブネットグループ名",
                          "Region": {
                            "Code": "is1"
                          },
                          "SRN": "srnv1:sakura-is1:sakura.networking-suite.subnet-group:1234567890"
                        }
                      ],
                      "Total": 1
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/SubnetGroupListResponse"
                }
              }
            },
            "description": "成功時のレスポンス"
          }
        },
        "summary": "サブネットグループ一覧の取得",
        "tags": [
          "サブネットグループ操作"
        ]
      },
      "post": {
        "description": "サブネットグループを作成します。",
        "operationId": "createSubnetGroup",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "サブネットグループ作成": {
                  "summary": "サブネットグループ作成",
                  "value": {
                    "Description": "サブネットグループの説明",
                    "IPv4AddressRangeCIDR": "10.0.0.0/20",
                    "Name": "サブネットグループ名",
                    "Region": {
                      "Code": "is1"
                    }
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/CreateSubnetGroup"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "examples": {
                  "サブネットグループ作成": {
                    "summary": "サブネットグループ作成",
                    "value": {
                      "SubnetGroup": {
                        "Description": "サブネットグループの説明",
                        "IPv4AddressRangeCIDR": "10.0.0.0/20",
                        "Name": "サブネットグループ名",
                        "Region": {
                          "Code": "is1"
                        },
                        "SRN": "srnv1:sakura-is1:sakura.networking-suite.subnet-group:1234567890"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CreatedSubnetGroupResponse"
                }
              }
            },
            "description": "成功時のレスポンス"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "An unexpected error response."
          }
        },
        "summary": "サブネットグループの作成",
        "tags": [
          "サブネットグループ操作"
        ]
      }
    },
    "/networking-suite/subnet-groups/{subnetgroupid}": {
      "delete": {
        "description": "サブネットグループを削除します。\n\nサブネットグループを削除するには、サブネットグループに属するサブネットがすべて削除されている必要があります。",
        "operationId": "deleteSubnetGroup",
        "parameters": [
          {
            "description": "サブネットグループのID\n\nサブネットグループのSRNの末尾、ID部分の値を指定します。\n例: `srnv1:sakura-is1:sakura.networking-suite.subnet-group:1234567890` の場合は `1234567890` を指定します。",
            "examples": {
              "サブネットグループの削除": {
                "summary": "サブネットグループの削除",
                "value": "1234567890"
              }
            },
            "in": "path",
            "name": "subnetgroupid",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "成功時のレスポンス (内容なし)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "An unexpected error response."
          }
        },
        "summary": "サブネットグループの削除",
        "tags": [
          "サブネットグループ操作"
        ]
      },
      "get": {
        "description": "サブネットグループの詳細を取得します。",
        "operationId": "readSubnetGroup",
        "parameters": [
          {
            "description": "サブネットグループのID\n\nサブネットグループのSRNの末尾、ID部分の値を指定します。\n例: `srnv1:sakura-is1:sakura.networking-suite.subnet-group:1234567890` の場合は `1234567890` を指定します。",
            "examples": {
              "サブネットグループ詳細の取得": {
                "summary": "サブネットグループ詳細の取得",
                "value": "1234567890"
              }
            },
            "in": "path",
            "name": "subnetgroupid",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "サブネットグループ詳細の取得": {
                    "summary": "サブネットグループ詳細の取得",
                    "value": {
                      "SubnetGroup": {
                        "Description": "サブネットグループの説明",
                        "IPv4AddressRangeCIDR": "10.0.0.0/20",
                        "Name": "サブネットグループ名",
                        "Region": {
                          "Code": "is1"
                        },
                        "SRN": "srnv1:sakura-is1:sakura.networking-suite.subnet-group:1234567890"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/SubnetGroupResponse"
                }
              }
            },
            "description": "成功時のレスポンス"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "An unexpected error response."
          }
        },
        "summary": "サブネットグループ詳細の取得",
        "tags": [
          "サブネットグループ操作"
        ]
      },
      "put": {
        "description": "サブネットグループの詳細を更新します。\n\n名前 (`Name`) と説明 (`Description`) のみ更新可能です。",
        "operationId": "updateSubnetGroup",
        "parameters": [
          {
            "description": "サブネットグループのID\n\nサブネットグループのSRNの末尾、ID部分の値を指定します。\n例: `srnv1:sakura-is1:sakura.networking-suite.subnet-group:1234567890` の場合は `1234567890` を指定します。",
            "examples": {
              "サブネットグループ更新": {
                "summary": "サブネットグループ更新",
                "value": "1234567890"
              }
            },
            "in": "path",
            "name": "subnetgroupid",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "サブネットグループ更新": {
                  "summary": "サブネットグループ更新",
                  "value": {
                    "Description": "新しいサブネットグループの説明",
                    "Name": "新しいサブネットグループ名"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/UpdateSubnetGroup"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "サブネットグループ更新": {
                    "summary": "サブネットグループ更新",
                    "value": {
                      "SubnetGroup": {
                        "Description": "新しいサブネットグループの説明",
                        "IPv4AddressRangeCIDR": "10.0.0.0/20",
                        "Name": "新しいサブネットグループ名",
                        "Region": {
                          "Code": "is1"
                        },
                        "SRN": "srnv1:sakura-is1:sakura.networking-suite.subnet-group:1234567890"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/SubnetGroupResponse"
                }
              }
            },
            "description": "成功時のレスポンス"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "An unexpected error response."
          }
        },
        "summary": "サブネットグループ詳細の更新",
        "tags": [
          "サブネットグループ操作"
        ]
      }
    },
    "/networking-suite/subnets": {
      "get": {
        "description": "サブネットの一覧を取得します。",
        "operationId": "listSubnets",
        "parameters": [
          {
            "description": "サブネットグループのSRN\n\n指定されたサブネットグループに属するサブネットの一覧のみを取得します。",
            "examples": {
              "指定したサブネットグループに属するサブネットの一覧を取得": {
                "summary": "指定したサブネットグループに属するサブネットの一覧を取得",
                "value": "subnetGroupSRN=srnv1:sakura-is1:sakura.networking-suite.subnet-group:1234567890"
              }
            },
            "explode": false,
            "in": "query",
            "name": "subnetGroupSRN",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "指定したサブネットグループに属するサブネットの一覧を取得": {
                    "summary": "指定したサブネットグループに属するサブネットの一覧を取得",
                    "value": {
                      "Count": 1,
                      "From": 0,
                      "Subnets": [
                        {
                          "Description": "サブネットの説明",
                          "IPv4AddressRangeCIDR": "10.0.0.0/26",
                          "Name": "サブネット名",
                          "SRN": "srnv1:sakura-is1c:sakura.networking-suite.subnet:2345678901",
                          "SubnetGroup": {
                            "SRN": "srnv1:sakura-is1:sakura.networking-suite.subnet-group:1234567890"
                          },
                          "Zone": {
                            "Code": "is1c"
                          }
                        }
                      ],
                      "Total": 1
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/SubnetListResponse"
                }
              }
            },
            "description": "成功時のレスポンス"
          }
        },
        "summary": "サブネット一覧の取得",
        "tags": [
          "サブネット操作"
        ]
      },
      "post": {
        "description": "サブネットグループにサブネットを作成します。",
        "operationId": "createSubnet",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "サブネット作成": {
                  "summary": "サブネット作成",
                  "value": {
                    "Description": "サブネットの説明",
                    "IPv4AddressRangeCIDR": "10.0.0.0/26",
                    "Name": "サブネット名",
                    "SubnetGroup": {
                      "SRN": "srnv1:sakura-is1:sakura.networking-suite.subnet-group:1234567890"
                    },
                    "Zone": {
                      "Code": "is1c"
                    }
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/CreateSubnet"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "examples": {
                  "サブネット作成": {
                    "summary": "サブネット作成",
                    "value": {
                      "Subnet": {
                        "Description": "サブネットの説明",
                        "IPv4AddressRangeCIDR": "10.0.0.0/26",
                        "Name": "サブネット名",
                        "SRN": "srnv1:sakura-is1c:sakura.networking-suite.subnet:2345678901",
                        "SubnetGroup": {
                          "SRN": "srnv1:sakura-is1:sakura.networking-suite.subnet-group:1234567890"
                        },
                        "Zone": {
                          "Code": "is1c"
                        }
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CreatedSubnetResponse"
                }
              }
            },
            "description": "成功時のレスポンス"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "An unexpected error response."
          }
        },
        "summary": "サブネットの作成",
        "tags": [
          "サブネット操作"
        ]
      }
    },
    "/networking-suite/subnets/{subnetid}": {
      "delete": {
        "description": "サブネットを削除します。\n\nサブネットを削除するには、サブネットに接続されているNICがすべて切断されている必要があります。インターフェースコネクションを削除することで、NICをサブネットから切断します。",
        "operationId": "deleteSubnet",
        "parameters": [
          {
            "description": "サブネットのID\n\nサブネットのSRNの末尾、ID部分の値を指定します。\n例: `srnv1:sakura-is1c:sakura.networking-suite.subnet:2345678901` の場合は `2345678901` を指定します。",
            "examples": {
              "サブネット削除": {
                "summary": "サブネット削除",
                "value": "2345678901"
              }
            },
            "in": "path",
            "name": "subnetid",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "成功時のレスポンス (内容なし)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "An unexpected error response."
          }
        },
        "summary": "サブネットの削除",
        "tags": [
          "サブネット操作"
        ]
      },
      "get": {
        "description": "サブネットの詳細を取得します。",
        "operationId": "readSubnet",
        "parameters": [
          {
            "description": "サブネットのID\n\nサブネットのSRNの末尾、ID部分の値を指定します。\n例: `srnv1:sakura-is1c:sakura.networking-suite.subnet:2345678901` の場合は `2345678901` を指定します。",
            "examples": {
              "サブネット詳細を取得": {
                "summary": "サブネット詳細を取得",
                "value": "2345678901"
              }
            },
            "in": "path",
            "name": "subnetid",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "サブネット詳細を取得": {
                    "summary": "サブネット詳細を取得",
                    "value": {
                      "Subnet": {
                        "Description": "サブネットの説明",
                        "IPv4AddressRangeCIDR": "10.0.0.0/26",
                        "Name": "サブネット名",
                        "SRN": "srnv1:sakura-is1c:sakura.networking-suite.subnet:2345678901",
                        "SubnetGroup": {
                          "SRN": "srnv1:sakura-is1:sakura.networking-suite.subnet-group:1234567890"
                        },
                        "Zone": {
                          "Code": "is1c"
                        }
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/SubnetResponse"
                }
              }
            },
            "description": "成功時のレスポンス"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "An unexpected error response."
          }
        },
        "summary": "サブネット詳細の取得",
        "tags": [
          "サブネット操作"
        ]
      },
      "put": {
        "description": "サブネットの詳細を更新します。\n\n名前 (`Name`) と説明 (`Description`) のみ更新可能です。",
        "operationId": "updateSubnet",
        "parameters": [
          {
            "description": "サブネットのID\n\nサブネットのSRNの末尾、ID部分の値を指定します。\n例: `srnv1:sakura-is1c:sakura.networking-suite.subnet:2345678901` の場合は `2345678901` を指定します。",
            "examples": {
              "サブネット詳細の更新": {
                "summary": "サブネット詳細の更新",
                "value": "2345678901"
              }
            },
            "in": "path",
            "name": "subnetid",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "サブネット詳細の更新": {
                  "summary": "サブネット詳細の更新",
                  "value": {
                    "Description": "新しいサブネットの説明",
                    "Name": "新しいサブネット名"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/UpdateSubnet"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "サブネット詳細の更新": {
                    "summary": "サブネット詳細の更新",
                    "value": {
                      "Subnet": {
                        "Description": "新しいサブネットの説明",
                        "IPv4AddressRangeCIDR": "10.0.0.0/26",
                        "Name": "新しいサブネット名",
                        "SRN": "srnv1:sakura-is1c:sakura.networking-suite.subnet:2345678901",
                        "SubnetGroup": {
                          "SRN": "srnv1:sakura-is1:sakura.networking-suite.subnet-group:1234567890"
                        },
                        "Zone": {
                          "Code": "is1c"
                        }
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/SubnetResponse"
                }
              }
            },
            "description": "成功時のレスポンス"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "An unexpected error response."
          }
        },
        "summary": "サブネット詳細の更新",
        "tags": [
          "サブネット操作"
        ]
      }
    }
  },
  "servers": [
    {
      "description": "さくらのクラウド 石狩第3ゾーン APIエンドポイント",
      "url": "https://secure.sakura.ad.jp/cloud/zone/is1c/api/cloud/1.1",
      "variables": {}
    }
  ],
  "tags": [
    {
      "description": "サブネットグループの作成、取得、更新、削除を行います。",
      "name": "サブネットグループ操作"
    },
    {
      "description": "サブネットの作成、取得、更新、削除を行います。",
      "name": "サブネット操作"
    },
    {
      "description": "NIC (インターフェース) をサブネットに接続するためのインターフェースコネクションの作成、削除を行います。",
      "name": "インターフェース操作"
    },
    {
      "description": "サブネットで割り当て済みのIPアドレスの取得を行います。",
      "name": "アドレス操作"
    }
  ]
}
