Skip to content

Commit a79e7b7

Browse files
committed
Add generic example
1 parent 8eca793 commit a79e7b7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/features.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ However, compared to V3, V4 includes additional network metadata when querying t
5858

5959
#### Generic Metadata Injection
6060

61-
As mentioned above in the previous section, to inject generic metadata, you'll need to have those additional metadata in JSON files. Then specify paths for the JSON files by using `CONTAINER_METADATA_PATH` and `TASK_METADATA_PATH` environment variables. More specifically, `CONTAINER_METADATA_PATH` is the extra metadata for each container, which will override their counterparts in the normal response. Also, `TASK_METADATA_PATH` is for task level metadata, which is used for top level fields describing the task that are not in the containers list.
61+
As mentioned above in the previous section, to inject generic metadata, you'll need to have those additional metadata in JSON files. Then specify paths for the JSON files by using `CONTAINER_METADATA_PATH` and `TASK_METADATA_PATH` environment variables. More specifically, `CONTAINER_METADATA_PATH` is the metadata for each container, which will override their counterparts in the normal response. Also, `TASK_METADATA_PATH` is for task level metadata, which is used only for overriding the top level fields in the task metadata response. If you specify both `CONTAINER_METADATA_PATH` and `TASK_METADATA_PATH`, then the metadata from `CONTAINER_METADATA_PATH` will be included in the `Containers` section of the task metadata response. See example for overriding task metadata response [here](../example/generic).
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"Cluster": "arn:aws:ecs:us-west-2:&ExampleAWSAccountNo1;:cluster/default",
3-
"TaskARN": "arn:aws:ecs:us-west-2:&ExampleAWSAccountNo1;:task/default/febee046097849aba589d4435207c04a",
2+
"Cluster": "arn:aws:ecs:us-west-2:ExampleAWSAccountNo1;:cluster/default",
3+
"TaskARN": "arn:aws:ecs:us-west-2:ExampleAWSAccountNo1;:task/default/febee046097849aba589d4435207c04a",
44
"Family": "query-metadata",
55
"Revision": "7",
66
"DesiredStatus": "RUNNING",
@@ -11,5 +11,5 @@
1111
},
1212
"PullStartedAt": "2020-03-26T22:25:40.420726088Z",
1313
"PullStoppedAt": "2020-03-26T22:26:22.235177616Z",
14-
"AvailabilityZone": "us-west-2c",
14+
"AvailabilityZone": "us-west-2c"
1515
}

0 commit comments

Comments
 (0)