openapi: 3.2.0 info: title: Sakura Internet Application Version API version: 1.4.0 contact: name: SAKURA internet Inc. license: name: Copyright(C) SAKURA internet Inc. all rights reserved. description: 'Operations tagged application_version across 2 of this provider''s published API definitions: apprun-dedicated-api.yaml, sakura-internet-apprun-dedicated-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: https://secure.sakura.ad.jp/cloud/api/apprun-dedicated/1.0 description: AppRun専有型 API エンドポイント variables: {} security: - BasicAuth: [] tags: - name: application_version paths: /applications/{applicationID}/versions: post: operationId: createApplicationVersion summary: アプリケーションバージョンの作成 description: アプリケーションバージョンを作成します。アプリケーションバージョンを作成するだけではノードにデプロイされません。アプリケーションのアクティブバージョンに指定するとノードにデプロイされます。 parameters: - name: applicationID in: path required: true schema: $ref: '#/components/schemas/ApplicationID' responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/CreateApplicationVersionResponse' default: description: An unexpected error response. content: application/json: schema: $ref: '#/components/schemas/Error' tags: - application_version requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateApplicationVersionRequest' get: operationId: listApplicationVersions summary: アプリケーションバージョンの一覧を取得 description: 指定されたアプリケーションのバージョン一覧を返します。 parameters: - name: applicationID in: path required: true schema: $ref: '#/components/schemas/ApplicationID' - name: cursor in: query required: false description: 前ページの最後のID。これ以降のデータを取得するためのカーソル。 schema: $ref: '#/components/schemas/ApplicationVersionNumber' explode: false - name: maxItems in: query required: true schema: type: integer format: int64 minimum: 1 maximum: 30 default: 30 explode: false responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/ListApplicationVersionsResponse' default: description: An unexpected error response. content: application/json: schema: $ref: '#/components/schemas/Error' tags: - application_version servers: - url: https://secure.sakura.ad.jp/cloud/api/apprun-dedicated/1.0 description: AppRun専有型 API エンドポイント variables: {} /applications/{applicationID}/versions/{version}: delete: operationId: deleteApplicationVersion summary: アプリケーションバージョンの削除 description: 現在ノードにデプロイされているバージョンおよびアクティブなバージョンは削除できません。 parameters: - name: applicationID in: path required: true schema: $ref: '#/components/schemas/ApplicationID' - name: version in: path required: true schema: $ref: '#/components/schemas/ApplicationVersionNumber' responses: '204': description: 'There is no content to send for this request, but the headers may be useful. ' default: description: An unexpected error response. content: application/json: schema: $ref: '#/components/schemas/Error' tags: - application_version get: operationId: readApplicationVersion summary: アプリケーションバージョンの詳細を取得 description: 指定されたバージョンの詳細を返します。 parameters: - name: applicationID in: path required: true schema: $ref: '#/components/schemas/ApplicationID' - name: version in: path required: true schema: $ref: '#/components/schemas/ApplicationVersionNumber' responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/ReadApplicationVersionResponse' default: description: An unexpected error response. content: application/json: schema: $ref: '#/components/schemas/Error' tags: - application_version servers: - url: https://secure.sakura.ad.jp/cloud/api/apprun-dedicated/1.0 description: AppRun専有型 API エンドポイント variables: {} components: schemas: ApplicationVersionSummary: type: object required: - version - image - activeNodeCount - created properties: version: allOf: - $ref: '#/components/schemas/ApplicationVersionNumber' readOnly: true image: type: string maxLength: 512 example: nginx:latest activeNodeCount: type: integer format: int64 description: 現在動いているノードの数 readOnly: true created: type: integer format: unixtime description: アプリケーションバージョン作成日時:UNIX時間(秒) readOnly: true ExposedPort: type: object required: - targetPort - loadBalancerPort - useLetsEncrypt - healthCheck properties: targetPort: allOf: - $ref: '#/components/schemas/Port' description: アプリケーション内部でリッスンするポート番号。このポートがホストでリッスンされます。同一クラスタ内で、ポートの重複不可。 loadBalancerPort: type: - integer - 'null' allOf: - $ref: '#/components/schemas/Port' description: 公開先となるロードバランサのポート番号。ロードバランサに設定しない場合は null を指定する。 useLetsEncrypt: type: boolean description: Let's Encrypt を利用するかどうか(https の場合のみサポート) host: type: array items: $ref: '#/components/schemas/Hostname' maxItems: 5 description: '- HTTP/HTTPS のロードバランサポートを利用する場合は **必須**(1〜5件)。 - TCP または loadBalancerPort = null の場合は **指定不可**。' title: ロードバランサでホスト名ルーティングに使用されるホスト名 healthCheck: type: - object - 'null' allOf: - $ref: '#/components/schemas/HealthCheck' description: ロードバランサがアプリケーションの正常性を確認するための設定です。ヘルスチェックが有効な場合、指定したパスにアクセスし、HTTPステータスコードが 2xx または 3xx 以外の場合は、そのノードへのトラフィックが停止されます。これにより、異常なノードへのアクセスを自動的に防止できます。 title: ヘルスチェックの設定 ReadApplicationVersionResponse: type: object required: - applicationVersion properties: applicationVersion: allOf: - $ref: '#/components/schemas/ReadApplicationVersion' description: アプリケーションのバージョン情報 example: applicationVersion: version: 3 cpu: 500 memory: 500 scalingMode: cpu minScale: 1 maxScale: 2 image: nginx:2 registryUsername: null registryPassword: null exposedPorts: - targetPort: 8080 loadBalancerPort: 80 useLetsEncrypt: false healthCheck: path: /healthz intervalSeconds: 10 timeoutSeconds: 30 - targetPort: 8084 loadBalancerPort: 443 host: - example.com useLetsEncrypt: true healthCheck: path: /monitoring/l7check intervalSeconds: 10 timeoutSeconds: 30 env: - key: ENV_VAR value: value secret: false - key: DB_PASSWORD value: '****' secret: true activeNodeCount: 1 created: 1577836800 ScalingMode: type: string enum: - manual - cpu RegistryPasswordAction: type: string enum: - keep - remove - new EnvironmentVariableValue: type: string maxLength: 4096 Error: type: object required: - status - title properties: status: type: integer format: int32 title: type: string CreateApplicationVersionResponse: type: object required: - applicationVersion properties: applicationVersion: allOf: - $ref: '#/components/schemas/ApplicationVersionIdentifier' description: 作成されたアプリケーションバージョンの情報 ApplicationVersionNumber: type: integer format: int32 minimum: 1 example: 3 ApplicationID: type: string format: uuid ApplicationVersionIdentifier: type: object required: - version properties: version: allOf: - $ref: '#/components/schemas/ApplicationVersionNumber' readOnly: true Hostname: type: string minLength: 1 maxLength: 253 pattern: ^(?=.{1,253}$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$ format: hostname description: 'ロードバランサでホスト名ルーティングに使用されるホスト名。 RFC1123 DNS subdomain names に準拠した形式である必要があります。' example: example.com HealthCheck: type: object required: - path - intervalSeconds - timeoutSeconds properties: path: type: string maxLength: 200 description: ヘルスチェックのパス(HTTP の場合) example: /healthz intervalSeconds: type: integer format: int32 minimum: 3 maximum: 60 description: ヘルスチェックの間隔(秒) default: 30 timeoutSeconds: type: integer format: int32 maximum: 60 description: ヘルスチェックのタイムアウト(秒) default: 5 ReadEnvironmentVariable: type: object required: - key - secret - value properties: key: type: string minLength: 1 maxLength: 255 secret: type: boolean description: 秘密情報か否か。true の場合、value を API 等で取得することは出来ない。 value: type: - string - 'null' allOf: - $ref: '#/components/schemas/EnvironmentVariableValue' description: 環境変数の値。secret が true の場合は null になる。 description: 環境変数の取得レスポンス Port: type: integer format: uint16 minimum: 1 maximum: 65535 example: 8443 ListApplicationVersionsResponse: type: object required: - versions properties: versions: type: array items: $ref: '#/components/schemas/ApplicationVersionSummary' description: アプリケーションのバージョン一覧 nextCursor: allOf: - $ref: '#/components/schemas/ApplicationVersionNumber' description: 次ページのカーソル。次のリクエストでcursorとして指定する。データが残っていなければnull。 example: versions: - version: 3 image: nginx:2 activeNodeCount: 1 created: 1577836800 - version: 2 image: nginx:2 activeNodeCount: 0 created: 1577836800 - version: 1 image: nginx:1 activeNodeCount: 0 created: 1577836800 ReadApplicationVersion: type: object required: - version - image - activeNodeCount - created - cpu - memory - scalingMode - registryUsername - registryPassword - exposedPorts - env properties: version: $ref: '#/components/schemas/ApplicationVersionNumber' image: type: string maxLength: 512 example: nginx:latest activeNodeCount: type: integer format: int64 description: 現在動いているノードの数 created: type: integer format: unixtime description: アプリケーションバージョン作成日時:UNIX時間(秒) cpu: type: integer format: int64 minimum: 100 maximum: 64000 example: 500 memory: type: integer format: int64 minimum: 128 maximum: 131072 example: 1000 scalingMode: $ref: '#/components/schemas/ScalingMode' fixedScale: type: integer format: int32 minimum: 1 maximum: 50 minScale: type: integer format: int32 minimum: 1 maximum: 50 example: 1 maxScale: type: integer format: int32 minimum: 1 maximum: 50 example: 3 scaleInThreshold: type: integer format: int32 minimum: 30 maximum: 70 example: 30 scaleOutThreshold: type: integer format: int32 minimum: 50 maximum: 99 example: 95 cmd: type: array items: type: string maxItems: 20 description: コンテナ起動時に実行するコマンドと引数 registryUsername: type: - string - 'null' maxLength: 255 description: レジストリのユーザ名。未設定の場合はnull。 registryPassword: type: - string - 'null' maxLength: 255 description: レジストリのパスワード。レスポンスではマスクされる。未設定の場合はnull。 exposedPorts: type: array items: $ref: '#/components/schemas/ExposedPort' maxItems: 5 description: アプリケーションが公開するポート番号。同一クラスタ内で、ポートの重複不可。 env: type: array items: $ref: '#/components/schemas/ReadEnvironmentVariable' maxItems: 50 description: 環境変数 example: version: 2 cpu: 500 memory: 500 scalingMode: manual fixedScale: 2 image: nginx:2 registryUsername: null registryPassword: null exposedPorts: - targetPort: 8080 loadBalancerPort: 8080 useLetsEncrypt: false healthCheck: path: /healthz2 intervalSeconds: 10 timeoutSeconds: 30 env: - key: DB_DSN value: postgresql://192.168.0.1:5432/foobar secret: false - key: DB_PASSWORD value: '****' secret: true activeNodeCount: 0 created: 1577836800 CreateEnvironmentVariable: type: object required: - key - secret properties: key: type: string minLength: 1 maxLength: 255 secret: type: boolean description: 秘密情報か否か。true の場合、value を API 等で取得することは出来ない。 value: allOf: - $ref: '#/components/schemas/EnvironmentVariableValue' description: 環境変数の値。secret が true で、かつ value が指定されていない場合は前のバージョンの値が利用される。 description: 環境変数作成用モデル CreateApplicationVersionRequest: type: object required: - image - cpu - memory - scalingMode - registryUsername - registryPassword - registryPasswordAction - exposedPorts - env properties: image: type: string maxLength: 512 example: nginx:latest cpu: type: integer format: int64 minimum: 100 maximum: 64000 example: 500 memory: type: integer format: int64 minimum: 128 maximum: 131072 example: 1000 scalingMode: $ref: '#/components/schemas/ScalingMode' fixedScale: type: integer format: int32 minimum: 1 maximum: 50 minScale: type: integer format: int32 minimum: 1 maximum: 50 example: 1 maxScale: type: integer format: int32 minimum: 1 maximum: 50 example: 3 scaleInThreshold: type: integer format: int32 minimum: 30 maximum: 70 example: 30 scaleOutThreshold: type: integer format: int32 minimum: 50 maximum: 99 example: 95 cmd: type: array items: type: string maxItems: 20 description: コンテナ起動時に実行するコマンドと引数 registryUsername: type: - string - 'null' maxLength: 255 description: レジストリのユーザ名。未設定の場合はnull。 registryPassword: type: - string - 'null' maxLength: 255 description: レジストリのパスワード。レスポンスではマスクされる。未設定の場合はnull。 registryPasswordAction: allOf: - $ref: '#/components/schemas/RegistryPasswordAction' description: レジストリパスワードの設定方法 exposedPorts: type: array items: $ref: '#/components/schemas/ExposedPort' maxItems: 5 description: アプリケーションが公開するポート番号。同一クラスタ内で、ポートの重複不可。 env: type: array items: $ref: '#/components/schemas/CreateEnvironmentVariable' maxItems: 50 description: 環境変数 securitySchemes: BasicAuth: type: http scheme: Basic externalDocs: url: https://manual.sakura.ad.jp/cloud/apprun-dedicated/releasenote.html description: リリースノート | さくらのクラウド マニュアル x-refined-from: - apprun-dedicated-api.yaml - sakura-internet-apprun-dedicated-openapi.yml