Compute Optimizer Automation

2026/06/17 - Compute Optimizer Automation - 5 updated api methods

Changes  This launch adds IfExists comparison operators to Compute Optimizer Automation rule criteria, so a rule can include recommended actions whose specified attribute isn't present.

CreateAutomationRule (updated) Link ¶
Changes (both)
{'criteria': {'ebsVolumeSizeInGib': {'comparison': {'NumericEqualsIfExists',
                                                    'NumericGreaterThanEqualsIfExists',
                                                    'NumericGreaterThanIfExists',
                                                    'NumericLessThanEqualsIfExists',
                                                    'NumericLessThanIfExists',
                                                    'NumericNotEqualsIfExists',
                                                    'StringEqualsIfExists',
                                                    'StringEqualsIgnoreCaseIfExists',
                                                    'StringLikeIfExists',
                                                    'StringNotEqualsIfExists',
                                                    'StringNotEqualsIgnoreCaseIfExists',
                                                    'StringNotLikeIfExists'}},
              'ebsVolumeType': {'comparison': {'NumericEqualsIfExists',
                                               'NumericGreaterThanEqualsIfExists',
                                               'NumericGreaterThanIfExists',
                                               'NumericLessThanEqualsIfExists',
                                               'NumericLessThanIfExists',
                                               'NumericNotEqualsIfExists',
                                               'StringEqualsIfExists',
                                               'StringEqualsIgnoreCaseIfExists',
                                               'StringLikeIfExists',
                                               'StringNotEqualsIfExists',
                                               'StringNotEqualsIgnoreCaseIfExists',
                                               'StringNotLikeIfExists'}},
              'estimatedMonthlySavings': {'comparison': {'NumericEqualsIfExists',
                                                         'NumericGreaterThanEqualsIfExists',
                                                         'NumericGreaterThanIfExists',
                                                         'NumericLessThanEqualsIfExists',
                                                         'NumericLessThanIfExists',
                                                         'NumericNotEqualsIfExists',
                                                         'StringEqualsIfExists',
                                                         'StringEqualsIgnoreCaseIfExists',
                                                         'StringLikeIfExists',
                                                         'StringNotEqualsIfExists',
                                                         'StringNotEqualsIgnoreCaseIfExists',
                                                         'StringNotLikeIfExists'}},
              'lookBackPeriodInDays': {'comparison': {'NumericEqualsIfExists',
                                                      'NumericGreaterThanEqualsIfExists',
                                                      'NumericGreaterThanIfExists',
                                                      'NumericLessThanEqualsIfExists',
                                                      'NumericLessThanIfExists',
                                                      'NumericNotEqualsIfExists',
                                                      'StringEqualsIfExists',
                                                      'StringEqualsIgnoreCaseIfExists',
                                                      'StringLikeIfExists',
                                                      'StringNotEqualsIfExists',
                                                      'StringNotEqualsIgnoreCaseIfExists',
                                                      'StringNotLikeIfExists'}},
              'region': {'comparison': {'NumericEqualsIfExists',
                                        'NumericGreaterThanEqualsIfExists',
                                        'NumericGreaterThanIfExists',
                                        'NumericLessThanEqualsIfExists',
                                        'NumericLessThanIfExists',
                                        'NumericNotEqualsIfExists',
                                        'StringEqualsIfExists',
                                        'StringEqualsIgnoreCaseIfExists',
                                        'StringLikeIfExists',
                                        'StringNotEqualsIfExists',
                                        'StringNotEqualsIgnoreCaseIfExists',
                                        'StringNotLikeIfExists'}},
              'resourceArn': {'comparison': {'NumericEqualsIfExists',
                                             'NumericGreaterThanEqualsIfExists',
                                             'NumericGreaterThanIfExists',
                                             'NumericLessThanEqualsIfExists',
                                             'NumericLessThanIfExists',
                                             'NumericNotEqualsIfExists',
                                             'StringEqualsIfExists',
                                             'StringEqualsIgnoreCaseIfExists',
                                             'StringLikeIfExists',
                                             'StringNotEqualsIfExists',
                                             'StringNotEqualsIgnoreCaseIfExists',
                                             'StringNotLikeIfExists'}},
              'resourceTag': {'comparison': {'NumericEqualsIfExists',
                                             'NumericGreaterThanEqualsIfExists',
                                             'NumericGreaterThanIfExists',
                                             'NumericLessThanEqualsIfExists',
                                             'NumericLessThanIfExists',
                                             'NumericNotEqualsIfExists',
                                             'StringEqualsIfExists',
                                             'StringEqualsIgnoreCaseIfExists',
                                             'StringLikeIfExists',
                                             'StringNotEqualsIfExists',
                                             'StringNotEqualsIgnoreCaseIfExists',
                                             'StringNotLikeIfExists'}},
              'restartNeeded': {'comparison': {'NumericEqualsIfExists',
                                               'NumericGreaterThanEqualsIfExists',
                                               'NumericGreaterThanIfExists',
                                               'NumericLessThanEqualsIfExists',
                                               'NumericLessThanIfExists',
                                               'NumericNotEqualsIfExists',
                                               'StringEqualsIfExists',
                                               'StringEqualsIgnoreCaseIfExists',
                                               'StringLikeIfExists',
                                               'StringNotEqualsIfExists',
                                               'StringNotEqualsIgnoreCaseIfExists',
                                               'StringNotLikeIfExists'}}}}

Creates a new automation rule to apply recommended actions to resources based on specified criteria.

See also: AWS API Documentation

Request Syntax

client.create_automation_rule(
    name='string',
    description='string',
    ruleType='OrganizationRule'|'AccountRule',
    organizationConfiguration={
        'ruleApplyOrder': 'BeforeAccountRules'|'AfterAccountRules',
        'accountIds': [
            'string',
        ]
    },
    priority='string',
    recommendedActionTypes=[
        'SnapshotAndDeleteUnattachedEbsVolume'|'UpgradeEbsVolumeType',
    ],
    criteria={
        'region': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    'string',
                ]
            },
        ],
        'resourceArn': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    'string',
                ]
            },
        ],
        'ebsVolumeType': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    'string',
                ]
            },
        ],
        'ebsVolumeSizeInGib': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    123,
                ]
            },
        ],
        'estimatedMonthlySavings': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    123.0,
                ]
            },
        ],
        'resourceTag': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'key': 'string',
                'values': [
                    'string',
                ]
            },
        ],
        'lookBackPeriodInDays': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    123,
                ]
            },
        ],
        'restartNeeded': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    'string',
                ]
            },
        ]
    },
    schedule={
        'scheduleExpression': 'string',
        'scheduleExpressionTimezone': 'string',
        'executionWindowInMinutes': 123
    },
    status='Active'|'Inactive',
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ],
    clientToken='string'
)
type name:

string

param name:

[REQUIRED]

The name of the automation rule.

type description:

string

param description:

A description of the automation rule.

type ruleType:

string

param ruleType:

[REQUIRED]

The type of rule.

type organizationConfiguration:

dict

param organizationConfiguration:

Configuration for organization-level rules. Required for OrganizationRule type.

  • ruleApplyOrder (string) --

    Specifies when organization rules should be applied relative to account rules.

  • accountIds (list) --

    List of specific Amazon Web Services account IDs where the organization rule should be applied.

    • (string) --

type priority:

string

param 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.

type recommendedActionTypes:

list

param recommendedActionTypes:

[REQUIRED]

The types of recommended actions this rule will automate.

  • (string) --

    Recommended action type enumeration

type criteria:

dict

param 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.

  • region (list) --

    Filter criteria for Amazon Web Services regions where resources must be located.

    • (dict) --

      Criteria condition for filtering based on string values, including comparison operators and target values.

      • comparison (string) --

        The comparison operator used to evaluate the attribute against the specified values.

      • values (list) --

        List of string values to compare against when applying the criteria condition.

        • (string) --

  • resourceArn (list) --

    Filter criteria for specific resource ARNs to include or exclude.

    • (dict) --

      Criteria condition for filtering based on string values, including comparison operators and target values.

      • comparison (string) --

        The comparison operator used to evaluate the attribute against the specified values.

      • values (list) --

        List of string values to compare against when applying the criteria condition.

        • (string) --

  • ebsVolumeType (list) --

    Filter criteria for EBS volume types, such as gp2, gp3, io1, io2, st1, or sc1.

    • (dict) --

      Criteria condition for filtering based on string values, including comparison operators and target values.

      • comparison (string) --

        The comparison operator used to evaluate the attribute against the specified values.

      • values (list) --

        List of string values to compare against when applying the criteria condition.

        • (string) --

  • ebsVolumeSizeInGib (list) --

    Filter criteria for EBS volume sizes in gibibytes (GiB).

    • (dict) --

      Defines a condition for filtering based on integer values with comparison operators.

      • comparison (string) --

        The comparison operator used to evaluate the attribute against the specified values.

      • values (list) --

        The list of integer values to compare against using the specified comparison operator.

        • (integer) --

  • estimatedMonthlySavings (list) --

    Filter criteria for estimated monthly cost savings from the recommended action.

    • (dict) --

      Defines a condition for filtering based on double/floating-point numeric values with comparison operators.

      • comparison (string) --

        The comparison operator used to evaluate the attribute against the specified values.

      • values (list) --

        The list of double values to compare against using the specified comparison operator.

        • (float) --

  • resourceTag (list) --

    Filter criteria for resource tags, allowing filtering by tag key and value combinations.

    • (dict) --

      Criteria condition for filtering resources based on their tags, including comparison operators and values.

      • comparison (string) --

        The comparison operator used to evaluate the attribute against the specified values.

      • key (string) --

        The tag key to use for comparison when filtering resources.

      • values (list) --

        List of tag values to compare against when filtering resources.

        • (string) --

  • lookBackPeriodInDays (list) --

    Filter criteria for the lookback period in days used to analyze resource utilization.

    • (dict) --

      Defines a condition for filtering based on integer values with comparison operators.

      • comparison (string) --

        The comparison operator used to evaluate the attribute against the specified values.

      • values (list) --

        The list of integer values to compare against using the specified comparison operator.

        • (integer) --

  • restartNeeded (list) --

    Filter criteria indicating whether the recommended action requires a resource restart.

    • (dict) --

      Criteria condition for filtering based on string values, including comparison operators and target values.

      • comparison (string) --

        The comparison operator used to evaluate the attribute against the specified values.

      • values (list) --

        List of string values to compare against when applying the criteria condition.

        • (string) --

type schedule:

dict

param schedule:

[REQUIRED]

The schedule for when the rule should run.

  • scheduleExpression (string) --

    The expression that defines when the schedule runs. cron expression is supported. A cron expression consists of six fields separated by white spaces: ( minutes hours day_of_month month day_of_week year)

  • scheduleExpressionTimezone (string) --

    The timezone to use when interpreting the schedule expression.

  • executionWindowInMinutes (integer) --

    The time window in minutes during which the automation rule can start implementing recommended actions.

type status:

string

param status:

[REQUIRED]

The status of the rule

type tags:

list

param tags:

The tags to associate with the rule.

  • (dict) --

    A key-value pair used to categorize and organize Amazon Web Services resources and automation rules.

    • key (string) -- [REQUIRED]

      The tag key, which can be up to 128 characters long.

    • value (string) -- [REQUIRED]

      The tag value, which can be up to 256 characters long.

type clientToken:

string

param clientToken:

A unique identifier to ensure idempotency of the request.

This field is autopopulated if not provided.

rtype:

dict

returns:

Response Syntax

{
    'ruleArn': 'string',
    'ruleId': 'string',
    'name': 'string',
    'description': 'string',
    'ruleType': 'OrganizationRule'|'AccountRule',
    'ruleRevision': 123,
    'organizationConfiguration': {
        'ruleApplyOrder': 'BeforeAccountRules'|'AfterAccountRules',
        'accountIds': [
            'string',
        ]
    },
    'priority': 'string',
    'recommendedActionTypes': [
        'SnapshotAndDeleteUnattachedEbsVolume'|'UpgradeEbsVolumeType',
    ],
    'criteria': {
        'region': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    'string',
                ]
            },
        ],
        'resourceArn': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    'string',
                ]
            },
        ],
        'ebsVolumeType': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    'string',
                ]
            },
        ],
        'ebsVolumeSizeInGib': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    123,
                ]
            },
        ],
        'estimatedMonthlySavings': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    123.0,
                ]
            },
        ],
        'resourceTag': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'key': 'string',
                'values': [
                    'string',
                ]
            },
        ],
        'lookBackPeriodInDays': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    123,
                ]
            },
        ],
        'restartNeeded': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    'string',
                ]
            },
        ]
    },
    'schedule': {
        'scheduleExpression': 'string',
        'scheduleExpressionTimezone': 'string',
        'executionWindowInMinutes': 123
    },
    'status': 'Active'|'Inactive',
    'tags': [
        {
            'key': 'string',
            'value': 'string'
        },
    ],
    'createdTimestamp': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • ruleArn (string) --

      The Amazon Resource Name (ARN) of the created rule.

    • ruleId (string) --

      The unique identifier of the created rule.

    • name (string) --

      The name of the automation rule. Must be 1-128 characters long and contain only alphanumeric characters, underscores, and hyphens.

    • description (string) --

      A description of the automation rule. Can be up to 1024 characters long and contain alphanumeric characters, underscores, hyphens, spaces, and certain special characters.

    • ruleType (string) --

      The type of automation rule. Can be either OrganizationRule for organization-wide rules or AccountRule for account-specific rules.

    • ruleRevision (integer) --

      The revision number of the automation rule. This is incremented each time the rule is updated.

    • organizationConfiguration (dict) --

      Configuration settings for organization-wide rules, including rule application order and target account IDs.

      • ruleApplyOrder (string) --

        Specifies when organization rules should be applied relative to account rules.

      • accountIds (list) --

        List of specific Amazon Web Services account IDs where the organization rule should be applied.

        • (string) --

    • priority (string) --

      The priority level of the automation rule, used to determine execution order when multiple rules apply to the same resource.

    • recommendedActionTypes (list) --

      List of recommended action types that this rule can execute, such as SnapshotAndDeleteUnattachedEbsVolume or UpgradeEbsVolumeType.

      • (string) --

        Recommended action type enumeration

    • criteria (dict) --

      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.

      • region (list) --

        Filter criteria for Amazon Web Services regions where resources must be located.

        • (dict) --

          Criteria condition for filtering based on string values, including comparison operators and target values.

          • comparison (string) --

            The comparison operator used to evaluate the attribute against the specified values.

          • values (list) --

            List of string values to compare against when applying the criteria condition.

            • (string) --

      • resourceArn (list) --

        Filter criteria for specific resource ARNs to include or exclude.

        • (dict) --

          Criteria condition for filtering based on string values, including comparison operators and target values.

          • comparison (string) --

            The comparison operator used to evaluate the attribute against the specified values.

          • values (list) --

            List of string values to compare against when applying the criteria condition.

            • (string) --

      • ebsVolumeType (list) --

        Filter criteria for EBS volume types, such as gp2, gp3, io1, io2, st1, or sc1.

        • (dict) --

          Criteria condition for filtering based on string values, including comparison operators and target values.

          • comparison (string) --

            The comparison operator used to evaluate the attribute against the specified values.

          • values (list) --

            List of string values to compare against when applying the criteria condition.

            • (string) --

      • ebsVolumeSizeInGib (list) --

        Filter criteria for EBS volume sizes in gibibytes (GiB).

        • (dict) --

          Defines a condition for filtering based on integer values with comparison operators.

          • comparison (string) --

            The comparison operator used to evaluate the attribute against the specified values.

          • values (list) --

            The list of integer values to compare against using the specified comparison operator.

            • (integer) --

      • estimatedMonthlySavings (list) --

        Filter criteria for estimated monthly cost savings from the recommended action.

        • (dict) --

          Defines a condition for filtering based on double/floating-point numeric values with comparison operators.

          • comparison (string) --

            The comparison operator used to evaluate the attribute against the specified values.

          • values (list) --

            The list of double values to compare against using the specified comparison operator.

            • (float) --

      • resourceTag (list) --

        Filter criteria for resource tags, allowing filtering by tag key and value combinations.

        • (dict) --

          Criteria condition for filtering resources based on their tags, including comparison operators and values.

          • comparison (string) --

            The comparison operator used to evaluate the attribute against the specified values.

          • key (string) --

            The tag key to use for comparison when filtering resources.

          • values (list) --

            List of tag values to compare against when filtering resources.

            • (string) --

      • lookBackPeriodInDays (list) --

        Filter criteria for the lookback period in days used to analyze resource utilization.

        • (dict) --

          Defines a condition for filtering based on integer values with comparison operators.

          • comparison (string) --

            The comparison operator used to evaluate the attribute against the specified values.

          • values (list) --

            The list of integer values to compare against using the specified comparison operator.

            • (integer) --

      • restartNeeded (list) --

        Filter criteria indicating whether the recommended action requires a resource restart.

        • (dict) --

          Criteria condition for filtering based on string values, including comparison operators and target values.

          • comparison (string) --

            The comparison operator used to evaluate the attribute against the specified values.

          • values (list) --

            List of string values to compare against when applying the criteria condition.

            • (string) --

    • schedule (dict) --

      The schedule configuration for when the automation rule should execute, including cron expression, timezone, and execution window.

      • scheduleExpression (string) --

        The expression that defines when the schedule runs. cron expression is supported. A cron expression consists of six fields separated by white spaces: ( minutes hours day_of_month month day_of_week year)

      • scheduleExpressionTimezone (string) --

        The timezone to use when interpreting the schedule expression.

      • executionWindowInMinutes (integer) --

        The time window in minutes during which the automation rule can start implementing recommended actions.

    • status (string) --

      The current status of the automation rule. Can be Active or Inactive.

    • tags (list) --

      A list of key-value pairs used to categorize and organize the automation rule. Maximum of 200 tags allowed.

      • (dict) --

        A key-value pair used to categorize and organize Amazon Web Services resources and automation rules.

        • key (string) --

          The tag key, which can be up to 128 characters long.

        • value (string) --

          The tag value, which can be up to 256 characters long.

    • createdTimestamp (datetime) --

      The timestamp when the automation rule was created.

GetAutomationRule (updated) Link ¶
Changes (response)
{'criteria': {'ebsVolumeSizeInGib': {'comparison': {'NumericEqualsIfExists',
                                                    'NumericGreaterThanEqualsIfExists',
                                                    'NumericGreaterThanIfExists',
                                                    'NumericLessThanEqualsIfExists',
                                                    'NumericLessThanIfExists',
                                                    'NumericNotEqualsIfExists',
                                                    'StringEqualsIfExists',
                                                    'StringEqualsIgnoreCaseIfExists',
                                                    'StringLikeIfExists',
                                                    'StringNotEqualsIfExists',
                                                    'StringNotEqualsIgnoreCaseIfExists',
                                                    'StringNotLikeIfExists'}},
              'ebsVolumeType': {'comparison': {'NumericEqualsIfExists',
                                               'NumericGreaterThanEqualsIfExists',
                                               'NumericGreaterThanIfExists',
                                               'NumericLessThanEqualsIfExists',
                                               'NumericLessThanIfExists',
                                               'NumericNotEqualsIfExists',
                                               'StringEqualsIfExists',
                                               'StringEqualsIgnoreCaseIfExists',
                                               'StringLikeIfExists',
                                               'StringNotEqualsIfExists',
                                               'StringNotEqualsIgnoreCaseIfExists',
                                               'StringNotLikeIfExists'}},
              'estimatedMonthlySavings': {'comparison': {'NumericEqualsIfExists',
                                                         'NumericGreaterThanEqualsIfExists',
                                                         'NumericGreaterThanIfExists',
                                                         'NumericLessThanEqualsIfExists',
                                                         'NumericLessThanIfExists',
                                                         'NumericNotEqualsIfExists',
                                                         'StringEqualsIfExists',
                                                         'StringEqualsIgnoreCaseIfExists',
                                                         'StringLikeIfExists',
                                                         'StringNotEqualsIfExists',
                                                         'StringNotEqualsIgnoreCaseIfExists',
                                                         'StringNotLikeIfExists'}},
              'lookBackPeriodInDays': {'comparison': {'NumericEqualsIfExists',
                                                      'NumericGreaterThanEqualsIfExists',
                                                      'NumericGreaterThanIfExists',
                                                      'NumericLessThanEqualsIfExists',
                                                      'NumericLessThanIfExists',
                                                      'NumericNotEqualsIfExists',
                                                      'StringEqualsIfExists',
                                                      'StringEqualsIgnoreCaseIfExists',
                                                      'StringLikeIfExists',
                                                      'StringNotEqualsIfExists',
                                                      'StringNotEqualsIgnoreCaseIfExists',
                                                      'StringNotLikeIfExists'}},
              'region': {'comparison': {'NumericEqualsIfExists',
                                        'NumericGreaterThanEqualsIfExists',
                                        'NumericGreaterThanIfExists',
                                        'NumericLessThanEqualsIfExists',
                                        'NumericLessThanIfExists',
                                        'NumericNotEqualsIfExists',
                                        'StringEqualsIfExists',
                                        'StringEqualsIgnoreCaseIfExists',
                                        'StringLikeIfExists',
                                        'StringNotEqualsIfExists',
                                        'StringNotEqualsIgnoreCaseIfExists',
                                        'StringNotLikeIfExists'}},
              'resourceArn': {'comparison': {'NumericEqualsIfExists',
                                             'NumericGreaterThanEqualsIfExists',
                                             'NumericGreaterThanIfExists',
                                             'NumericLessThanEqualsIfExists',
                                             'NumericLessThanIfExists',
                                             'NumericNotEqualsIfExists',
                                             'StringEqualsIfExists',
                                             'StringEqualsIgnoreCaseIfExists',
                                             'StringLikeIfExists',
                                             'StringNotEqualsIfExists',
                                             'StringNotEqualsIgnoreCaseIfExists',
                                             'StringNotLikeIfExists'}},
              'resourceTag': {'comparison': {'NumericEqualsIfExists',
                                             'NumericGreaterThanEqualsIfExists',
                                             'NumericGreaterThanIfExists',
                                             'NumericLessThanEqualsIfExists',
                                             'NumericLessThanIfExists',
                                             'NumericNotEqualsIfExists',
                                             'StringEqualsIfExists',
                                             'StringEqualsIgnoreCaseIfExists',
                                             'StringLikeIfExists',
                                             'StringNotEqualsIfExists',
                                             'StringNotEqualsIgnoreCaseIfExists',
                                             'StringNotLikeIfExists'}},
              'restartNeeded': {'comparison': {'NumericEqualsIfExists',
                                               'NumericGreaterThanEqualsIfExists',
                                               'NumericGreaterThanIfExists',
                                               'NumericLessThanEqualsIfExists',
                                               'NumericLessThanIfExists',
                                               'NumericNotEqualsIfExists',
                                               'StringEqualsIfExists',
                                               'StringEqualsIgnoreCaseIfExists',
                                               'StringLikeIfExists',
                                               'StringNotEqualsIfExists',
                                               'StringNotEqualsIgnoreCaseIfExists',
                                               'StringNotLikeIfExists'}}}}

Retrieves details about a specific automation rule.

See also: AWS API Documentation

Request Syntax

client.get_automation_rule(
    ruleArn='string'
)
type ruleArn:

string

param ruleArn:

[REQUIRED]

The ARN of the rule to retrieve.

rtype:

dict

returns:

Response Syntax

{
    'ruleArn': 'string',
    'ruleId': 'string',
    'name': 'string',
    'description': 'string',
    'ruleType': 'OrganizationRule'|'AccountRule',
    'ruleRevision': 123,
    'accountId': 'string',
    'organizationConfiguration': {
        'ruleApplyOrder': 'BeforeAccountRules'|'AfterAccountRules',
        'accountIds': [
            'string',
        ]
    },
    'priority': 'string',
    'recommendedActionTypes': [
        'SnapshotAndDeleteUnattachedEbsVolume'|'UpgradeEbsVolumeType',
    ],
    'criteria': {
        'region': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    'string',
                ]
            },
        ],
        'resourceArn': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    'string',
                ]
            },
        ],
        'ebsVolumeType': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    'string',
                ]
            },
        ],
        'ebsVolumeSizeInGib': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    123,
                ]
            },
        ],
        'estimatedMonthlySavings': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    123.0,
                ]
            },
        ],
        'resourceTag': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'key': 'string',
                'values': [
                    'string',
                ]
            },
        ],
        'lookBackPeriodInDays': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    123,
                ]
            },
        ],
        'restartNeeded': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    'string',
                ]
            },
        ]
    },
    'schedule': {
        'scheduleExpression': 'string',
        'scheduleExpressionTimezone': 'string',
        'executionWindowInMinutes': 123
    },
    'status': 'Active'|'Inactive',
    'tags': [
        {
            'key': 'string',
            'value': 'string'
        },
    ],
    'createdTimestamp': datetime(2015, 1, 1),
    'lastUpdatedTimestamp': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • ruleArn (string) --

      The Amazon Resource Name (ARN) of the automation rule.

    • ruleId (string) --

      The unique identifier of the automation rule.

    • name (string) --

      The name of the automation rule.

    • description (string) --

      A description of the automation rule.

    • ruleType (string) --

      The type of automation rule.

    • ruleRevision (integer) --

      The revision number of the automation rule.

    • accountId (string) --

      The 12-digit Amazon Web Services account ID that owns this automation rule.

    • organizationConfiguration (dict) --

      Configuration settings for organization-wide automation rules.

      • ruleApplyOrder (string) --

        Specifies when organization rules should be applied relative to account rules.

      • accountIds (list) --

        List of specific Amazon Web Services account IDs where the organization rule should be applied.

        • (string) --

    • priority (string) --

      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.

    • recommendedActionTypes (list) --

      List of recommended action types that this rule can execute.

      • (string) --

        Recommended action type enumeration

    • criteria (dict) --

      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.

      • region (list) --

        Filter criteria for Amazon Web Services regions where resources must be located.

        • (dict) --

          Criteria condition for filtering based on string values, including comparison operators and target values.

          • comparison (string) --

            The comparison operator used to evaluate the attribute against the specified values.

          • values (list) --

            List of string values to compare against when applying the criteria condition.

            • (string) --

      • resourceArn (list) --

        Filter criteria for specific resource ARNs to include or exclude.

        • (dict) --

          Criteria condition for filtering based on string values, including comparison operators and target values.

          • comparison (string) --

            The comparison operator used to evaluate the attribute against the specified values.

          • values (list) --

            List of string values to compare against when applying the criteria condition.

            • (string) --

      • ebsVolumeType (list) --

        Filter criteria for EBS volume types, such as gp2, gp3, io1, io2, st1, or sc1.

        • (dict) --

          Criteria condition for filtering based on string values, including comparison operators and target values.

          • comparison (string) --

            The comparison operator used to evaluate the attribute against the specified values.

          • values (list) --

            List of string values to compare against when applying the criteria condition.

            • (string) --

      • ebsVolumeSizeInGib (list) --

        Filter criteria for EBS volume sizes in gibibytes (GiB).

        • (dict) --

          Defines a condition for filtering based on integer values with comparison operators.

          • comparison (string) --

            The comparison operator used to evaluate the attribute against the specified values.

          • values (list) --

            The list of integer values to compare against using the specified comparison operator.

            • (integer) --

      • estimatedMonthlySavings (list) --

        Filter criteria for estimated monthly cost savings from the recommended action.

        • (dict) --

          Defines a condition for filtering based on double/floating-point numeric values with comparison operators.

          • comparison (string) --

            The comparison operator used to evaluate the attribute against the specified values.

          • values (list) --

            The list of double values to compare against using the specified comparison operator.

            • (float) --

      • resourceTag (list) --

        Filter criteria for resource tags, allowing filtering by tag key and value combinations.

        • (dict) --

          Criteria condition for filtering resources based on their tags, including comparison operators and values.

          • comparison (string) --

            The comparison operator used to evaluate the attribute against the specified values.

          • key (string) --

            The tag key to use for comparison when filtering resources.

          • values (list) --

            List of tag values to compare against when filtering resources.

            • (string) --

      • lookBackPeriodInDays (list) --

        Filter criteria for the lookback period in days used to analyze resource utilization.

        • (dict) --

          Defines a condition for filtering based on integer values with comparison operators.

          • comparison (string) --

            The comparison operator used to evaluate the attribute against the specified values.

          • values (list) --

            The list of integer values to compare against using the specified comparison operator.

            • (integer) --

      • restartNeeded (list) --

        Filter criteria indicating whether the recommended action requires a resource restart.

        • (dict) --

          Criteria condition for filtering based on string values, including comparison operators and target values.

          • comparison (string) --

            The comparison operator used to evaluate the attribute against the specified values.

          • values (list) --

            List of string values to compare against when applying the criteria condition.

            • (string) --

    • schedule (dict) --

      Configuration for scheduling when automation rules should execute, including timing and execution windows.

      • scheduleExpression (string) --

        The expression that defines when the schedule runs. cron expression is supported. A cron expression consists of six fields separated by white spaces: ( minutes hours day_of_month month day_of_week year)

      • scheduleExpressionTimezone (string) --

        The timezone to use when interpreting the schedule expression.

      • executionWindowInMinutes (integer) --

        The time window in minutes during which the automation rule can start implementing recommended actions.

    • status (string) --

      The current status of the automation rule (Active or Inactive).

    • tags (list) --

      The tags associated with the automation rule.

      • (dict) --

        A key-value pair used to categorize and organize Amazon Web Services resources and automation rules.

        • key (string) --

          The tag key, which can be up to 128 characters long.

        • value (string) --

          The tag value, which can be up to 256 characters long.

    • createdTimestamp (datetime) --

      The timestamp when the automation rule was created.

    • lastUpdatedTimestamp (datetime) --

      The timestamp when the automation rule was last updated.

ListAutomationRulePreview (updated) Link ¶
Changes (request)
{'criteria': {'ebsVolumeSizeInGib': {'comparison': {'NumericEqualsIfExists',
                                                    'NumericGreaterThanEqualsIfExists',
                                                    'NumericGreaterThanIfExists',
                                                    'NumericLessThanEqualsIfExists',
                                                    'NumericLessThanIfExists',
                                                    'NumericNotEqualsIfExists',
                                                    'StringEqualsIfExists',
                                                    'StringEqualsIgnoreCaseIfExists',
                                                    'StringLikeIfExists',
                                                    'StringNotEqualsIfExists',
                                                    'StringNotEqualsIgnoreCaseIfExists',
                                                    'StringNotLikeIfExists'}},
              'ebsVolumeType': {'comparison': {'NumericEqualsIfExists',
                                               'NumericGreaterThanEqualsIfExists',
                                               'NumericGreaterThanIfExists',
                                               'NumericLessThanEqualsIfExists',
                                               'NumericLessThanIfExists',
                                               'NumericNotEqualsIfExists',
                                               'StringEqualsIfExists',
                                               'StringEqualsIgnoreCaseIfExists',
                                               'StringLikeIfExists',
                                               'StringNotEqualsIfExists',
                                               'StringNotEqualsIgnoreCaseIfExists',
                                               'StringNotLikeIfExists'}},
              'estimatedMonthlySavings': {'comparison': {'NumericEqualsIfExists',
                                                         'NumericGreaterThanEqualsIfExists',
                                                         'NumericGreaterThanIfExists',
                                                         'NumericLessThanEqualsIfExists',
                                                         'NumericLessThanIfExists',
                                                         'NumericNotEqualsIfExists',
                                                         'StringEqualsIfExists',
                                                         'StringEqualsIgnoreCaseIfExists',
                                                         'StringLikeIfExists',
                                                         'StringNotEqualsIfExists',
                                                         'StringNotEqualsIgnoreCaseIfExists',
                                                         'StringNotLikeIfExists'}},
              'lookBackPeriodInDays': {'comparison': {'NumericEqualsIfExists',
                                                      'NumericGreaterThanEqualsIfExists',
                                                      'NumericGreaterThanIfExists',
                                                      'NumericLessThanEqualsIfExists',
                                                      'NumericLessThanIfExists',
                                                      'NumericNotEqualsIfExists',
                                                      'StringEqualsIfExists',
                                                      'StringEqualsIgnoreCaseIfExists',
                                                      'StringLikeIfExists',
                                                      'StringNotEqualsIfExists',
                                                      'StringNotEqualsIgnoreCaseIfExists',
                                                      'StringNotLikeIfExists'}},
              'region': {'comparison': {'NumericEqualsIfExists',
                                        'NumericGreaterThanEqualsIfExists',
                                        'NumericGreaterThanIfExists',
                                        'NumericLessThanEqualsIfExists',
                                        'NumericLessThanIfExists',
                                        'NumericNotEqualsIfExists',
                                        'StringEqualsIfExists',
                                        'StringEqualsIgnoreCaseIfExists',
                                        'StringLikeIfExists',
                                        'StringNotEqualsIfExists',
                                        'StringNotEqualsIgnoreCaseIfExists',
                                        'StringNotLikeIfExists'}},
              'resourceArn': {'comparison': {'NumericEqualsIfExists',
                                             'NumericGreaterThanEqualsIfExists',
                                             'NumericGreaterThanIfExists',
                                             'NumericLessThanEqualsIfExists',
                                             'NumericLessThanIfExists',
                                             'NumericNotEqualsIfExists',
                                             'StringEqualsIfExists',
                                             'StringEqualsIgnoreCaseIfExists',
                                             'StringLikeIfExists',
                                             'StringNotEqualsIfExists',
                                             'StringNotEqualsIgnoreCaseIfExists',
                                             'StringNotLikeIfExists'}},
              'resourceTag': {'comparison': {'NumericEqualsIfExists',
                                             'NumericGreaterThanEqualsIfExists',
                                             'NumericGreaterThanIfExists',
                                             'NumericLessThanEqualsIfExists',
                                             'NumericLessThanIfExists',
                                             'NumericNotEqualsIfExists',
                                             'StringEqualsIfExists',
                                             'StringEqualsIgnoreCaseIfExists',
                                             'StringLikeIfExists',
                                             'StringNotEqualsIfExists',
                                             'StringNotEqualsIgnoreCaseIfExists',
                                             'StringNotLikeIfExists'}},
              'restartNeeded': {'comparison': {'NumericEqualsIfExists',
                                               'NumericGreaterThanEqualsIfExists',
                                               'NumericGreaterThanIfExists',
                                               'NumericLessThanEqualsIfExists',
                                               'NumericLessThanIfExists',
                                               'NumericNotEqualsIfExists',
                                               'StringEqualsIfExists',
                                               'StringEqualsIgnoreCaseIfExists',
                                               'StringLikeIfExists',
                                               'StringNotEqualsIfExists',
                                               'StringNotEqualsIgnoreCaseIfExists',
                                               'StringNotLikeIfExists'}}}}

Returns a preview of the recommended actions that match your Automation rule's configuration and criteria.

See also: AWS API Documentation

Request Syntax

client.list_automation_rule_preview(
    ruleType='OrganizationRule'|'AccountRule',
    organizationScope={
        'accountIds': [
            'string',
        ]
    },
    recommendedActionTypes=[
        'SnapshotAndDeleteUnattachedEbsVolume'|'UpgradeEbsVolumeType',
    ],
    criteria={
        'region': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    'string',
                ]
            },
        ],
        'resourceArn': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    'string',
                ]
            },
        ],
        'ebsVolumeType': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    'string',
                ]
            },
        ],
        'ebsVolumeSizeInGib': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    123,
                ]
            },
        ],
        'estimatedMonthlySavings': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    123.0,
                ]
            },
        ],
        'resourceTag': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'key': 'string',
                'values': [
                    'string',
                ]
            },
        ],
        'lookBackPeriodInDays': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    123,
                ]
            },
        ],
        'restartNeeded': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    'string',
                ]
            },
        ]
    },
    maxResults=123,
    nextToken='string'
)
type ruleType:

string

param ruleType:

[REQUIRED]

The type of rule.

type organizationScope:

dict

param organizationScope:

The organizational scope for the rule preview.

  • accountIds (list) --

    List of Amazon Web Services account IDs to include in the organization scope.

    • (string) --

type recommendedActionTypes:

list

param recommendedActionTypes:

[REQUIRED]

The types of recommended actions to include in the preview.

  • (string) --

    Recommended action type enumeration

type criteria:

dict

param 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.

  • region (list) --

    Filter criteria for Amazon Web Services regions where resources must be located.

    • (dict) --

      Criteria condition for filtering based on string values, including comparison operators and target values.

      • comparison (string) --

        The comparison operator used to evaluate the attribute against the specified values.

      • values (list) --

        List of string values to compare against when applying the criteria condition.

        • (string) --

  • resourceArn (list) --

    Filter criteria for specific resource ARNs to include or exclude.

    • (dict) --

      Criteria condition for filtering based on string values, including comparison operators and target values.

      • comparison (string) --

        The comparison operator used to evaluate the attribute against the specified values.

      • values (list) --

        List of string values to compare against when applying the criteria condition.

        • (string) --

  • ebsVolumeType (list) --

    Filter criteria for EBS volume types, such as gp2, gp3, io1, io2, st1, or sc1.

    • (dict) --

      Criteria condition for filtering based on string values, including comparison operators and target values.

      • comparison (string) --

        The comparison operator used to evaluate the attribute against the specified values.

      • values (list) --

        List of string values to compare against when applying the criteria condition.

        • (string) --

  • ebsVolumeSizeInGib (list) --

    Filter criteria for EBS volume sizes in gibibytes (GiB).

    • (dict) --

      Defines a condition for filtering based on integer values with comparison operators.

      • comparison (string) --

        The comparison operator used to evaluate the attribute against the specified values.

      • values (list) --

        The list of integer values to compare against using the specified comparison operator.

        • (integer) --

  • estimatedMonthlySavings (list) --

    Filter criteria for estimated monthly cost savings from the recommended action.

    • (dict) --

      Defines a condition for filtering based on double/floating-point numeric values with comparison operators.

      • comparison (string) --

        The comparison operator used to evaluate the attribute against the specified values.

      • values (list) --

        The list of double values to compare against using the specified comparison operator.

        • (float) --

  • resourceTag (list) --

    Filter criteria for resource tags, allowing filtering by tag key and value combinations.

    • (dict) --

      Criteria condition for filtering resources based on their tags, including comparison operators and values.

      • comparison (string) --

        The comparison operator used to evaluate the attribute against the specified values.

      • key (string) --

        The tag key to use for comparison when filtering resources.

      • values (list) --

        List of tag values to compare against when filtering resources.

        • (string) --

  • lookBackPeriodInDays (list) --

    Filter criteria for the lookback period in days used to analyze resource utilization.

    • (dict) --

      Defines a condition for filtering based on integer values with comparison operators.

      • comparison (string) --

        The comparison operator used to evaluate the attribute against the specified values.

      • values (list) --

        The list of integer values to compare against using the specified comparison operator.

        • (integer) --

  • restartNeeded (list) --

    Filter criteria indicating whether the recommended action requires a resource restart.

    • (dict) --

      Criteria condition for filtering based on string values, including comparison operators and target values.

      • comparison (string) --

        The comparison operator used to evaluate the attribute against the specified values.

      • values (list) --

        List of string values to compare against when applying the criteria condition.

        • (string) --

type maxResults:

integer

param maxResults:

The maximum number of automation rule preview results to return in a single response. Valid range is 1-1000.

type nextToken:

string

param nextToken:

A token used for pagination to retrieve the next set of results when the response is truncated.

rtype:

dict

returns:

Response Syntax

{
    'previewResults': [
        {
            'recommendedActionId': 'string',
            'resourceArn': 'string',
            'resourceId': 'string',
            'accountId': 'string',
            'region': 'string',
            'resourceType': 'EbsVolume',
            'lookBackPeriodInDays': 123,
            'recommendedActionType': 'SnapshotAndDeleteUnattachedEbsVolume'|'UpgradeEbsVolumeType',
            'currentResourceSummary': 'string',
            'currentResourceDetails': {
                'ebsVolume': {
                    'configuration': {
                        'type': 'string',
                        'sizeInGib': 123,
                        'iops': 123,
                        'throughput': 123
                    }
                }
            },
            'recommendedResourceSummary': 'string',
            'recommendedResourceDetails': {
                'ebsVolume': {
                    'configuration': {
                        'type': 'string',
                        'sizeInGib': 123,
                        'iops': 123,
                        'throughput': 123
                    }
                }
            },
            'restartNeeded': True|False,
            'estimatedMonthlySavings': {
                'currency': 'string',
                'beforeDiscountSavings': 123.0,
                'afterDiscountSavings': 123.0,
                'savingsEstimationMode': 'BeforeDiscount'|'AfterDiscount'
            },
            'resourceTags': [
                {
                    'key': 'string',
                    'value': 'string'
                },
            ]
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • previewResults (list) --

      The list of actions that would be taken based on the specified criteria.

      • (dict) --

        Contains the results of previewing an automation rule against available recommendations.

        • recommendedActionId (string) --

          The ID of the recommended action being previewed.

        • resourceArn (string) --

          The Amazon Resource Name (ARN) of the resource affected by the recommended action.

        • resourceId (string) --

          The ID of the resource affected by the recommended action.

        • accountId (string) --

          The Amazon Web Services account ID associated with the resource.

        • region (string) --

          The Amazon Web Services Region where the resource is located.

        • resourceType (string) --

          The type of resource being evaluated.

        • lookBackPeriodInDays (integer) --

          The number of days of historical data used to analyze the resource.

        • recommendedActionType (string) --

          The type of recommended action being previewed.

        • currentResourceSummary (string) --

          A summary of the resource's current configuration.

        • currentResourceDetails (dict) --

          Detailed configuration information for a specific Amazon Web Services resource, with type-specific details.

          • ebsVolume (dict) --

            Detailed configuration information specific to EBS volumes, including volume type, size, IOPS, and throughput settings.

            • configuration (dict) --

              The configuration details of the EBS volume, including type, size, IOPS, and throughput.

              • type (string) --

                The EBS volume type, such as gp2, gp3, io1, io2, st1, or sc1.

              • sizeInGib (integer) --

                The size of the EBS volume in gibibytes (GiB).

              • iops (integer) --

                The number of I/O operations per second (IOPS) provisioned for the volume.

              • throughput (integer) --

                The throughput in MiB/s provisioned for the volume (applicable to gp3, io1, and io2bx volumes).

        • recommendedResourceSummary (string) --

          A summary of the resource's recommended configuration.

        • recommendedResourceDetails (dict) --

          Detailed configuration information for a specific Amazon Web Services resource, with type-specific details.

          • ebsVolume (dict) --

            Detailed configuration information specific to EBS volumes, including volume type, size, IOPS, and throughput settings.

            • configuration (dict) --

              The configuration details of the EBS volume, including type, size, IOPS, and throughput.

              • type (string) --

                The EBS volume type, such as gp2, gp3, io1, io2, st1, or sc1.

              • sizeInGib (integer) --

                The size of the EBS volume in gibibytes (GiB).

              • iops (integer) --

                The number of I/O operations per second (IOPS) provisioned for the volume.

              • throughput (integer) --

                The throughput in MiB/s provisioned for the volume (applicable to gp3, io1, and io2bx volumes).

        • restartNeeded (boolean) --

          Indicates whether implementing the recommended action requires a resource restart.

        • estimatedMonthlySavings (dict) --

          Contains information about estimated monthly cost savings.

          • currency (string) --

            The currency of the estimated savings.

          • beforeDiscountSavings (float) --

            The estimated monthly savings before applying any discounts.

          • afterDiscountSavings (float) --

            The estimated monthly savings after applying any discounts.

          • savingsEstimationMode (string) --

            The mode used to calculate savings, either BeforeDiscount or AfterDiscount.

        • resourceTags (list) --

          The tags associated with the resource.

          • (dict) --

            A key-value pair used to categorize and organize Amazon Web Services resources and automation rules.

            • key (string) --

              The tag key, which can be up to 128 characters long.

            • value (string) --

              The tag value, which can be up to 256 characters long.

    • nextToken (string) --

      A token used for pagination. If present, indicates there are more results available and can be used in subsequent requests.

ListAutomationRulePreviewSummaries (updated) Link ¶
Changes (request)
{'criteria': {'ebsVolumeSizeInGib': {'comparison': {'NumericEqualsIfExists',
                                                    'NumericGreaterThanEqualsIfExists',
                                                    'NumericGreaterThanIfExists',
                                                    'NumericLessThanEqualsIfExists',
                                                    'NumericLessThanIfExists',
                                                    'NumericNotEqualsIfExists',
                                                    'StringEqualsIfExists',
                                                    'StringEqualsIgnoreCaseIfExists',
                                                    'StringLikeIfExists',
                                                    'StringNotEqualsIfExists',
                                                    'StringNotEqualsIgnoreCaseIfExists',
                                                    'StringNotLikeIfExists'}},
              'ebsVolumeType': {'comparison': {'NumericEqualsIfExists',
                                               'NumericGreaterThanEqualsIfExists',
                                               'NumericGreaterThanIfExists',
                                               'NumericLessThanEqualsIfExists',
                                               'NumericLessThanIfExists',
                                               'NumericNotEqualsIfExists',
                                               'StringEqualsIfExists',
                                               'StringEqualsIgnoreCaseIfExists',
                                               'StringLikeIfExists',
                                               'StringNotEqualsIfExists',
                                               'StringNotEqualsIgnoreCaseIfExists',
                                               'StringNotLikeIfExists'}},
              'estimatedMonthlySavings': {'comparison': {'NumericEqualsIfExists',
                                                         'NumericGreaterThanEqualsIfExists',
                                                         'NumericGreaterThanIfExists',
                                                         'NumericLessThanEqualsIfExists',
                                                         'NumericLessThanIfExists',
                                                         'NumericNotEqualsIfExists',
                                                         'StringEqualsIfExists',
                                                         'StringEqualsIgnoreCaseIfExists',
                                                         'StringLikeIfExists',
                                                         'StringNotEqualsIfExists',
                                                         'StringNotEqualsIgnoreCaseIfExists',
                                                         'StringNotLikeIfExists'}},
              'lookBackPeriodInDays': {'comparison': {'NumericEqualsIfExists',
                                                      'NumericGreaterThanEqualsIfExists',
                                                      'NumericGreaterThanIfExists',
                                                      'NumericLessThanEqualsIfExists',
                                                      'NumericLessThanIfExists',
                                                      'NumericNotEqualsIfExists',
                                                      'StringEqualsIfExists',
                                                      'StringEqualsIgnoreCaseIfExists',
                                                      'StringLikeIfExists',
                                                      'StringNotEqualsIfExists',
                                                      'StringNotEqualsIgnoreCaseIfExists',
                                                      'StringNotLikeIfExists'}},
              'region': {'comparison': {'NumericEqualsIfExists',
                                        'NumericGreaterThanEqualsIfExists',
                                        'NumericGreaterThanIfExists',
                                        'NumericLessThanEqualsIfExists',
                                        'NumericLessThanIfExists',
                                        'NumericNotEqualsIfExists',
                                        'StringEqualsIfExists',
                                        'StringEqualsIgnoreCaseIfExists',
                                        'StringLikeIfExists',
                                        'StringNotEqualsIfExists',
                                        'StringNotEqualsIgnoreCaseIfExists',
                                        'StringNotLikeIfExists'}},
              'resourceArn': {'comparison': {'NumericEqualsIfExists',
                                             'NumericGreaterThanEqualsIfExists',
                                             'NumericGreaterThanIfExists',
                                             'NumericLessThanEqualsIfExists',
                                             'NumericLessThanIfExists',
                                             'NumericNotEqualsIfExists',
                                             'StringEqualsIfExists',
                                             'StringEqualsIgnoreCaseIfExists',
                                             'StringLikeIfExists',
                                             'StringNotEqualsIfExists',
                                             'StringNotEqualsIgnoreCaseIfExists',
                                             'StringNotLikeIfExists'}},
              'resourceTag': {'comparison': {'NumericEqualsIfExists',
                                             'NumericGreaterThanEqualsIfExists',
                                             'NumericGreaterThanIfExists',
                                             'NumericLessThanEqualsIfExists',
                                             'NumericLessThanIfExists',
                                             'NumericNotEqualsIfExists',
                                             'StringEqualsIfExists',
                                             'StringEqualsIgnoreCaseIfExists',
                                             'StringLikeIfExists',
                                             'StringNotEqualsIfExists',
                                             'StringNotEqualsIgnoreCaseIfExists',
                                             'StringNotLikeIfExists'}},
              'restartNeeded': {'comparison': {'NumericEqualsIfExists',
                                               'NumericGreaterThanEqualsIfExists',
                                               'NumericGreaterThanIfExists',
                                               'NumericLessThanEqualsIfExists',
                                               'NumericLessThanIfExists',
                                               'NumericNotEqualsIfExists',
                                               'StringEqualsIfExists',
                                               'StringEqualsIgnoreCaseIfExists',
                                               'StringLikeIfExists',
                                               'StringNotEqualsIfExists',
                                               'StringNotEqualsIgnoreCaseIfExists',
                                               'StringNotLikeIfExists'}}}}

Returns a summary of the recommended actions that match your rule preview configuration and criteria.

See also: AWS API Documentation

Request Syntax

client.list_automation_rule_preview_summaries(
    ruleType='OrganizationRule'|'AccountRule',
    organizationScope={
        'accountIds': [
            'string',
        ]
    },
    recommendedActionTypes=[
        'SnapshotAndDeleteUnattachedEbsVolume'|'UpgradeEbsVolumeType',
    ],
    criteria={
        'region': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    'string',
                ]
            },
        ],
        'resourceArn': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    'string',
                ]
            },
        ],
        'ebsVolumeType': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    'string',
                ]
            },
        ],
        'ebsVolumeSizeInGib': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    123,
                ]
            },
        ],
        'estimatedMonthlySavings': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    123.0,
                ]
            },
        ],
        'resourceTag': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'key': 'string',
                'values': [
                    'string',
                ]
            },
        ],
        'lookBackPeriodInDays': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    123,
                ]
            },
        ],
        'restartNeeded': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    'string',
                ]
            },
        ]
    },
    maxResults=123,
    nextToken='string'
)
type ruleType:

string

param ruleType:

[REQUIRED]

The type of rule.

type organizationScope:

dict

param organizationScope:

The organizational scope for the rule preview.

  • accountIds (list) --

    List of Amazon Web Services account IDs to include in the organization scope.

    • (string) --

type recommendedActionTypes:

list

param recommendedActionTypes:

[REQUIRED]

The types of recommended actions to include in the preview.

  • (string) --

    Recommended action type enumeration

type criteria:

dict

param 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.

  • region (list) --

    Filter criteria for Amazon Web Services regions where resources must be located.

    • (dict) --

      Criteria condition for filtering based on string values, including comparison operators and target values.

      • comparison (string) --

        The comparison operator used to evaluate the attribute against the specified values.

      • values (list) --

        List of string values to compare against when applying the criteria condition.

        • (string) --

  • resourceArn (list) --

    Filter criteria for specific resource ARNs to include or exclude.

    • (dict) --

      Criteria condition for filtering based on string values, including comparison operators and target values.

      • comparison (string) --

        The comparison operator used to evaluate the attribute against the specified values.

      • values (list) --

        List of string values to compare against when applying the criteria condition.

        • (string) --

  • ebsVolumeType (list) --

    Filter criteria for EBS volume types, such as gp2, gp3, io1, io2, st1, or sc1.

    • (dict) --

      Criteria condition for filtering based on string values, including comparison operators and target values.

      • comparison (string) --

        The comparison operator used to evaluate the attribute against the specified values.

      • values (list) --

        List of string values to compare against when applying the criteria condition.

        • (string) --

  • ebsVolumeSizeInGib (list) --

    Filter criteria for EBS volume sizes in gibibytes (GiB).

    • (dict) --

      Defines a condition for filtering based on integer values with comparison operators.

      • comparison (string) --

        The comparison operator used to evaluate the attribute against the specified values.

      • values (list) --

        The list of integer values to compare against using the specified comparison operator.

        • (integer) --

  • estimatedMonthlySavings (list) --

    Filter criteria for estimated monthly cost savings from the recommended action.

    • (dict) --

      Defines a condition for filtering based on double/floating-point numeric values with comparison operators.

      • comparison (string) --

        The comparison operator used to evaluate the attribute against the specified values.

      • values (list) --

        The list of double values to compare against using the specified comparison operator.

        • (float) --

  • resourceTag (list) --

    Filter criteria for resource tags, allowing filtering by tag key and value combinations.

    • (dict) --

      Criteria condition for filtering resources based on their tags, including comparison operators and values.

      • comparison (string) --

        The comparison operator used to evaluate the attribute against the specified values.

      • key (string) --

        The tag key to use for comparison when filtering resources.

      • values (list) --

        List of tag values to compare against when filtering resources.

        • (string) --

  • lookBackPeriodInDays (list) --

    Filter criteria for the lookback period in days used to analyze resource utilization.

    • (dict) --

      Defines a condition for filtering based on integer values with comparison operators.

      • comparison (string) --

        The comparison operator used to evaluate the attribute against the specified values.

      • values (list) --

        The list of integer values to compare against using the specified comparison operator.

        • (integer) --

  • restartNeeded (list) --

    Filter criteria indicating whether the recommended action requires a resource restart.

    • (dict) --

      Criteria condition for filtering based on string values, including comparison operators and target values.

      • comparison (string) --

        The comparison operator used to evaluate the attribute against the specified values.

      • values (list) --

        List of string values to compare against when applying the criteria condition.

        • (string) --

type maxResults:

integer

param maxResults:

The maximum number of automation rule preview summaries to return in a single response. Valid range is 1-1000.

type nextToken:

string

param nextToken:

A token used for pagination to retrieve the next set of results when the response is truncated.

rtype:

dict

returns:

Response Syntax

{
    'previewResultSummaries': [
        {
            'key': 'string',
            'total': {
                'recommendedActionCount': 123,
                'estimatedMonthlySavings': {
                    'currency': 'string',
                    'beforeDiscountSavings': 123.0,
                    'afterDiscountSavings': 123.0,
                    'savingsEstimationMode': 'BeforeDiscount'|'AfterDiscount'
                }
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • previewResultSummaries (list) --

      The list of automation rule preview summaries that match the specified criteria.

      • (dict) --

        Contains a summary of preview results for an automation rule.

        • key (string) --

          The key identifier for this preview result summary.

        • total (dict) --

          Aggregate totals for automation rule preview results, including count and estimated savings.

          • recommendedActionCount (integer) --

            The total number of recommended actions matching the rule preview configuration.

          • estimatedMonthlySavings (dict) --

            Contains information about estimated monthly cost savings.

            • currency (string) --

              The currency of the estimated savings.

            • beforeDiscountSavings (float) --

              The estimated monthly savings before applying any discounts.

            • afterDiscountSavings (float) --

              The estimated monthly savings after applying any discounts.

            • savingsEstimationMode (string) --

              The mode used to calculate savings, either BeforeDiscount or AfterDiscount.

    • nextToken (string) --

      A token used for pagination. If present, indicates there are more results available and can be used in subsequent requests.

UpdateAutomationRule (updated) Link ¶
Changes (both)
{'criteria': {'ebsVolumeSizeInGib': {'comparison': {'NumericEqualsIfExists',
                                                    'NumericGreaterThanEqualsIfExists',
                                                    'NumericGreaterThanIfExists',
                                                    'NumericLessThanEqualsIfExists',
                                                    'NumericLessThanIfExists',
                                                    'NumericNotEqualsIfExists',
                                                    'StringEqualsIfExists',
                                                    'StringEqualsIgnoreCaseIfExists',
                                                    'StringLikeIfExists',
                                                    'StringNotEqualsIfExists',
                                                    'StringNotEqualsIgnoreCaseIfExists',
                                                    'StringNotLikeIfExists'}},
              'ebsVolumeType': {'comparison': {'NumericEqualsIfExists',
                                               'NumericGreaterThanEqualsIfExists',
                                               'NumericGreaterThanIfExists',
                                               'NumericLessThanEqualsIfExists',
                                               'NumericLessThanIfExists',
                                               'NumericNotEqualsIfExists',
                                               'StringEqualsIfExists',
                                               'StringEqualsIgnoreCaseIfExists',
                                               'StringLikeIfExists',
                                               'StringNotEqualsIfExists',
                                               'StringNotEqualsIgnoreCaseIfExists',
                                               'StringNotLikeIfExists'}},
              'estimatedMonthlySavings': {'comparison': {'NumericEqualsIfExists',
                                                         'NumericGreaterThanEqualsIfExists',
                                                         'NumericGreaterThanIfExists',
                                                         'NumericLessThanEqualsIfExists',
                                                         'NumericLessThanIfExists',
                                                         'NumericNotEqualsIfExists',
                                                         'StringEqualsIfExists',
                                                         'StringEqualsIgnoreCaseIfExists',
                                                         'StringLikeIfExists',
                                                         'StringNotEqualsIfExists',
                                                         'StringNotEqualsIgnoreCaseIfExists',
                                                         'StringNotLikeIfExists'}},
              'lookBackPeriodInDays': {'comparison': {'NumericEqualsIfExists',
                                                      'NumericGreaterThanEqualsIfExists',
                                                      'NumericGreaterThanIfExists',
                                                      'NumericLessThanEqualsIfExists',
                                                      'NumericLessThanIfExists',
                                                      'NumericNotEqualsIfExists',
                                                      'StringEqualsIfExists',
                                                      'StringEqualsIgnoreCaseIfExists',
                                                      'StringLikeIfExists',
                                                      'StringNotEqualsIfExists',
                                                      'StringNotEqualsIgnoreCaseIfExists',
                                                      'StringNotLikeIfExists'}},
              'region': {'comparison': {'NumericEqualsIfExists',
                                        'NumericGreaterThanEqualsIfExists',
                                        'NumericGreaterThanIfExists',
                                        'NumericLessThanEqualsIfExists',
                                        'NumericLessThanIfExists',
                                        'NumericNotEqualsIfExists',
                                        'StringEqualsIfExists',
                                        'StringEqualsIgnoreCaseIfExists',
                                        'StringLikeIfExists',
                                        'StringNotEqualsIfExists',
                                        'StringNotEqualsIgnoreCaseIfExists',
                                        'StringNotLikeIfExists'}},
              'resourceArn': {'comparison': {'NumericEqualsIfExists',
                                             'NumericGreaterThanEqualsIfExists',
                                             'NumericGreaterThanIfExists',
                                             'NumericLessThanEqualsIfExists',
                                             'NumericLessThanIfExists',
                                             'NumericNotEqualsIfExists',
                                             'StringEqualsIfExists',
                                             'StringEqualsIgnoreCaseIfExists',
                                             'StringLikeIfExists',
                                             'StringNotEqualsIfExists',
                                             'StringNotEqualsIgnoreCaseIfExists',
                                             'StringNotLikeIfExists'}},
              'resourceTag': {'comparison': {'NumericEqualsIfExists',
                                             'NumericGreaterThanEqualsIfExists',
                                             'NumericGreaterThanIfExists',
                                             'NumericLessThanEqualsIfExists',
                                             'NumericLessThanIfExists',
                                             'NumericNotEqualsIfExists',
                                             'StringEqualsIfExists',
                                             'StringEqualsIgnoreCaseIfExists',
                                             'StringLikeIfExists',
                                             'StringNotEqualsIfExists',
                                             'StringNotEqualsIgnoreCaseIfExists',
                                             'StringNotLikeIfExists'}},
              'restartNeeded': {'comparison': {'NumericEqualsIfExists',
                                               'NumericGreaterThanEqualsIfExists',
                                               'NumericGreaterThanIfExists',
                                               'NumericLessThanEqualsIfExists',
                                               'NumericLessThanIfExists',
                                               'NumericNotEqualsIfExists',
                                               'StringEqualsIfExists',
                                               'StringEqualsIgnoreCaseIfExists',
                                               'StringLikeIfExists',
                                               'StringNotEqualsIfExists',
                                               'StringNotEqualsIgnoreCaseIfExists',
                                               'StringNotLikeIfExists'}}}}

Updates an existing automation rule.

See also: AWS API Documentation

Request Syntax

client.update_automation_rule(
    ruleArn='string',
    ruleRevision=123,
    name='string',
    description='string',
    ruleType='OrganizationRule'|'AccountRule',
    organizationConfiguration={
        'ruleApplyOrder': 'BeforeAccountRules'|'AfterAccountRules',
        'accountIds': [
            'string',
        ]
    },
    priority='string',
    recommendedActionTypes=[
        'SnapshotAndDeleteUnattachedEbsVolume'|'UpgradeEbsVolumeType',
    ],
    criteria={
        'region': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    'string',
                ]
            },
        ],
        'resourceArn': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    'string',
                ]
            },
        ],
        'ebsVolumeType': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    'string',
                ]
            },
        ],
        'ebsVolumeSizeInGib': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    123,
                ]
            },
        ],
        'estimatedMonthlySavings': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    123.0,
                ]
            },
        ],
        'resourceTag': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'key': 'string',
                'values': [
                    'string',
                ]
            },
        ],
        'lookBackPeriodInDays': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    123,
                ]
            },
        ],
        'restartNeeded': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    'string',
                ]
            },
        ]
    },
    schedule={
        'scheduleExpression': 'string',
        'scheduleExpressionTimezone': 'string',
        'executionWindowInMinutes': 123
    },
    status='Active'|'Inactive',
    clientToken='string'
)
type ruleArn:

string

param ruleArn:

[REQUIRED]

The ARN of the rule to update.

type ruleRevision:

integer

param ruleRevision:

[REQUIRED]

The revision number of the rule to update.

type name:

string

param name:

The updated name of the automation rule. Must be 1-128 characters long and contain only alphanumeric characters, underscores, and hyphens.

type description:

string

param description:

The updated description of the automation rule. Can be up to 1024 characters long and contain alphanumeric characters, underscores, hyphens, spaces, and certain special characters.

type ruleType:

string

param ruleType:

The updated type of automation rule. Can be either OrganizationRule for organization-wide rules or AccountRule for account-specific rules.

type organizationConfiguration:

dict

param organizationConfiguration:

Updated configuration settings for organization-wide rules, including rule application order and target account IDs.

  • ruleApplyOrder (string) --

    Specifies when organization rules should be applied relative to account rules.

  • accountIds (list) --

    List of specific Amazon Web Services account IDs where the organization rule should be applied.

    • (string) --

type priority:

string

param priority:

The updated priority level of the automation rule, used to determine execution order when multiple rules apply to the same resource.

type recommendedActionTypes:

list

param recommendedActionTypes:

Updated list of recommended action types that this rule can execute, such as SnapshotAndDeleteUnattachedEbsVolume or UpgradeEbsVolumeType.

  • (string) --

    Recommended action type enumeration

type criteria:

dict

param 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.

  • region (list) --

    Filter criteria for Amazon Web Services regions where resources must be located.

    • (dict) --

      Criteria condition for filtering based on string values, including comparison operators and target values.

      • comparison (string) --

        The comparison operator used to evaluate the attribute against the specified values.

      • values (list) --

        List of string values to compare against when applying the criteria condition.

        • (string) --

  • resourceArn (list) --

    Filter criteria for specific resource ARNs to include or exclude.

    • (dict) --

      Criteria condition for filtering based on string values, including comparison operators and target values.

      • comparison (string) --

        The comparison operator used to evaluate the attribute against the specified values.

      • values (list) --

        List of string values to compare against when applying the criteria condition.

        • (string) --

  • ebsVolumeType (list) --

    Filter criteria for EBS volume types, such as gp2, gp3, io1, io2, st1, or sc1.

    • (dict) --

      Criteria condition for filtering based on string values, including comparison operators and target values.

      • comparison (string) --

        The comparison operator used to evaluate the attribute against the specified values.

      • values (list) --

        List of string values to compare against when applying the criteria condition.

        • (string) --

  • ebsVolumeSizeInGib (list) --

    Filter criteria for EBS volume sizes in gibibytes (GiB).

    • (dict) --

      Defines a condition for filtering based on integer values with comparison operators.

      • comparison (string) --

        The comparison operator used to evaluate the attribute against the specified values.

      • values (list) --

        The list of integer values to compare against using the specified comparison operator.

        • (integer) --

  • estimatedMonthlySavings (list) --

    Filter criteria for estimated monthly cost savings from the recommended action.

    • (dict) --

      Defines a condition for filtering based on double/floating-point numeric values with comparison operators.

      • comparison (string) --

        The comparison operator used to evaluate the attribute against the specified values.

      • values (list) --

        The list of double values to compare against using the specified comparison operator.

        • (float) --

  • resourceTag (list) --

    Filter criteria for resource tags, allowing filtering by tag key and value combinations.

    • (dict) --

      Criteria condition for filtering resources based on their tags, including comparison operators and values.

      • comparison (string) --

        The comparison operator used to evaluate the attribute against the specified values.

      • key (string) --

        The tag key to use for comparison when filtering resources.

      • values (list) --

        List of tag values to compare against when filtering resources.

        • (string) --

  • lookBackPeriodInDays (list) --

    Filter criteria for the lookback period in days used to analyze resource utilization.

    • (dict) --

      Defines a condition for filtering based on integer values with comparison operators.

      • comparison (string) --

        The comparison operator used to evaluate the attribute against the specified values.

      • values (list) --

        The list of integer values to compare against using the specified comparison operator.

        • (integer) --

  • restartNeeded (list) --

    Filter criteria indicating whether the recommended action requires a resource restart.

    • (dict) --

      Criteria condition for filtering based on string values, including comparison operators and target values.

      • comparison (string) --

        The comparison operator used to evaluate the attribute against the specified values.

      • values (list) --

        List of string values to compare against when applying the criteria condition.

        • (string) --

type schedule:

dict

param schedule:

The updated schedule configuration for when the automation rule should execute, including cron expression, timezone, and execution window.

  • scheduleExpression (string) --

    The expression that defines when the schedule runs. cron expression is supported. A cron expression consists of six fields separated by white spaces: ( minutes hours day_of_month month day_of_week year)

  • scheduleExpressionTimezone (string) --

    The timezone to use when interpreting the schedule expression.

  • executionWindowInMinutes (integer) --

    The time window in minutes during which the automation rule can start implementing recommended actions.

type status:

string

param status:

The updated status of the automation rule. Can be Active or Inactive.

type clientToken:

string

param clientToken:

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Must be 1-64 characters long and contain only alphanumeric characters, underscores, and hyphens.

This field is autopopulated if not provided.

rtype:

dict

returns:

Response Syntax

{
    'ruleArn': 'string',
    'ruleRevision': 123,
    'name': 'string',
    'description': 'string',
    'ruleType': 'OrganizationRule'|'AccountRule',
    'organizationConfiguration': {
        'ruleApplyOrder': 'BeforeAccountRules'|'AfterAccountRules',
        'accountIds': [
            'string',
        ]
    },
    'priority': 'string',
    'recommendedActionTypes': [
        'SnapshotAndDeleteUnattachedEbsVolume'|'UpgradeEbsVolumeType',
    ],
    'criteria': {
        'region': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    'string',
                ]
            },
        ],
        'resourceArn': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    'string',
                ]
            },
        ],
        'ebsVolumeType': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    'string',
                ]
            },
        ],
        'ebsVolumeSizeInGib': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    123,
                ]
            },
        ],
        'estimatedMonthlySavings': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    123.0,
                ]
            },
        ],
        'resourceTag': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'key': 'string',
                'values': [
                    'string',
                ]
            },
        ],
        'lookBackPeriodInDays': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    123,
                ]
            },
        ],
        'restartNeeded': [
            {
                'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals'|'StringEqualsIfExists'|'StringNotEqualsIfExists'|'StringEqualsIgnoreCaseIfExists'|'StringNotEqualsIgnoreCaseIfExists'|'StringLikeIfExists'|'StringNotLikeIfExists'|'NumericEqualsIfExists'|'NumericNotEqualsIfExists'|'NumericLessThanIfExists'|'NumericLessThanEqualsIfExists'|'NumericGreaterThanIfExists'|'NumericGreaterThanEqualsIfExists',
                'values': [
                    'string',
                ]
            },
        ]
    },
    'schedule': {
        'scheduleExpression': 'string',
        'scheduleExpressionTimezone': 'string',
        'executionWindowInMinutes': 123
    },
    'status': 'Active'|'Inactive',
    'createdTimestamp': datetime(2015, 1, 1),
    'lastUpdatedTimestamp': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • ruleArn (string) --

      The ARN of the updated rule.

    • ruleRevision (integer) --

      The new revision number of the updated rule.

    • name (string) --

      The updated name of the automation rule.

    • description (string) --

      The updated description of the automation rule.

    • ruleType (string) --

      The updated type of automation rule.

    • organizationConfiguration (dict) --

      The updated organization configuration settings.

      • ruleApplyOrder (string) --

        Specifies when organization rules should be applied relative to account rules.

      • accountIds (list) --

        List of specific Amazon Web Services account IDs where the organization rule should be applied.

        • (string) --

    • priority (string) --

      The updated priority level of the automation rule.

    • recommendedActionTypes (list) --

      The updated list of recommended action types.

      • (string) --

        Recommended action type enumeration

    • criteria (dict) --

      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.

      • region (list) --

        Filter criteria for Amazon Web Services regions where resources must be located.

        • (dict) --

          Criteria condition for filtering based on string values, including comparison operators and target values.

          • comparison (string) --

            The comparison operator used to evaluate the attribute against the specified values.

          • values (list) --

            List of string values to compare against when applying the criteria condition.

            • (string) --

      • resourceArn (list) --

        Filter criteria for specific resource ARNs to include or exclude.

        • (dict) --

          Criteria condition for filtering based on string values, including comparison operators and target values.

          • comparison (string) --

            The comparison operator used to evaluate the attribute against the specified values.

          • values (list) --

            List of string values to compare against when applying the criteria condition.

            • (string) --

      • ebsVolumeType (list) --

        Filter criteria for EBS volume types, such as gp2, gp3, io1, io2, st1, or sc1.

        • (dict) --

          Criteria condition for filtering based on string values, including comparison operators and target values.

          • comparison (string) --

            The comparison operator used to evaluate the attribute against the specified values.

          • values (list) --

            List of string values to compare against when applying the criteria condition.

            • (string) --

      • ebsVolumeSizeInGib (list) --

        Filter criteria for EBS volume sizes in gibibytes (GiB).

        • (dict) --

          Defines a condition for filtering based on integer values with comparison operators.

          • comparison (string) --

            The comparison operator used to evaluate the attribute against the specified values.

          • values (list) --

            The list of integer values to compare against using the specified comparison operator.

            • (integer) --

      • estimatedMonthlySavings (list) --

        Filter criteria for estimated monthly cost savings from the recommended action.

        • (dict) --

          Defines a condition for filtering based on double/floating-point numeric values with comparison operators.

          • comparison (string) --

            The comparison operator used to evaluate the attribute against the specified values.

          • values (list) --

            The list of double values to compare against using the specified comparison operator.

            • (float) --

      • resourceTag (list) --

        Filter criteria for resource tags, allowing filtering by tag key and value combinations.

        • (dict) --

          Criteria condition for filtering resources based on their tags, including comparison operators and values.

          • comparison (string) --

            The comparison operator used to evaluate the attribute against the specified values.

          • key (string) --

            The tag key to use for comparison when filtering resources.

          • values (list) --

            List of tag values to compare against when filtering resources.

            • (string) --

      • lookBackPeriodInDays (list) --

        Filter criteria for the lookback period in days used to analyze resource utilization.

        • (dict) --

          Defines a condition for filtering based on integer values with comparison operators.

          • comparison (string) --

            The comparison operator used to evaluate the attribute against the specified values.

          • values (list) --

            The list of integer values to compare against using the specified comparison operator.

            • (integer) --

      • restartNeeded (list) --

        Filter criteria indicating whether the recommended action requires a resource restart.

        • (dict) --

          Criteria condition for filtering based on string values, including comparison operators and target values.

          • comparison (string) --

            The comparison operator used to evaluate the attribute against the specified values.

          • values (list) --

            List of string values to compare against when applying the criteria condition.

            • (string) --

    • schedule (dict) --

      The updated schedule configuration.

      • scheduleExpression (string) --

        The expression that defines when the schedule runs. cron expression is supported. A cron expression consists of six fields separated by white spaces: ( minutes hours day_of_month month day_of_week year)

      • scheduleExpressionTimezone (string) --

        The timezone to use when interpreting the schedule expression.

      • executionWindowInMinutes (integer) --

        The time window in minutes during which the automation rule can start implementing recommended actions.

    • status (string) --

      The updated status of the automation rule.

    • createdTimestamp (datetime) --

      The timestamp when the automation rule was originally created.

    • lastUpdatedTimestamp (datetime) --

      The timestamp when the automation rule was last updated.