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.

Type: String

Required: Yes

ResourceType

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

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

See Also

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