gpt4 book ai didi

amazon-web-services - 输出 AWS::Batch::JobQueue 资源的 JobQueueName 而不是 ARN

转载 作者:行者123 更新时间:2023-12-03 07:37:19 25 4
gpt4 key购买 nike

是否可以导出 JobQueueName 而不是 ARN CloudFormation 的 Outputs 部分中的 AWS::Batch::JobQueue 资源(实际上是 serverless.yml) ?

这就是我导出 ARN 的方式:

Outputs:
epJobQueueMedium:
Description: Batch Job Queue 50 - medium priority
Value:
Ref: epJobQueue50
Export:
Name: epJobQueueMediumArn

Fn::GetAtt 不会为 AWS::Batch::JobQueue 返回任何内容 see the table in the bottom of page .

Fn::Ref 返回 AWS::Batch::JobQueue see table in the bottom of page 的 Arn .

是否可以直接获取我的资源的 JobQueueName 以避免任何进一步的拆分 (Fn::Split) 并选择 (Fn::在 ARN 上选择)?

最佳答案

使用参数怎么样?

---
AWSTemplateFormatVersion: '2010-09-09'
Description: API Template
Parameters:
JobQueueName:
Description: The name of the job queue
Type: String
Default: MyJobQueueName
JobQueue:
Type: AWS::Batch::JobQueue
Properties:
...
JobQueueName: !Ref JobQueueName
Outputs:
epJobQueueMediumName:
Description: The name of this job queue
Value: !Ref JobQueueName
Export:
Name: epJobQueueMediumName

否则选择/分割可以整齐地完成:

Value: !Select [ "1", !Split [ "/", !Ref epJobQueue50 ] ]

关于amazon-web-services - 输出 AWS::Batch::JobQueue 资源的 JobQueueName 而不是 ARN,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48082561/

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