- 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.
UntagResourceCommand
Deletes specified tags from a resource.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { ECRClient, UntagResourceCommand } from "@aws-sdk/client-ecr"; // ES Modules import
// const { ECRClient, UntagResourceCommand } = require("@aws-sdk/client-ecr"); // CommonJS import
const client = new ECRClient(config);
const input = { // UntagResourceRequest
resourceArn: "STRING_VALUE", // required
tagKeys: [ // TagKeyList // required
"STRING_VALUE",
],
};
const command = new UntagResourceCommand(input);
const response = await client.send(command);
// {};
UntagResourceCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
resourceArn Required | string | undefined | The Amazon Resource Name (ARN) of the resource from which to remove tags. Currently, the only supported resource is an Amazon ECR repository. |
tagKeys Required | string[] | undefined | The keys of the tags to be removed. |
UntagResourceCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InvalidParameterException | client | The specified parameter is invalid. Review the available parameters for the API request. |
InvalidTagParameterException | client | An invalid parameter has been specified. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters. |
RepositoryNotFoundException | client | The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry. |
ServerException | server | These errors are usually caused by a server-side issue. |
TooManyTagsException | client | The list of tags on the repository is over the limit. The maximum number of tags that can be applied to a repository is 50. |
ECRServiceException | Base exception class for all service exceptions from ECR service. |