gpt4 book ai didi

amazon-web-services - EC2 资源的 AWS 数据管道名称标签选项

转载 作者:行者123 更新时间:2023-12-04 09:44:58 25 4
gpt4 key购买 nike

我正在 EC2 资源示例 json 中运行 shell 事件以创建 EC2 资源。

{
"id" : "MyEC2Resource",
"type" : "Ec2Resource",
"actionOnTaskFailure" : "terminate",
"actionOnResourceFailure" : "retryAll",
"maximumRetries" : "1",
"instanceType" : "m5.large",
"securityGroupIds" : [
"sg-12345678",
"sg-12345678"
],
"subnetId": "subnet-12345678",
"associatePublicIpAddress": "true",
"keyPair" : "my-key-pair"
}

上面的 json 正在使用数据管道创建 EC2 资源,但是当我在 AWS 控制台中打开 EC2 资源时,我想为上述资源命名,它将显示具有其他属性的 EC2 资源名称,目前显示为空白。

有关详细信息,请参阅附加图片
enter image description here

最佳答案

你必须标记实例 和:

 Key: Name
Value: MyName
MyName是一个示例名称。你需要把它改成你想要的样子。

将标签添加到管道应该将标签传播到实例。来自 docs :

Applying a tag to a pipeline also propagates the tags to its underlying resources (for example, Amazon EMR clusters and Amazon EC2 instances)



但它可能无法追溯。如果您已经有一个带有实例的管道,它不太可能传播新标签。传播通常只适用于资源创建。对于现有实例,您可能需要改用 EC2 控制台。

关于amazon-web-services - EC2 资源的 AWS 数据管道名称标签选项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62172748/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com