AWS::AccountId
AWS::NoValue
AWS::Region
は個人的によく使う。
AWS::AccountId
123456789012 のように、AWSアカウントが返される。
AWS::NoValue
組み込み関数 !If の戻り値として指定すると、対応するリソースのプロパティを削除します。
次の例では、IsBurstType が
true の場合は、CPUCredits: standard を返し、
falseの場合は、CreditSpecification を削除します。
AWSTemplateFormatVersion: "2010-09-09"
Parameters:
IsBurstType:
Type: String
AllowedValues: ['true', 'false']
Conditions:
IsBurstType:
Fn::Equals: ['true', !Ref IsBurstType]
Resources:
EC2Instance:
Type: "AWS::EC2::Instance"
Properties:
CreditSpecification:
Fn::If:
- IsBurstType
- CPUCredits: standard
- !Ref "AWS::NoValue"
AWS::Region
ap-northeast-1 のように、AWSリージョンが返される。
AWS::NotificationARNs
現在のStackの通知に使われるARNのリストを返す。
myASGrpOne:
Type: AWS::AutoScaling::AutoScalingGroup
Version: '2009-05-15'
Properties:
NotificationConfigurations:
- TopicARN:
Fn::Select:
- '0'
- Ref: AWS::NotificationARNs
NotificationTypes:
- autoscaling:EC2_INSTANCE_LAUNCH
- autoscaling:EC2_INSTANCE_LAUNCH_ERROR
AWS::Partition
標準の AWS リージョンの場合、aws
他のパーティションのリソースの場合は aws-partitionname
AWS::StackId
arn:aws:cloudformation:us-west-2:ap-northeast-1:stack/teststack/51af3dc0-da77-11e4-872e-1234567db123 のように、スタックの ID を返す。
AWS::StackName
スタックの名前が返される。
AWS::URLSuffix
通常 amazonaws.com です。