tag_resource
¶
tag_resource(
resource_arn: RuleArn,
rule_revision: int,
tags: TagList,
*,
config_overrides: Optional[ComputeOptimizerAutomationClientConfig] = None,
client_token: Optional[ClientToken] = None,
) -> TagResourceResponse
Adds tags to the specified resource.
Parameters:
-
resource_arn(RuleArn) –The ARN of the resource to tag.
-
rule_revision(int) –The revision number of the automation rule to tag. This ensures you're tagging the correct version of the rule.
-
tags(TagList) –The tags to add to the resource.
-
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
1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 | |