Jump to Content

This API Documentation is now deprecated

We are excited to announce our new API Documentation.

Class UntagUserCommandProtected

Removes the specified tags from the user. For more information about tagging, see Tagging IAM resources in the IAM User Guide.

Example

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

import { IAMClient, UntagUserCommand } from "@aws-sdk/client-iam"; // ES Modules import
// const { IAMClient, UntagUserCommand } = require("@aws-sdk/client-iam"); // CommonJS import
const client = new IAMClient(config);
const input = { // UntagUserRequest
UserName: "STRING_VALUE", // required
TagKeys: [ // tagKeyListType // required
"STRING_VALUE",
],
};
const command = new UntagUserCommand(input);
const response = await client.send(command);
// {};

Param

UntagUserCommandInput

Returns

UntagUserCommandOutput

See

Throws

ConcurrentModificationException (client fault)

The request was rejected because multiple requests to change this object were submitted simultaneously. Wait a few minutes and submit your request again.

Throws

NoSuchEntityException (client fault)

The request was rejected because it referenced a resource entity that does not exist. The error message describes the resource.

Throws

ServiceFailureException (server fault)

The request processing has failed because of an unknown error, exception or failure.

Throws

IAMServiceException

Base exception class for all service exceptions from IAM service.

Example

To remove a tag from an IAM user

// The following example shows how to remove tags that are attached to a user named 'anika'.
const input = {
"TagKeys": [
"Dept"
],
"UserName": "anika"
};
const command = new UntagUserCommand(input);
await client.send(command);
// example id: to-remove-a-tag-from-an-iam-user-1506719725554

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods