This is the new CloudFormation Template Reference Guide. Please update your bookmarks and links. For help getting started with CloudFormation, see the AWS CloudFormation User Guide.
AWS::ComputeOptimizer::AutomationRule
The AWS::ComputeOptimizer::AutomationRule resource specifies an automation rule that automatically implements recommended actions based on your defined criteria and schedule.
Syntax
To declare this entity in your CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::ComputeOptimizer::AutomationRule", "Properties" : { "Criteria" :Criteria, "Description" :String, "Name" :String, "OrganizationConfiguration" :OrganizationConfiguration, "Priority" :String, "RecommendedActionTypes" :[ String, ... ], "RuleType" :String, "Schedule" :Schedule, "Status" :String, "Tags" :[ Tag, ... ]} }
YAML
Type: AWS::ComputeOptimizer::AutomationRule Properties: Criteria:CriteriaDescription:StringName:StringOrganizationConfiguration:OrganizationConfigurationPriority:StringRecommendedActionTypes:- StringRuleType:StringSchedule:ScheduleStatus:StringTags:- Tag
Properties
Criteria-
A set of conditions that specify which recommended action qualify for implementation. When a rule is active and a recommended action matches these criteria, Compute Optimizer implements the action at the scheduled run time. You can specify up to 20 conditions per filter criteria and 20 values per condition.
Required: No
Type: Criteria
Update requires: No interruption
Description-
A description of the automation rule.
Required: No
Type: String
Pattern:
^[a-zA-Z0-9_\-\s@\.]*$Minimum:
0Maximum:
1024Update requires: No interruption
Name-
The name of the automation rule.
Required: Yes
Type: String
Pattern:
^[a-zA-Z0-9_-]*$Minimum:
0Maximum:
128Update requires: No interruption
OrganizationConfiguration-
Configuration settings for organization-wide rules.
Required: No
Type: OrganizationConfiguration
Update requires: No interruption
Priority-
A string representation of a decimal number between 0 and 1 (having up to 30 digits after the decimal point) that determines the priority of the rule. When multiple rules match the same recommended action, Compute Optimizer assigns the action to the rule with the lowest priority value (highest priority), even if that rule is scheduled to run later than other matching rules.
Required: No
Type: String
Update requires: No interruption
RecommendedActionTypes-
List of recommended action types that this rule can execute.
Required: Yes
Type: Array of String
Allowed values:
SnapshotAndDeleteUnattachedEbsVolume | UpgradeEbsVolumeTypeMinimum:
1Update requires: No interruption
RuleType-
The type of automation rule (OrganizationRule or AccountRule).
Required: Yes
Type: String
Allowed values:
AccountRule | OrganizationRuleUpdate requires: No interruption
Schedule-
The schedule configuration for when the automation rule should execute.
Required: Yes
Type: Schedule
Update requires: No interruption
Status-
The current status of the automation rule (Active or Inactive).
Required: Yes
Type: String
Allowed values:
Active | InactiveUpdate requires: No interruption
-
The tags to associate with the rule.
Required: No
Type: Array of Tag
Maximum:
200Update requires: No interruption
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the Amazon Resource Name (ARN) of the automation rule.
For more information about using the Ref function, see Ref.
Fn::GetAtt
The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.
For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.
AccountId-
The 12-digit AWS account ID that owns this automation rule.
CreatedTimestamp-
The timestamp when the automation rule was created.
LastUpdatedTimestamp-
The timestamp when the automation rule was last updated.
RuleArn-
The Amazon Resource Name (ARN) of the automation rule.
RuleId-
The unique identifier of the automation rule.
RuleRevision-
The revision number of the automation rule.