update_automation_rule
¶
update_automation_rule(
rule_arn: RuleArn,
rule_revision: int,
*,
config_overrides: Optional[ComputeOptimizerAutomationClientConfig] = 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/compute_optimizer_automation.py
2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 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 | |