RemoveTags
Removes tags from an Amazon EMR resource, such as a cluster or Amazon EMR Studio. Tags make it easier to associate resources in various ways, such as grouping clusters to track your Amazon EMR resource allocation costs. For more information, see Tag Clusters.
The following example removes the stack tag with value Prod from a cluster:
Request Syntax
{
"ResourceId": "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 Amazon EMR resource identifier from which tags will be removed. For example, a cluster identifier or an Amazon EMR Studio ID.
Type: String
Required: Yes
- TagKeys
-
A list of tag keys to remove from the resource.
Type: Array of strings
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.
- InternalServerException
-
This exception occurs when there is an internal failure in the Amazon EMR service.
HTTP Status Code: 500
- InvalidRequestException
-
This exception occurs when there is something wrong with user input.
HTTP Status Code: 400
Examples
Example
This example illustrates one usage of RemoveTags.
Sample Request
POST / HTTP/1.1
Content-Type: application/x-amz-json-1.1
X-Amz-Target: ElasticMapReduce.RemoveTags
AUTHPARAMS
{
"ResourceId": "j-3U7TSX5GZFD8Y",
"Tags": [{
"Key": "stack",
"Value": "Prod"
}]
}
Sample Response
HTTP/1.1 200 OK
x-amzn-RequestId: 9da5a349-ed9e-11e2-90db-69a5154aeb8d
Content-Type: application/x-amz-json-1.1
Content-Length: 71
Date: Mon, 15 Jul 2013 22:33:47 GMT
{
}
Example
The following example removes the stack and hbase tags from a cluster:
Sample Request
POST / HTTP/1.1
Content-Type: application/x-amz-json-1.1
X-Amz-Target: ElasticMapReduce.RemoveTags
AUTHPARAMS
{
"ResourceId": "j-3U7TSX5GZFD8Y",
"Tags": [{
"Key": "stack"
},
{
"Key": "hbase"
}]
}
Sample Response
HTTP/1.1 200 OK
x-amzn-RequestId: 9da5a349-ed9e-11e2-90db-69a5154aeb8d
Content-Type: application/x-amz-json-1.1
Content-Length: 71
Date: Mon, 15 Jul 2013 22:33:47 GMT
{
}
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: