Jump to Content

New API Documentation - Developer Preview Available

We are excited to announce the developer preview of our new API documentation for AWS SDK for JavaScript v3. Please follow instructions on the landing page to leave us your feedback.

Associates a set of provided tags with a notification rule.

Example

Use a bare-bones client and the command you need to make an API call.

import { CodestarNotificationsClient, TagResourceCommand } from "@aws-sdk/client-codestar-notifications"; // ES Modules import
// const { CodestarNotificationsClient, TagResourceCommand } = require("@aws-sdk/client-codestar-notifications"); // CommonJS import
const client = new CodestarNotificationsClient(config);
const input = { // TagResourceRequest
Arn: "STRING_VALUE", // required
Tags: { // Tags // required
"<keys>": "STRING_VALUE",
},
};
const command = new TagResourceCommand(input);
const response = await client.send(command);
// { // TagResourceResult
// Tags: { // Tags
// "<keys>": "STRING_VALUE",
// },
// };

Param

TagResourceCommandInput

Returns

TagResourceCommandOutput

See

Throws

ConcurrentModificationException (client fault)

AWS CodeStar Notifications can't complete the request because the resource is being modified by another process. Wait a few minutes and try again.

Throws

LimitExceededException (client fault)

One of the AWS CodeStar Notifications limits has been exceeded. Limits apply to accounts, notification rules, notifications, resources, and targets. For more information, see Limits.

Throws

ResourceNotFoundException (client fault)

AWS CodeStar Notifications can't find a resource that matches the provided ARN.

Throws

ValidationException (client fault)

One or more parameter values are not valid.

Throws

CodestarNotificationsServiceException

Base exception class for all service exceptions from CodestarNotifications service.

Hierarchy

Constructors

Properties

middlewareStack: MiddlewareStack<TagResourceCommandInput, TagResourceCommandOutput>

Methods