Ref

返回值

Ref

在将此资源的逻辑 ID 传递给内部 Ref 函数时,Ref 返回 返回实例 ID。例如:i-1234567890abcdef0

{
  "Type" : "AWS::EC2::Instance",
  "Properties" : {
      "AdditionalInfo" : String,
      "Affinity" : String,
      "AvailabilityZone" : String,
      "BlockDeviceMappings" : [ BlockDeviceMapping, ... ],
      "CreditSpecification" : CreditSpecification,
      "DisableApiTermination" : Boolean,
      "EbsOptimized" : Boolean,
      "ElasticGpuSpecifications" : [ ElasticGpuSpecification, ... ],
      "ElasticInferenceAccelerators" : [ ElasticInferenceAccelerator, ... ],
      "HostId" : String,
      "IamInstanceProfile" : String,
      "ImageId" : String,
      "InstanceInitiatedShutdownBehavior" : String,
      "InstanceType" : String,
      "Ipv6AddressCount" : Integer,
      "Ipv6Addresses" : [ InstanceIpv6Address, ... ],
      "KernelId" : String,
      "KeyName" : String,
      "LaunchTemplate" : LaunchTemplateSpecification,
      "LicenseSpecifications" : [ LicenseSpecification, ... ],
      "Monitoring" : Boolean,
      "NetworkInterfaces" : [ NetworkInterface, ... ],
      "PlacementGroupName" : String,
      "PrivateIpAddress" : String,
      "RamdiskId" : String,
      "SecurityGroupIds" : [ String, ... ],
      "SecurityGroups" : [ String, ... ],
      "SourceDestCheck" : Boolean,
      "SsmAssociations" : [ SsmAssociation, ... ],
      "SubnetId" : String,
      "Tags" : [ Tag, ... ],
      "Tenancy" : String,
      "UserData" : String,
      "Volumes" : [ Volume, ... ]
    }
}
原文地址:https://www.cnblogs.com/cloudrivers/p/11618437.html