- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
TagResourceCommand
Adds tags to the specified resource.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { NeptuneGraphClient, TagResourceCommand } from "@aws-sdk/client-neptune-graph"; // ES Modules import
// const { NeptuneGraphClient, TagResourceCommand } = require("@aws-sdk/client-neptune-graph"); // CommonJS import
const client = new NeptuneGraphClient(config);
const input = { // TagResourceInput
resourceArn: "STRING_VALUE", // required
tags: { // TagMap // required
"<keys>": "STRING_VALUE",
},
};
const command = new TagResourceCommand(input);
const response = await client.send(command);
// {};
TagResourceCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
resourceArn Required | string | undefined | ARN of the resource for which tags need to be added. |
tags Required | Record<string, string> | undefined | The tags to be assigned to the Neptune Analytics resource. The tags are metadata that are specified as a list of key-value pairs: Key (string) – A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length. It can't be prefixed with Value (string) – A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length. It can't be prefixed with |
TagResourceCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InternalServerException | server | A failure occurred on the server. |
ResourceNotFoundException | client | A specified resource could not be located. |
ThrottlingException | client | The exception was interrupted by throttling. |
ValidationException | client | A resource could not be validated. |
NeptuneGraphServiceException | Base exception class for all service exceptions from NeptuneGraph service. |