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
1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 | |