diff --git a/agent/vendor/github.com/aws/amazon-ecs-agent/ecs-agent/tmds/handlers/v4/state/response.go b/agent/vendor/github.com/aws/amazon-ecs-agent/ecs-agent/tmds/handlers/v4/state/response.go index a9710de2396..f441fa87736 100644 --- a/agent/vendor/github.com/aws/amazon-ecs-agent/ecs-agent/tmds/handlers/v4/state/response.go +++ b/agent/vendor/github.com/aws/amazon-ecs-agent/ecs-agent/tmds/handlers/v4/state/response.go @@ -36,6 +36,7 @@ type TaskResponse struct { ServiceName string `json:"ServiceName,omitempty"` ClockDrift *ClockDrift `json:"ClockDrift,omitempty"` EphemeralStorageMetrics *EphemeralStorageMetrics `json:"EphemeralStorageMetrics,omitempty"` + InstanceStorageMetrics *InstanceStorageMetrics `json:"InstanceStorageMetrics,omitempty"` CredentialsID string `json:"-"` TaskNetworkConfig *TaskNetworkConfig `json:"-"` FaultInjectionEnabled bool `json:"FaultInjectionEnabled"` @@ -90,6 +91,14 @@ type EphemeralStorageMetrics struct { ReservedMiBs int64 `json:"Reserved"` } +// InstanceStorageMetrics represents instance-level storage metrics exposed via TMDS. +// Both DataFilesystemUtilization and RootFilesystemUtilization are exposed to customers, +// matching the metrics available via Container Insights. +type InstanceStorageMetrics struct { + DataFilesystemUtilization float64 `json:"DataFilesystemUtilization"` + RootFilesystemUtilization float64 `json:"RootFilesystemUtilization"` +} + // ContainerResponse is the v4 Container response. It augments the v4 Network response // with the v2 container response object. type ContainerResponse struct { diff --git a/ecs-agent/tmds/handlers/v4/state/response.go b/ecs-agent/tmds/handlers/v4/state/response.go index a9710de2396..f441fa87736 100644 --- a/ecs-agent/tmds/handlers/v4/state/response.go +++ b/ecs-agent/tmds/handlers/v4/state/response.go @@ -36,6 +36,7 @@ type TaskResponse struct { ServiceName string `json:"ServiceName,omitempty"` ClockDrift *ClockDrift `json:"ClockDrift,omitempty"` EphemeralStorageMetrics *EphemeralStorageMetrics `json:"EphemeralStorageMetrics,omitempty"` + InstanceStorageMetrics *InstanceStorageMetrics `json:"InstanceStorageMetrics,omitempty"` CredentialsID string `json:"-"` TaskNetworkConfig *TaskNetworkConfig `json:"-"` FaultInjectionEnabled bool `json:"FaultInjectionEnabled"` @@ -90,6 +91,14 @@ type EphemeralStorageMetrics struct { ReservedMiBs int64 `json:"Reserved"` } +// InstanceStorageMetrics represents instance-level storage metrics exposed via TMDS. +// Both DataFilesystemUtilization and RootFilesystemUtilization are exposed to customers, +// matching the metrics available via Container Insights. +type InstanceStorageMetrics struct { + DataFilesystemUtilization float64 `json:"DataFilesystemUtilization"` + RootFilesystemUtilization float64 `json:"RootFilesystemUtilization"` +} + // ContainerResponse is the v4 Container response. It augments the v4 Network response // with the v2 container response object. type ContainerResponse struct {