We recommend new projects start with resources from the AWS provider.
published on Monday, Mar 9, 2026 by Pulumi
We recommend new projects start with resources from the AWS provider.
published on Monday, Mar 9, 2026 by Pulumi
Creates an AWS Compute Optimizer automation rule that automatically implements recommended actions based on your defined criteria and schedule. Automation rules are global resources that manage automated actions across all AWS Regions where Compute Optimizer Automation is available. Organization-level rules can only be created by the management account or delegated administrator.
Using getAutomationRule
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getAutomationRule(args: GetAutomationRuleArgs, opts?: InvokeOptions): Promise<GetAutomationRuleResult>
function getAutomationRuleOutput(args: GetAutomationRuleOutputArgs, opts?: InvokeOptions): Output<GetAutomationRuleResult>def get_automation_rule(rule_arn: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAutomationRuleResult
def get_automation_rule_output(rule_arn: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAutomationRuleResult]func LookupAutomationRule(ctx *Context, args *LookupAutomationRuleArgs, opts ...InvokeOption) (*LookupAutomationRuleResult, error)
func LookupAutomationRuleOutput(ctx *Context, args *LookupAutomationRuleOutputArgs, opts ...InvokeOption) LookupAutomationRuleResultOutput> Note: This function is named LookupAutomationRule in the Go SDK.
public static class GetAutomationRule
{
public static Task<GetAutomationRuleResult> InvokeAsync(GetAutomationRuleArgs args, InvokeOptions? opts = null)
public static Output<GetAutomationRuleResult> Invoke(GetAutomationRuleInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetAutomationRuleResult> getAutomationRule(GetAutomationRuleArgs args, InvokeOptions options)
public static Output<GetAutomationRuleResult> getAutomationRule(GetAutomationRuleArgs args, InvokeOptions options)
fn::invoke:
function: aws-native:computeoptimizer:getAutomationRule
arguments:
# arguments dictionaryThe following arguments are supported:
- Rule
Arn string - The Amazon Resource Name (ARN) of the automation rule.
- Rule
Arn string - The Amazon Resource Name (ARN) of the automation rule.
- rule
Arn String - The Amazon Resource Name (ARN) of the automation rule.
- rule
Arn string - The Amazon Resource Name (ARN) of the automation rule.
- rule_
arn str - The Amazon Resource Name (ARN) of the automation rule.
- rule
Arn String - The Amazon Resource Name (ARN) of the automation rule.
getAutomationRule Result
The following output properties are available:
- Account
Id string - The AWS account ID that owns the automation rule.
- Created
Timestamp string - The timestamp when the automation rule was created.
- Criteria
Pulumi.
Aws Native. Compute Optimizer. Outputs. Automation Rule Criteria - Filter criteria that specify which recommended actions qualify for implementation.
- Description string
- The description of the automation rule.
- Last
Updated stringTimestamp - The timestamp when the automation rule was last updated.
- Name string
- The name of the automation rule.
- Organization
Configuration Pulumi.Aws Native. Compute Optimizer. Outputs. Automation Rule Organization Configuration - Organization configuration for organization rules, including rule apply order and account scope.
- Priority string
- Rule priority within its group
- Recommended
Action List<Pulumi.Types Aws Native. Compute Optimizer. Automation Rule Recommended Action Types Item> - The types of recommended actions this rule will implement.
- Rule
Arn string - The Amazon Resource Name (ARN) of the automation rule.
- Rule
Id string - The unique identifier of the automation rule.
- Rule
Revision string - The revision number of the automation rule.
- Rule
Type Pulumi.Aws Native. Compute Optimizer. Automation Rule Rule Type - The type of automation rule.
- Schedule
Pulumi.
Aws Native. Compute Optimizer. Outputs. Automation Rule Schedule - The schedule configuration for when the rule runs.
- Status
Pulumi.
Aws Native. Compute Optimizer. Automation Rule Status - The status of the automation rule.
-
List<Pulumi.
Aws Native. Outputs. Tag> - Tags associated with the automation rule.
- Account
Id string - The AWS account ID that owns the automation rule.
- Created
Timestamp string - The timestamp when the automation rule was created.
- Criteria
Automation
Rule Criteria - Filter criteria that specify which recommended actions qualify for implementation.
- Description string
- The description of the automation rule.
- Last
Updated stringTimestamp - The timestamp when the automation rule was last updated.
- Name string
- The name of the automation rule.
- Organization
Configuration AutomationRule Organization Configuration - Organization configuration for organization rules, including rule apply order and account scope.
- Priority string
- Rule priority within its group
- Recommended
Action []AutomationTypes Rule Recommended Action Types Item - The types of recommended actions this rule will implement.
- Rule
Arn string - The Amazon Resource Name (ARN) of the automation rule.
- Rule
Id string - The unique identifier of the automation rule.
- Rule
Revision string - The revision number of the automation rule.
- Rule
Type AutomationRule Rule Type - The type of automation rule.
- Schedule
Automation
Rule Schedule - The schedule configuration for when the rule runs.
- Status
Automation
Rule Status - The status of the automation rule.
- Tag
- Tags associated with the automation rule.
- account
Id String - The AWS account ID that owns the automation rule.
- created
Timestamp String - The timestamp when the automation rule was created.
- criteria
Automation
Rule Criteria - Filter criteria that specify which recommended actions qualify for implementation.
- description String
- The description of the automation rule.
- last
Updated StringTimestamp - The timestamp when the automation rule was last updated.
- name String
- The name of the automation rule.
- organization
Configuration AutomationRule Organization Configuration - Organization configuration for organization rules, including rule apply order and account scope.
- priority String
- Rule priority within its group
- recommended
Action List<AutomationTypes Rule Recommended Action Types Item> - The types of recommended actions this rule will implement.
- rule
Arn String - The Amazon Resource Name (ARN) of the automation rule.
- rule
Id String - The unique identifier of the automation rule.
- rule
Revision String - The revision number of the automation rule.
- rule
Type AutomationRule Rule Type - The type of automation rule.
- schedule
Automation
Rule Schedule - The schedule configuration for when the rule runs.
- status
Automation
Rule Status - The status of the automation rule.
- List<Tag>
- Tags associated with the automation rule.
- account
Id string - The AWS account ID that owns the automation rule.
- created
Timestamp string - The timestamp when the automation rule was created.
- criteria
Automation
Rule Criteria - Filter criteria that specify which recommended actions qualify for implementation.
- description string
- The description of the automation rule.
- last
Updated stringTimestamp - The timestamp when the automation rule was last updated.
- name string
- The name of the automation rule.
- organization
Configuration AutomationRule Organization Configuration - Organization configuration for organization rules, including rule apply order and account scope.
- priority string
- Rule priority within its group
- recommended
Action AutomationTypes Rule Recommended Action Types Item[] - The types of recommended actions this rule will implement.
- rule
Arn string - The Amazon Resource Name (ARN) of the automation rule.
- rule
Id string - The unique identifier of the automation rule.
- rule
Revision string - The revision number of the automation rule.
- rule
Type AutomationRule Rule Type - The type of automation rule.
- schedule
Automation
Rule Schedule - The schedule configuration for when the rule runs.
- status
Automation
Rule Status - The status of the automation rule.
- Tag[]
- Tags associated with the automation rule.
- account_
id str - The AWS account ID that owns the automation rule.
- created_
timestamp str - The timestamp when the automation rule was created.
- criteria
Automation
Rule Criteria - Filter criteria that specify which recommended actions qualify for implementation.
- description str
- The description of the automation rule.
- last_
updated_ strtimestamp - The timestamp when the automation rule was last updated.
- name str
- The name of the automation rule.
- organization_
configuration AutomationRule Organization Configuration - Organization configuration for organization rules, including rule apply order and account scope.
- priority str
- Rule priority within its group
- recommended_
action_ Sequence[Automationtypes Rule Recommended Action Types Item] - The types of recommended actions this rule will implement.
- rule_
arn str - The Amazon Resource Name (ARN) of the automation rule.
- rule_
id str - The unique identifier of the automation rule.
- rule_
revision str - The revision number of the automation rule.
- rule_
type AutomationRule Rule Type - The type of automation rule.
- schedule
Automation
Rule Schedule - The schedule configuration for when the rule runs.
- status
Automation
Rule Status - The status of the automation rule.
- Sequence[root_Tag]
- Tags associated with the automation rule.
- account
Id String - The AWS account ID that owns the automation rule.
- created
Timestamp String - The timestamp when the automation rule was created.
- criteria Property Map
- Filter criteria that specify which recommended actions qualify for implementation.
- description String
- The description of the automation rule.
- last
Updated StringTimestamp - The timestamp when the automation rule was last updated.
- name String
- The name of the automation rule.
- organization
Configuration Property Map - Organization configuration for organization rules, including rule apply order and account scope.
- priority String
- Rule priority within its group
- recommended
Action List<"SnapshotTypes And Delete Unattached Ebs Volume" | "Upgrade Ebs Volume Type"> - The types of recommended actions this rule will implement.
- rule
Arn String - The Amazon Resource Name (ARN) of the automation rule.
- rule
Id String - The unique identifier of the automation rule.
- rule
Revision String - The revision number of the automation rule.
- rule
Type "AccountRule" | "Organization Rule" - The type of automation rule.
- schedule Property Map
- The schedule configuration for when the rule runs.
- status "Active" | "Inactive"
- The status of the automation rule.
- List<Property Map>
- Tags associated with the automation rule.
Supporting Types
AutomationRuleCriteria
- Ebs
Volume List<Pulumi.Size In Gib Aws Native. Compute Optimizer. Inputs. Automation Rule Integer Criteria Condition> - Ebs
Volume List<Pulumi.Type Aws Native. Compute Optimizer. Inputs. Automation Rule String Criteria Condition> - Estimated
Monthly List<Pulumi.Savings Aws Native. Compute Optimizer. Inputs. Automation Rule Double Criteria Condition> - Look
Back List<Pulumi.Period In Days Aws Native. Compute Optimizer. Inputs. Automation Rule Integer Criteria Condition> - Region
List<Pulumi.
Aws Native. Compute Optimizer. Inputs. Automation Rule String Criteria Condition> - Resource
Arn List<Pulumi.Aws Native. Compute Optimizer. Inputs. Automation Rule String Criteria Condition> - Resource
Tag List<Pulumi.Aws Native. Compute Optimizer. Inputs. Automation Rule Resource Tags Criteria Condition> - Restart
Needed List<Pulumi.Aws Native. Compute Optimizer. Inputs. Automation Rule String Criteria Condition>
- Ebs
Volume []AutomationSize In Gib Rule Integer Criteria Condition - Ebs
Volume []AutomationType Rule String Criteria Condition - Estimated
Monthly []AutomationSavings Rule Double Criteria Condition - Look
Back []AutomationPeriod In Days Rule Integer Criteria Condition - Region
[]Automation
Rule String Criteria Condition - Resource
Arn []AutomationRule String Criteria Condition - Resource
Tag []AutomationRule Resource Tags Criteria Condition - Restart
Needed []AutomationRule String Criteria Condition
- ebs
Volume List<AutomationSize In Gib Rule Integer Criteria Condition> - ebs
Volume List<AutomationType Rule String Criteria Condition> - estimated
Monthly List<AutomationSavings Rule Double Criteria Condition> - look
Back List<AutomationPeriod In Days Rule Integer Criteria Condition> - region
List<Automation
Rule String Criteria Condition> - resource
Arn List<AutomationRule String Criteria Condition> - resource
Tag List<AutomationRule Resource Tags Criteria Condition> - restart
Needed List<AutomationRule String Criteria Condition>
- ebs
Volume AutomationSize In Gib Rule Integer Criteria Condition[] - ebs
Volume AutomationType Rule String Criteria Condition[] - estimated
Monthly AutomationSavings Rule Double Criteria Condition[] - look
Back AutomationPeriod In Days Rule Integer Criteria Condition[] - region
Automation
Rule String Criteria Condition[] - resource
Arn AutomationRule String Criteria Condition[] - resource
Tag AutomationRule Resource Tags Criteria Condition[] - restart
Needed AutomationRule String Criteria Condition[]
- ebs_
volume_ Sequence[Automationsize_ in_ gib Rule Integer Criteria Condition] - ebs_
volume_ Sequence[Automationtype Rule String Criteria Condition] - estimated_
monthly_ Sequence[Automationsavings Rule Double Criteria Condition] - look_
back_ Sequence[Automationperiod_ in_ days Rule Integer Criteria Condition] - region
Sequence[Automation
Rule String Criteria Condition] - resource_
arn Sequence[AutomationRule String Criteria Condition] - resource_
tag Sequence[AutomationRule Resource Tags Criteria Condition] - restart_
needed Sequence[AutomationRule String Criteria Condition]
AutomationRuleDoubleCriteriaCondition
- comparison
Automation
Rule Double Criteria Condition Comparison - values Sequence[float]
AutomationRuleDoubleCriteriaConditionComparison
AutomationRuleIntegerCriteriaCondition
AutomationRuleIntegerCriteriaConditionComparison
AutomationRuleOrganizationConfiguration
- Account
Ids List<string> - List of account IDs where the organization rule applies
- Rule
Apply Pulumi.Order Aws Native. Compute Optimizer. Automation Rule Organization Configuration Rule Apply Order - When the rule should be applied relative to account rules
- Account
Ids []string - List of account IDs where the organization rule applies
- Rule
Apply AutomationOrder Rule Organization Configuration Rule Apply Order - When the rule should be applied relative to account rules
- account
Ids List<String> - List of account IDs where the organization rule applies
- rule
Apply AutomationOrder Rule Organization Configuration Rule Apply Order - When the rule should be applied relative to account rules
- account
Ids string[] - List of account IDs where the organization rule applies
- rule
Apply AutomationOrder Rule Organization Configuration Rule Apply Order - When the rule should be applied relative to account rules
- account_
ids Sequence[str] - List of account IDs where the organization rule applies
- rule_
apply_ Automationorder Rule Organization Configuration Rule Apply Order - When the rule should be applied relative to account rules
- account
Ids List<String> - List of account IDs where the organization rule applies
- rule
Apply "BeforeOrder Account Rules" | "After Account Rules" - When the rule should be applied relative to account rules
AutomationRuleOrganizationConfigurationRuleApplyOrder
AutomationRuleRecommendedActionTypesItem
AutomationRuleResourceTagsCriteriaCondition
- comparison
Automation
Rule Resource Tags Criteria Condition Comparison - key String
- values List<String>
- comparison
Automation
Rule Resource Tags Criteria Condition Comparison - key str
- values Sequence[str]
- comparison
"String
Equals" | "String Not Equals" | "String Equals Ignore Case" | "String Not Equals Ignore Case" | "String Like" | "String Not Like" | "Numeric Equals" | "Numeric Not Equals" | "Numeric Less Than" | "Numeric Less Than Equals" | "Numeric Greater Than" | "Numeric Greater Than Equals" - key String
- values List<String>
AutomationRuleResourceTagsCriteriaConditionComparison
AutomationRuleRuleType
AutomationRuleSchedule
- Execution
Window intIn Minutes - Execution window duration in minutes
- Schedule
Expression string - Schedule expression (e.g., cron or rate expression)
- Schedule
Expression stringTimezone - IANA timezone identifier
- Execution
Window intIn Minutes - Execution window duration in minutes
- Schedule
Expression string - Schedule expression (e.g., cron or rate expression)
- Schedule
Expression stringTimezone - IANA timezone identifier
- execution
Window IntegerIn Minutes - Execution window duration in minutes
- schedule
Expression String - Schedule expression (e.g., cron or rate expression)
- schedule
Expression StringTimezone - IANA timezone identifier
- execution
Window numberIn Minutes - Execution window duration in minutes
- schedule
Expression string - Schedule expression (e.g., cron or rate expression)
- schedule
Expression stringTimezone - IANA timezone identifier
- execution_
window_ intin_ minutes - Execution window duration in minutes
- schedule_
expression str - Schedule expression (e.g., cron or rate expression)
- schedule_
expression_ strtimezone - IANA timezone identifier
- execution
Window NumberIn Minutes - Execution window duration in minutes
- schedule
Expression String - Schedule expression (e.g., cron or rate expression)
- schedule
Expression StringTimezone - IANA timezone identifier
AutomationRuleStatus
AutomationRuleStringCriteriaCondition
AutomationRuleStringCriteriaConditionComparison
Tag
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.
published on Monday, Mar 9, 2026 by Pulumi
