AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Associates tags with the specified Amazon Web Services resource. Tags are key:value pairs that you can use to categorize and manage your resources, for purposes like billing. For example, you might set the tag key to "customer" and the value to the customer name or ID. You can specify one or more tags to add to each Amazon Web Services resource, up to 50 tags for a resource.
You can tag the Amazon Web Services resources that you manage through WAF: web ACLs, rule groups, IP sets, and regex pattern sets. You can't manage or view tags through the WAF console.
For .NET Core this operation is only available in asynchronous form. Please refer to TagResourceAsync.
Namespace: Amazon.WAFV2
Assembly: AWSSDK.WAFV2.dll
Version: 3.x.y.z
public abstract TagResourceResponse TagResource( TagResourceRequest request )
Container for the necessary parameters to execute the TagResource service method.
Exception | Condition |
---|---|
WAFInternalErrorException | Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request. |
WAFInvalidOperationException | The operation isn't valid. |
WAFInvalidParameterException | The operation failed because WAF didn't recognize a parameter in the request. For example: You specified a parameter name or value that isn't valid. Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested. You tried to update a WebACL with a DefaultAction that isn't among the types available at DefaultAction. Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated. |
WAFLimitsExceededException | WAF couldn’t perform the operation because you exceeded your resource limit. For example, the maximum number of WebACL objects that you can create for an Amazon Web Services account. For more information, see WAF quotas in the WAF Developer Guide. |
WAFNonexistentItemException | WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate. |
WAFTagOperationException | An error occurred during the tagging operation. Retry your request. |
WAFTagOperationInternalErrorException | WAF couldn’t perform your tagging operation because of an internal error. Retry your request. |
.NET Framework:
Supported in: 4.5 and newer, 3.5