1. Packages
  2. AWS Cloud Control
  3. API Docs
  4. computeoptimizer
  5. getAutomationRule

We recommend new projects start with resources from the AWS provider.

Viewing docs for AWS Cloud Control v1.57.0
published on Monday, Mar 9, 2026 by Pulumi
aws-native logo

We recommend new projects start with resources from the AWS provider.

Viewing docs for AWS Cloud Control v1.57.0
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 dictionary

    The following arguments are supported:

    RuleArn string
    The Amazon Resource Name (ARN) of the automation rule.
    RuleArn string
    The Amazon Resource Name (ARN) of the automation rule.
    ruleArn String
    The Amazon Resource Name (ARN) of the automation rule.
    ruleArn string
    The Amazon Resource Name (ARN) of the automation rule.
    rule_arn str
    The Amazon Resource Name (ARN) of the automation rule.
    ruleArn String
    The Amazon Resource Name (ARN) of the automation rule.

    getAutomationRule Result

    The following output properties are available:

    AccountId string
    The AWS account ID that owns the automation rule.
    CreatedTimestamp string
    The timestamp when the automation rule was created.
    Criteria Pulumi.AwsNative.ComputeOptimizer.Outputs.AutomationRuleCriteria
    Filter criteria that specify which recommended actions qualify for implementation.
    Description string
    The description of the automation rule.
    LastUpdatedTimestamp string
    The timestamp when the automation rule was last updated.
    Name string
    The name of the automation rule.
    OrganizationConfiguration Pulumi.AwsNative.ComputeOptimizer.Outputs.AutomationRuleOrganizationConfiguration
    Organization configuration for organization rules, including rule apply order and account scope.
    Priority string
    Rule priority within its group
    RecommendedActionTypes List<Pulumi.AwsNative.ComputeOptimizer.AutomationRuleRecommendedActionTypesItem>
    The types of recommended actions this rule will implement.
    RuleArn string
    The Amazon Resource Name (ARN) of the automation rule.
    RuleId string
    The unique identifier of the automation rule.
    RuleRevision string
    The revision number of the automation rule.
    RuleType Pulumi.AwsNative.ComputeOptimizer.AutomationRuleRuleType
    The type of automation rule.
    Schedule Pulumi.AwsNative.ComputeOptimizer.Outputs.AutomationRuleSchedule
    The schedule configuration for when the rule runs.
    Status Pulumi.AwsNative.ComputeOptimizer.AutomationRuleStatus
    The status of the automation rule.
    Tags List<Pulumi.AwsNative.Outputs.Tag>
    Tags associated with the automation rule.
    AccountId string
    The AWS account ID that owns the automation rule.
    CreatedTimestamp string
    The timestamp when the automation rule was created.
    Criteria AutomationRuleCriteria
    Filter criteria that specify which recommended actions qualify for implementation.
    Description string
    The description of the automation rule.
    LastUpdatedTimestamp string
    The timestamp when the automation rule was last updated.
    Name string
    The name of the automation rule.
    OrganizationConfiguration AutomationRuleOrganizationConfiguration
    Organization configuration for organization rules, including rule apply order and account scope.
    Priority string
    Rule priority within its group
    RecommendedActionTypes []AutomationRuleRecommendedActionTypesItem
    The types of recommended actions this rule will implement.
    RuleArn string
    The Amazon Resource Name (ARN) of the automation rule.
    RuleId string
    The unique identifier of the automation rule.
    RuleRevision string
    The revision number of the automation rule.
    RuleType AutomationRuleRuleType
    The type of automation rule.
    Schedule AutomationRuleSchedule
    The schedule configuration for when the rule runs.
    Status AutomationRuleStatus
    The status of the automation rule.
    Tags Tag
    Tags associated with the automation rule.
    accountId String
    The AWS account ID that owns the automation rule.
    createdTimestamp String
    The timestamp when the automation rule was created.
    criteria AutomationRuleCriteria
    Filter criteria that specify which recommended actions qualify for implementation.
    description String
    The description of the automation rule.
    lastUpdatedTimestamp String
    The timestamp when the automation rule was last updated.
    name String
    The name of the automation rule.
    organizationConfiguration AutomationRuleOrganizationConfiguration
    Organization configuration for organization rules, including rule apply order and account scope.
    priority String
    Rule priority within its group
    recommendedActionTypes List<AutomationRuleRecommendedActionTypesItem>
    The types of recommended actions this rule will implement.
    ruleArn String
    The Amazon Resource Name (ARN) of the automation rule.
    ruleId String
    The unique identifier of the automation rule.
    ruleRevision String
    The revision number of the automation rule.
    ruleType AutomationRuleRuleType
    The type of automation rule.
    schedule AutomationRuleSchedule
    The schedule configuration for when the rule runs.
    status AutomationRuleStatus
    The status of the automation rule.
    tags List<Tag>
    Tags associated with the automation rule.
    accountId string
    The AWS account ID that owns the automation rule.
    createdTimestamp string
    The timestamp when the automation rule was created.
    criteria AutomationRuleCriteria
    Filter criteria that specify which recommended actions qualify for implementation.
    description string
    The description of the automation rule.
    lastUpdatedTimestamp string
    The timestamp when the automation rule was last updated.
    name string
    The name of the automation rule.
    organizationConfiguration AutomationRuleOrganizationConfiguration
    Organization configuration for organization rules, including rule apply order and account scope.
    priority string
    Rule priority within its group
    recommendedActionTypes AutomationRuleRecommendedActionTypesItem[]
    The types of recommended actions this rule will implement.
    ruleArn string
    The Amazon Resource Name (ARN) of the automation rule.
    ruleId string
    The unique identifier of the automation rule.
    ruleRevision string
    The revision number of the automation rule.
    ruleType AutomationRuleRuleType
    The type of automation rule.
    schedule AutomationRuleSchedule
    The schedule configuration for when the rule runs.
    status AutomationRuleStatus
    The status of the automation rule.
    tags 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 AutomationRuleCriteria
    Filter criteria that specify which recommended actions qualify for implementation.
    description str
    The description of the automation rule.
    last_updated_timestamp str
    The timestamp when the automation rule was last updated.
    name str
    The name of the automation rule.
    organization_configuration AutomationRuleOrganizationConfiguration
    Organization configuration for organization rules, including rule apply order and account scope.
    priority str
    Rule priority within its group
    recommended_action_types Sequence[AutomationRuleRecommendedActionTypesItem]
    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 AutomationRuleRuleType
    The type of automation rule.
    schedule AutomationRuleSchedule
    The schedule configuration for when the rule runs.
    status AutomationRuleStatus
    The status of the automation rule.
    tags Sequence[root_Tag]
    Tags associated with the automation rule.
    accountId String
    The AWS account ID that owns the automation rule.
    createdTimestamp 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.
    lastUpdatedTimestamp String
    The timestamp when the automation rule was last updated.
    name String
    The name of the automation rule.
    organizationConfiguration Property Map
    Organization configuration for organization rules, including rule apply order and account scope.
    priority String
    Rule priority within its group
    recommendedActionTypes List<"SnapshotAndDeleteUnattachedEbsVolume" | "UpgradeEbsVolumeType">
    The types of recommended actions this rule will implement.
    ruleArn String
    The Amazon Resource Name (ARN) of the automation rule.
    ruleId String
    The unique identifier of the automation rule.
    ruleRevision String
    The revision number of the automation rule.
    ruleType "AccountRule" | "OrganizationRule"
    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.
    tags List<Property Map>
    Tags associated with the automation rule.

    Supporting Types

    AutomationRuleCriteria

    EbsVolumeSizeInGib List<Pulumi.AwsNative.ComputeOptimizer.Inputs.AutomationRuleIntegerCriteriaCondition>
    EbsVolumeType List<Pulumi.AwsNative.ComputeOptimizer.Inputs.AutomationRuleStringCriteriaCondition>
    EstimatedMonthlySavings List<Pulumi.AwsNative.ComputeOptimizer.Inputs.AutomationRuleDoubleCriteriaCondition>
    LookBackPeriodInDays List<Pulumi.AwsNative.ComputeOptimizer.Inputs.AutomationRuleIntegerCriteriaCondition>
    Region List<Pulumi.AwsNative.ComputeOptimizer.Inputs.AutomationRuleStringCriteriaCondition>
    ResourceArn List<Pulumi.AwsNative.ComputeOptimizer.Inputs.AutomationRuleStringCriteriaCondition>
    ResourceTag List<Pulumi.AwsNative.ComputeOptimizer.Inputs.AutomationRuleResourceTagsCriteriaCondition>
    RestartNeeded List<Pulumi.AwsNative.ComputeOptimizer.Inputs.AutomationRuleStringCriteriaCondition>

    AutomationRuleDoubleCriteriaCondition

    AutomationRuleDoubleCriteriaConditionComparison

    AutomationRuleIntegerCriteriaCondition

    AutomationRuleIntegerCriteriaConditionComparison

    AutomationRuleOrganizationConfiguration

    AccountIds List<string>
    List of account IDs where the organization rule applies
    RuleApplyOrder Pulumi.AwsNative.ComputeOptimizer.AutomationRuleOrganizationConfigurationRuleApplyOrder
    When the rule should be applied relative to account rules
    AccountIds []string
    List of account IDs where the organization rule applies
    RuleApplyOrder AutomationRuleOrganizationConfigurationRuleApplyOrder
    When the rule should be applied relative to account rules
    accountIds List<String>
    List of account IDs where the organization rule applies
    ruleApplyOrder AutomationRuleOrganizationConfigurationRuleApplyOrder
    When the rule should be applied relative to account rules
    accountIds string[]
    List of account IDs where the organization rule applies
    ruleApplyOrder AutomationRuleOrganizationConfigurationRuleApplyOrder
    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_order AutomationRuleOrganizationConfigurationRuleApplyOrder
    When the rule should be applied relative to account rules
    accountIds List<String>
    List of account IDs where the organization rule applies
    ruleApplyOrder "BeforeAccountRules" | "AfterAccountRules"
    When the rule should be applied relative to account rules

    AutomationRuleOrganizationConfigurationRuleApplyOrder

    AutomationRuleRecommendedActionTypesItem

    AutomationRuleResourceTagsCriteriaCondition

    AutomationRuleResourceTagsCriteriaConditionComparison

    AutomationRuleRuleType

    AutomationRuleSchedule

    ExecutionWindowInMinutes int
    Execution window duration in minutes
    ScheduleExpression string
    Schedule expression (e.g., cron or rate expression)
    ScheduleExpressionTimezone string
    IANA timezone identifier
    ExecutionWindowInMinutes int
    Execution window duration in minutes
    ScheduleExpression string
    Schedule expression (e.g., cron or rate expression)
    ScheduleExpressionTimezone string
    IANA timezone identifier
    executionWindowInMinutes Integer
    Execution window duration in minutes
    scheduleExpression String
    Schedule expression (e.g., cron or rate expression)
    scheduleExpressionTimezone String
    IANA timezone identifier
    executionWindowInMinutes number
    Execution window duration in minutes
    scheduleExpression string
    Schedule expression (e.g., cron or rate expression)
    scheduleExpressionTimezone string
    IANA timezone identifier
    execution_window_in_minutes int
    Execution window duration in minutes
    schedule_expression str
    Schedule expression (e.g., cron or rate expression)
    schedule_expression_timezone str
    IANA timezone identifier
    executionWindowInMinutes Number
    Execution window duration in minutes
    scheduleExpression String
    Schedule expression (e.g., cron or rate expression)
    scheduleExpressionTimezone String
    IANA timezone identifier

    AutomationRuleStatus

    AutomationRuleStringCriteriaCondition

    AutomationRuleStringCriteriaConditionComparison

    Tag

    Key string
    The key name of the tag
    Value string
    The value of the tag
    Key string
    The key name of the tag
    Value string
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag
    key string
    The key name of the tag
    value string
    The value of the tag
    key str
    The key name of the tag
    value str
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    We recommend new projects start with resources from the AWS provider.

    Viewing docs for AWS Cloud Control v1.57.0
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.