Menu
AWS Systems Manager
API Reference (API Version 2014-11-06)

RemoveTagsFromResource

Removes all tags from the specified resource.

Request Syntax

{ "ResourceId": "string", "ResourceType": "string", "TagKeys": [ "string" ] }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

ResourceId

The resource ID for which you want to remove tags. Use the ID of the resource. Here are some examples:

ManagedInstance: mi-012345abcde

MaintenanceWindow: mw-012345abcde

PatchBaseline: pb-012345abcde

For the Document and Parameter values, use the name of the resource.

Note

The ManagedInstance type for this API action is only for on-premises managed instances. You must specify the the name of the managed instance in the following format: mi-ID_number. For example, mi-1a2b3c4d5e6f.

Type: String

Required: Yes

ResourceType

The type of resource of which you want to remove a tag.

Note

The ManagedInstance type for this API action is only for on-premises managed instances. You must specify the the name of the managed instance in the following format: mi-ID_number. For example, mi-1a2b3c4d5e6f.

Type: String

Valid Values: Document | ManagedInstance | MaintenanceWindow | Parameter | PatchBaseline

Required: Yes

TagKeys

Tag keys that you want to remove from the specified resource.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: ^(?!^(?i)aws:)(?=^[\p{L}\p{Z}\p{N}_.:/=+\-@]*$).*$

Required: Yes

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalServerError

An error occurred on the server side.

HTTP Status Code: 400

InvalidResourceId

The resource ID is not valid. Verify that you entered the correct ID and try again.

HTTP Status Code: 400

InvalidResourceType

The resource type is not valid. For example, if you are attempting to tag an instance, the instance must be a registered, managed instance.

HTTP Status Code: 400

TooManyUpdates

There are concurrent updates for a resource that supports one update at a time.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: