TagResourceCommand

Associates key-value tag pairs to your Amazon Managed Workflows for Apache Airflow (MWAA) environment.

Example Syntax

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

import { MWAAClient, TagResourceCommand } from "@aws-sdk/client-mwaa"; // ES Modules import
// const { MWAAClient, TagResourceCommand } = require("@aws-sdk/client-mwaa"); // CommonJS import
const client = new MWAAClient(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

See TagResourceCommandInput for more details

Parameter
Type
Description
ResourceArn
Required
string | undefined

The Amazon Resource Name (ARN) of the Amazon MWAA environment. For example, arn:aws:airflow:us-east-1:123456789012:environment/MyMWAAEnvironment.

Tags
Required
Record<string, string> | undefined

The key-value tag pairs you want to associate to your environment. For example, "Environment": "Staging". For more information, see Tagging Amazon Web Services resources .

TagResourceCommand Output

See TagResourceCommandOutput for details

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.

Throws

Name
Fault
Details
InternalServerException
server

InternalServerException: An internal error has occurred.

ResourceNotFoundException
client

ResourceNotFoundException: The resource is not available.

ValidationException
client

ValidationException: The provided input is not valid.

MWAAServiceException
Base exception class for all service exceptions from MWAA service.