TenkaCloud Docs

問題メタデータリファレンス Stable

パック内の各問題は metadata.json を持ちます。以下のフィールドは、 @tenkacloud/problem-sdkProblemMetadata コントラクトと validateProblemMetadata バリデーターから導出された規範的リファレンスです。 SDK は idruntimescoring フィールドを所有し、SDK 自身が解釈しない追加の カタログ表示用フィールドに対しては前方互換です。

フィールド

FieldTypePresenceDescription
idstringRequiredStable, non-empty problem identifier. Validated by the SDK.
runtimeobject | compositeOptionalRuntime descriptor ({ provider, engine, entry }) or a composite { kind: 'composite', targets }. Defaults to aws/cloudformation when absent.
cfnTemplatestringOptionalLegacy single deploy-body filename. Defaults to 'template.yaml' when neither runtime.entry nor cfnTemplate is set.
scoringProblemScoringMetadataOptionalOne of the six built-in scoring kinds (flag, multi-flag, uptime-flat, uptime-multi, phased-polling, attack-detection) plus composite-probe.
endpointsunknownOptionalOptional endpoint declarations validated by the metadata-section validators.
phasesunknownOptionalOptional phase declarations for phased-polling problems.
disruptionsunknownOptionalOptional disruption declarations for resilience problems.

ランタイム宣言

問題のランタイムは、単一の { provider, engine, entry } ディスクリプタか、 複合の { kind: "composite", targets } のいずれかです。複合ランタイムには 2 個以上 8 個以下のターゲットが必要です。認識される provider/engine の組み合わせは ランタイム機能マトリクスに記載されています。

以下の例は説明用であり、規範ではありません。

{
  "id": "com.example.starter.intro",
  "runtime": { "provider": "aws", "engine": "cloudformation", "entry": "template.yaml" },
  "scoring": { "kind": "flag", "flagOutputKey": "Flag", "points": 100 }
}

関連: パックマニフェストリファレンス、 およびバリデーションエラーリファレンス