Skip to content

Commit 2e81efc

Browse files
author
Hoshank Mali
committed
Add InstanceStorageMetrics struct to TMDS v4 response.
1 parent cbdf701 commit 2e81efc

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

  • agent/vendor/github.com/aws/amazon-ecs-agent/ecs-agent/tmds/handlers/v4/state
  • ecs-agent/tmds/handlers/v4/state

agent/vendor/github.com/aws/amazon-ecs-agent/ecs-agent/tmds/handlers/v4/state/response.go

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ecs-agent/tmds/handlers/v4/state/response.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ type TaskResponse struct {
3636
ServiceName string `json:"ServiceName,omitempty"`
3737
ClockDrift *ClockDrift `json:"ClockDrift,omitempty"`
3838
EphemeralStorageMetrics *EphemeralStorageMetrics `json:"EphemeralStorageMetrics,omitempty"`
39+
InstanceStorageMetrics *InstanceStorageMetrics `json:"InstanceStorageMetrics,omitempty"`
3940
CredentialsID string `json:"-"`
4041
TaskNetworkConfig *TaskNetworkConfig `json:"-"`
4142
FaultInjectionEnabled bool `json:"FaultInjectionEnabled"`
@@ -90,6 +91,13 @@ type EphemeralStorageMetrics struct {
9091
ReservedMiBs int64 `json:"Reserved"`
9192
}
9293

94+
// InstanceStorageMetrics represents instance-level storage metrics exposed via TMDS.
95+
// Only DataFilesystemUtilization is exposed to customers. RootFilesystemUtilization
96+
// is collected internally but not included in the TMDS response.
97+
type InstanceStorageMetrics struct {
98+
DataFilesystemUtilization float64 `json:"DataFilesystemUtilization"`
99+
}
100+
93101
// ContainerResponse is the v4 Container response. It augments the v4 Network response
94102
// with the v2 container response object.
95103
type ContainerResponse struct {

0 commit comments

Comments
 (0)