Add ECS Task Metadata client
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
首先阅读现有的 Aws::EC2Metadata 客户端和 ECS Task Metadata endpoint v4 文档。跟踪客户端如何支持获取 EC2 instance ID,然后定义对应的 ECS task metadata 入口点以及 UpdateContainerInstancesState 所需的 Cluster 值;完成的标准是客户端公开这些数据,并覆盖预期响应。
由索引模型根据 Issue 内容生成。
描述
Describe the feature
Similar to the existing Aws::EC2Metadata client class, it would be helpful to have a metadata client class that retrieves and presents data from the ECS Task Metadata endpoint described here: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-metadata-endpoint-v4.html
While I could retrieve the response from the ECS Task Metadata endpoint and parse the Cluster field from it, having a built-in method to retrieve this would be simpler and cleaner, and is in keeping with how I get the EC2 instance ID already.
Use Case
I want to use this client class to let an application running in ECS on EC2 retrieve the name of the ECS Cluster name it is a part of, for use when calling UpdateContainerInstancesState https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_UpdateContainerInstancesState.html
. This method requires passing in the cluster name, as well as the EC2 instance ID, to set the status to a value. I want to set the status to DRAINING to prevent ECS from placing a task on an EC2 instance that is in one of the Terminating states, but ECS is not aware of this. Because I can control when an EC2 instance is put into a Terminating state, I can also put the ECS container instance state to DRAINING at the same time.
Proposed Solution
Implement similar to the Aws::EC2Metadata client class.
Other Information
No response
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
SDK version used
3.165.0
Environment details (OS name and version, etc.)
Ruby 3.1.2 on Linux, e.g. ruby:3.1.2-slim-bullseye from docker hub
- 主要语言
- Ruby
- 星标
- 3.7k
- 派生
- 1.2k
- 平均合并
- 1 天 16 小时
- 30 天内合并 PR
- 25
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
aws/aws-sdk-ruby 的其他 Issue
-
service-api
难度 2/5 1-3 小时 新手友好度 68/100
aws/aws-sdk-ruby#3395 · 1 条评论 ·
维护者通常 1 天内回复
-
BedrockAgentCore: invoke_agent_runtime buffers entire response instead of streaming in real-time未关闭documentation p3 queued
难度 4/5 3-5 天 新手友好度 48/100
aws/aws-sdk-ruby#3348 · 6 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
feature-request needs-major-version
难度 3/5 1-2 天 新手友好度 48/100
aws/aws-sdk-ruby#3241 · 5 条评论 ·
维护者通常 1 天内回复
-
investigating service-api
难度 4/5 3-5 天 新手友好度 35/100
aws/aws-sdk-ruby#3217 · 4 条评论 ·
维护者通常 1 天内回复
-
service-api
难度 5/5 一周以上 新手友好度 25/100
aws/aws-sdk-ruby#3191 · 1 条评论 ·
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
rubyevents/rubyevents#2277 ·
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 92/100
维护者通常 2 天内回复