update_automation_rule
async
¶
update_automation_rule(
rule_arn: RuleArn,
rule_revision: int,
*,
config_overrides: Optional[AsyncComputeOptimizerAutomationClientConfig] = None,
name: Optional[RuleName] = None,
description: Optional[RuleDescription] = None,
rule_type: Optional[RuleType] = None,
organization_configuration: Optional[OrganizationConfiguration] = None,
priority: Optional[str] = None,
recommended_action_types: Optional[RecommendedActionTypeList] = None,
criteria: Optional[Criteria] = None,
schedule: Optional[Schedule] = None,
status: Optional[RuleStatus] = None,
client_token: Optional[ClientToken] = None,
) -> UpdateAutomationRuleResponse
Updates an existing automation rule.
Parameters:
-
rule_arn(RuleArn) –The ARN of the rule to update.
-
rule_revision(int) –The revision number of the rule to update.
-
name(Optional[RuleName], default:None) –The updated name of the automation rule. Must be 1-128 characters long and contain only alphanumeric characters, underscores, and hyphens.
-
description(Optional[RuleDescription], default:None) –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.
-
rule_type(Optional[RuleType], default:None) –The updated type of automation rule. Can be either OrganizationRule for organization-wide rules or AccountRule for account-specific rules.
-
organization_configuration(Optional[OrganizationConfiguration], default:None) –Updated configuration settings for organization-wide rules, including rule application order and target account IDs.
-
priority(Optional[str], default:None) –The updated priority level of the automation rule, used to determine execution order when multiple rules apply to the same resource.
-
recommended_action_types(Optional[RecommendedActionTypeList], default:None) –Updated list of recommended action types that this rule can execute, such as SnapshotAndDeleteUnattachedEbsVolume or UpgradeEbsVolumeType.
-
schedule(Optional[Schedule], default:None) –The updated schedule configuration for when the automation rule should execute, including cron expression, timezone, and execution window.
-
status(Optional[RuleStatus], default:None) –The updated status of the automation rule. Can be Active or Inactive.
-
client_token(Optional[ClientToken], default:None) –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.
Raises:
-
AccessDeniedException–You do not have sufficient permissions to perform this action.
-
ForbiddenException–You are not authorized to perform this action.
-
IdempotencyTokenInUseException–The specified client token is already in use.
-
IdempotentParameterMismatchException–Exception thrown when the same client token is used with different parameters, indicating a mismatch in idempotent request parameters.
-
InternalServerException–An internal error occurred while processing the request.
-
InvalidParameterValueException–One or more parameter values are not valid.
-
OptInRequiredException–The account must be opted in to Compute Optimizer Automation before performing this action.
-
ResourceNotFoundException–The specified resource was not found.
-
ServiceUnavailableException–The service is temporarily unavailable.
-
ThrottlingException–The request was denied due to request throttling.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_compute_optimizer_automation/_services/async_compute_optimizer_automation.py
2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 | |