実行フックを取得する
GET /accounts/{account_id}/core/v1/executionHooks/{executionHook_id}
JSONレスポンスボディに保存されたExecution Hook APIリソースを返します。また、現在のmatchingCriteriaと定義されたアプリに基づいて、matchingContainersおよびmatchingImagesに値を設定します。
パラメータ
| Name | を入力します | 入力 | 必須 | 説明 |
|---|---|---|---|---|
account_id |
string |
path(パス) |
True |
包含するアカウントリソースのID
|
executionHook_id |
string |
path(パス) |
True |
リストするexecutionHookコレクションのID |
応答
Status: 200, Returns the stored Execution Hook API resource in the JSON response body. Also populates matchingContainers and matchingImages based on the current matchingCriteria and the defined app.
| Name | を入力します | 必須 | 説明 |
|---|---|---|---|
を入力します |
string |
True |
リソースのメディアタイプ。定義された値は次のとおりです:
|
バージョン |
string |
True |
リソースのバージョン。定義された値は次のとおりです:
|
ID |
string |
True |
リソースのグローバル一意識別子。定義された値は次のとおりです:
|
名前 |
string |
True |
ユーザーが指定したリソース名を含むJSON文字列。定義された値は次のとおりです:
|
hookType |
string |
True |
フックの種類を定義するJSON文字列。定義された値は次のとおりです:
|
matchingCriteria |
True |
実行フックのマッチング条件を記述するJSONオブジェクトのJSON配列。複数のmatchingCriteriaが指定されている場合、条件に対して論理ANDが適用されます。定義値は次のとおりです:
|
|
matchingContainers |
False |
定義されたアプリ内で、設定された一致条件に一致する各コンテナの JSON オブジェクトの JSON 配列。 |
|
matchingImages |
array[string] |
False |
一致するコンテナイメージのJSON文字列のJSON配列。定義されている値は次のとおりです:
|
アクション |
string |
True |
一致条件が満たされた場合に実行フックが実行するアクションを示すJSON文字列。定義された値は次のとおりです:
|
ステージ |
string |
True |
フックが実行されるアクション中の段階を示すJSON文字列。定義された値は次のとおりです:
|
hookSourceID |
string |
True |
この実行フックを通して実行されるフックソースIDを含むJSON文字列。定義値は次のとおりです:
|
引数 |
array[string] |
False |
ソースへの引数となるJSON文字列のJSON配列。定義された値は次のとおりです:
|
appID |
string |
False |
このフックがリンクされているアプリケーションの関連IDを含むJSON文字列。要するに、設定されている場合は、その他のマッチング基準も含まれる。定義値は次のとおりです:
|
有効 |
string |
True |
実行フックが有効になっているかどうかを示すJSON文字列。定義値は次のとおりです:
|
description |
string |
False |
フックソースに関するユーザー指定の説明を含むJSON文字列。定義された値は次のとおりです:
|
メタデータ |
True |
リソースに関連付けられた、クライアントおよびサービス指定のメタデータ。定義された値は次のとおりです:
|
回答例
{
"type": "application/astra-executionHook",
"version": "1.3",
"id": "5f7e2e31-280d-5984-a28b-2d19ab5b77c0",
"name": "Payroll",
"hookType": "custom",
"matchingCriteria": [
{
"type": "podLabel",
"value": "^env=production$"
},
{
"type": "containerName",
"value": "^payroll-master"
}
],
"matchingImages": [
"docker.io/bitnami/payroll:3.7.8",
"docker.io/bitnami/payroll:4.1.2"
],
"matchingContainers": [
{
"namespaceName": "payroll-east",
"podName": "payroll-release3-7",
"podLabels": [
{
"name": "env",
"value": "production"
},
{
"name": "app.kubernetes.io/managed-by",
"value": "Helm"
}
],
"containerName": "payroll-master-0",
"containerImage": "docker.io/bitnami/payroll:3.7.8"
},
{
"namespaceName": "payroll-east",
"podName": "payroll-release3-7",
"podLabels": [
{
"name": "env",
"value": "production"
},
{
"name": "app.kubernetes.io/managed-by",
"value": "Helm"
}
],
"containerName": "payroll-master-1",
"containerImage": "docker.io/bitnami/payroll:3.7.8"
}
],
"action": "snapshot",
"stage": "pre",
"hookSourceID": "50e89023-ba84-435d-bb47-1833f4c250ff",
"arguments": [
"freeze"
],
"appID": "7be5ae7c-151d-4230-ac39-ac1d0b33c2a9",
"enabled": "true",
"description": "Payroll production hook",
"metadata": {
"labels": [],
"creationTimestamp": "2022-10-06T20:58:16.305662Z",
"modificationTimestamp": "2022-10-06T20:58:16.305662Z",
"createdBy": "8f84cf09-8036-51e4-b579-bd30cb07b269"
}
}
応答
Status: 401, Unauthorized
| Name | を入力します | 必須 | 説明 |
|---|---|---|---|
を入力します |
string |
True |
|
タイトル |
string |
True |
|
詳細 |
string |
True |
|
ステータス |
string |
True |
|
correlationID |
string |
False |
回答例
{
"type": "https://astra.netapp.io/problems/3",
"title": "Missing bearer token",
"detail": "The request is missing the required bearer token.",
"status": "401"
}
応答
Status: 400, Bad request
| Name | を入力します | 必須 | 説明 |
|---|---|---|---|
を入力します |
string |
True |
|
タイトル |
string |
True |
|
詳細 |
string |
True |
|
ステータス |
string |
True |
|
correlationID |
string |
False |
|
invalidParams |
配列["invalidParams"] |
False |
無効なクエリパラメータのリスト |
回答例
{
"type": "https://astra.netapp.io/problems/5",
"title": "Invalid query parameters",
"detail": "The supplied query parameters are invalid.",
"status": "400"
}
応答
Status: 403, Forbidden
| Name | を入力します | 必須 | 説明 |
|---|---|---|---|
を入力します |
string |
True |
|
タイトル |
string |
True |
|
詳細 |
string |
True |
|
ステータス |
string |
True |
|
correlationID |
string |
False |
回答例
{
"type": "https://astra.netapp.io/problems/11",
"title": "Operation not permitted",
"detail": "The requested operation isn't permitted.",
"status": "403"
}
エラー
Status: 404, Not found
| Name | を入力します | 必須 | 説明 |
|---|---|---|---|
を入力します |
string |
True |
|
タイトル |
string |
True |
|
詳細 |
string |
True |
|
ステータス |
string |
True |
|
correlationID |
string |
False |
エラー応答の例
{
"type": "https://astra.netapp.io/problems/2",
"title": "Collection not found",
"detail": "The collection specified in the request URI wasn't found.",
"status": "404"
}
用語の意味
定義を参照
matchingCriteria
| Name | を入力します | 必須 | 説明 |
|---|---|---|---|
を入力します |
string |
True |
一致条件の種類を識別する JSON 文字列。 |
Value |
string |
True |
指定されたマッチタイプに一致する正規表現を含む JSON 文字列。正規表現の構文: https://github.com/google/re2/wiki/Syntax |
type_k8s_labelを使用したチャンク アップロード署名要求がサポートされるようになりました。
| Name | を入力します | 必須 | 説明 |
|---|---|---|---|
名前 |
string |
True |
|
Value |
string |
True |
matchingContainers
| Name | を入力します | 必須 | 説明 |
|---|---|---|---|
podName |
string |
False |
一致するコンテナのポッド名のJSON文字列。 |
podLabels |
False |
一致するコンテナのポッドのラベルのラベルオブジェクトのJSON配列。 |
|
containerImage |
string |
False |
一致するコンテナのイメージのJSON文字列。 |
containerName |
string |
False |
一致するコンテナ名のJSON文字列。 |
namespaceName |
string |
False |
一致するコンテナのポッドの名前空間名を表すJSON文字列。 |
type_astra_label
| Name | を入力します | 必須 | 説明 |
|---|---|---|---|
名前 |
string |
True |
|
Value |
string |
True |
type_astra_metadata_update
リソースに関連付けられた、クライアントおよびサービス指定のメタデータ。定義された値は次のとおりです:
-
Astra メタデータスキーマに準拠します。作成時に指定しない場合、ラベルのないメタデータオブジェクトが作成されます。更新時に指定されていない場合、メタデータオブジェクトのラベル、creationTimestamp および createdBy は、変更なしで保持されます。
| Name | を入力します | 必須 | 説明 |
|---|---|---|---|
ラベル |
False |
||
作成タイムスタンプ |
string |
False |
|
modificationTimestamp |
string |
False |
|
作成者 |
string |
False |
|
modifiedBy |
string |
False |
invalidParams
| Name | を入力します | 必須 | 説明 |
|---|---|---|---|
名前 |
string |
True |
無効なクエリパラメータの名前 |
理由 |
string |
True |
クエリパラメータが無効な理由 |