amazon-web-services - 在 Cloudformation 中获取 AutoScaling 组

标签 amazon-web-services aws-cloudformation

我正在使用 Cloudformation 并且 我正在使用 aws:autoscaling:asgAWS::ElasticBeanstalk::ConfigurationTemplate 中配置 autoscaling 组。 现在我需要获取 AutoScaling 组名称来实现 AWS::AutoScaling::LifecycleHook。有没有办法获取 AutoScaling 组名称。请帮我解决这个问题。

最佳答案

CloudFormation 现在有一个名为:AutoScalingGroupName 的属性

Type: "AWS::AutoScaling::AutoScalingGroup"
Properties:
  AutoScalingGroupName: String
  AvailabilityZones:
    - String
  Cooldown: String
  DesiredCapacity: String
  HealthCheckGracePeriod: Integer
  HealthCheckType: String
  InstanceId: String
  LaunchConfigurationName: String
  LaunchTemplate" : LaunchTemplateSpecification
  LifecycleHookSpecificationList: 
    - LifecycleHookSpecification
  LoadBalancerNames:
    - String
  MaxSize: String
  MetricsCollection:
    - MetricsCollection
  MinSize: String
  NotificationConfigurations:
    - NotificationConfiguration
  PlacementGroup: String
  ServiceLinkedRoleARN: String
  Tags:
    - TagProperty
  TargetGroupARNs:
    - String
  TerminationPolicies:
    - String
  VPCZoneIdentifier:
    - String

enter image description here

引用:- https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html

关于amazon-web-services - 在 Cloudformation 中获取 AutoScaling 组,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51007162/

相关文章:

javascript - 使用 Mechanical Turk 的人群 html 元素在 <form> 下出现意外的空间

amazon-web-services - 如何在使用 aws cli 时删除额外的括号和尖括号?

amazon-web-services - 仅在AWS EC2实例上运行Kubernetes

lambda - 您可以使用 Lambda 在通过 Cloudformation 创建的 RDS 上创建架构吗?

python - 如何在AWS API网关中返回非默认回复而不引发异常?

amazon-web-services - 如何限制 AWS Cognito 用户采取某些行动?

amazon-web-services - 如何在cloudformation中提供 `AWS::RDS::DBInstance`的变量?

windows - 在 EC2 用户数据中调用 PowerShell 脚本不起作用

amazon-web-services - 由于运行时参数,嵌套 AWS Lambda 资源 UPDATE_FAILED 不再支持创建或更新 Lambda 函数

amazon-ec2 - 使用 Troposphere 动态创建 n 个 ec2 实例