View a markdown version of this page

TagResource - Amazon EventBridge Custom Event Bus

TagResource

Adds or replaces tags on an event bus, subscriber, or event source.

Request Parameters

ResourceArn

ARN for an EventBridge resource that supports tagging: event buses, subscribers, and event sources.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1011.

Pattern: arn:aws(-[a-z0-9]+)*:events:[a-z][a-z0-9]*(-[a-z0-9]+)*:([0-9]{12}):(event-busv2|subscriber|event-sourcev2\/(aws\.service|aws\.partner))\/[A-Za-z0-9][\.\-_A-Za-z0-9]{0,255}\/[a-z0-9]{25}

Required: Yes

Tags

Tags attached to a resource, as key-value pairs.

Type: String to string map

Map Entries: Maximum number of items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: \S([\s\S]*\S)?(?![\s\S]).*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: (\S([\s\S]*\S)?)?(?![\s\S]).*

Required: Yes

Errors

For information about the errors that are common to all actions, see Common Error Types.

AccessDeniedException

The caller does not have the permissions required to perform the operation. This error is also returned when the operation cannot use the AWS KMS key for the event bus.

HTTP Status Code: 403

ConcurrentModificationException

Another change to the resource is already in progress. Retry the request.

HTTP Status Code: 409

InternalException

The request failed because of an internal service error. Retry the request.

HTTP Status Code: 500

InvalidInputException

A request parameter is missing or not valid.

HTTP Status Code: 400

InvalidStateException

The resource is not in a state that allows the operation. For example, an event bus that is still being created cannot accept events.

HTTP Status Code: 409

LimitExceededException

The request would exceed a service quota for the account.

HTTP Status Code: 400

ResourceNotFoundException

The resource does not exist.

HTTP Status Code: 404

ThrottlingException

The request was throttled because it exceeds a request rate limit. Retry the request with backoff.

HTTP Status Code: 429

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: