Ada*_*ott 3 amazon-web-services aws-cloudformation
我正在寻找一种方法来列出Cloudformation模板中的现有IAM角色,其方式与列出EC2密钥对相似.下面是我正在尝试使用EC2密钥对和IAM角色的示例,但是Cloudformation会抛出错误,指出"RoleName"不存在.
"KeyName": {
"Description" : "Choose a Key Pair that is available in this region",
"Type": "AWS::EC2::KeyPair::KeyName",
"ConstraintDescription": "Must be the name of an existing EC2 Key Pair"
},
"ServiceRole": {
"Description" : "Choose an IAM Role that is available in this region",
"Type": "AWS::IAM::Role::RoleName",
"ConstraintDescription": "Must be the name of an existing IAM Role"
},
Run Code Online (Sandbox Code Playgroud)
Cloudformation Interface的屏幕截图 如果有可能实现这个想法吗?
下拉列表中并不支持所有类型,并且IAM角色不是受支持的类型.因此,您无法获得IAM角色的下拉列表.相反,您将不得不使用一个简单的文本框.
以下是支持的参数类型的当前列表:
StringNumberList<Number>CommaDelimitedListAWS::EC2::AvailabilityZone::NameAWS::EC2::Image::IdAWS::EC2::Instance::IdAWS::EC2::KeyPair::KeyNameAWS::EC2::SecurityGroup::GroupNameAWS::EC2::SecurityGroup::IdAWS::EC2::Subnet::IdAWS::EC2::Volume::IdAWS::EC2::VPC::IdAWS::Route53::HostedZone::IdList<AWS::EC2::AvailabilityZone::Name>List<AWS::EC2::Image::Id>List<AWS::EC2::Instance::Id>List<AWS::EC2::SecurityGroup::GroupName>List<AWS::EC2::SecurityGroup::Id>List<AWS::EC2::Subnet::Id>List<AWS::EC2::Volume::Id>List<AWS::EC2::VPC::Id>List<AWS::Route53::HostedZone::Id>资料来源:http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html
| 归档时间: |
|
| 查看次数: |
1847 次 |
| 最近记录: |