{ "version":"2.0", "metadata":{ "apiVersion":"2017-01-26", "endpointPrefix":"tagging", "jsonVersion":"1.1", "protocol":"json", "serviceFullName":"AWS Resource Groups Tagging API", "signatureVersion":"v4", "targetPrefix":"ResourceGroupsTaggingAPI_20170126", "uid":"resourcegroupstaggingapi-2017-01-26" }, "operations":{ "GetResources":{ "name":"GetResources", "http":{ "method":"POST", "requestUri":"/" }, "input":{"shape":"GetResourcesInput"}, "output":{"shape":"GetResourcesOutput"}, "errors":[ {"shape":"InvalidParameterException"}, {"shape":"ThrottledException"}, {"shape":"InternalServiceException"}, {"shape":"PaginationTokenExpiredException"} ], "documentation":"

Returns all the tagged resources that are associated with the specified tags (keys and values) located in the specified region for the AWS account. The tags and the resource types that you specify in the request are known as filters. The response includes all tags that are associated with the requested resources. If no filter is provided, this action returns a paginated resource list with the associated tags.

" }, "GetTagKeys":{ "name":"GetTagKeys", "http":{ "method":"POST", "requestUri":"/" }, "input":{"shape":"GetTagKeysInput"}, "output":{"shape":"GetTagKeysOutput"}, "errors":[ {"shape":"InvalidParameterException"}, {"shape":"ThrottledException"}, {"shape":"InternalServiceException"}, {"shape":"PaginationTokenExpiredException"} ], "documentation":"

Returns all tag keys in the specified region for the AWS account.

" }, "GetTagValues":{ "name":"GetTagValues", "http":{ "method":"POST", "requestUri":"/" }, "input":{"shape":"GetTagValuesInput"}, "output":{"shape":"GetTagValuesOutput"}, "errors":[ {"shape":"InvalidParameterException"}, {"shape":"ThrottledException"}, {"shape":"InternalServiceException"}, {"shape":"PaginationTokenExpiredException"} ], "documentation":"

Returns all tag values for the specified key in the specified region for the AWS account.

" }, "TagResources":{ "name":"TagResources", "http":{ "method":"POST", "requestUri":"/" }, "input":{"shape":"TagResourcesInput"}, "output":{"shape":"TagResourcesOutput"}, "errors":[ {"shape":"InvalidParameterException"}, {"shape":"ThrottledException"}, {"shape":"InternalServiceException"} ], "documentation":"

Applies one or more tags to the specified resources. Note the following:

" }, "UntagResources":{ "name":"UntagResources", "http":{ "method":"POST", "requestUri":"/" }, "input":{"shape":"UntagResourcesInput"}, "output":{"shape":"UntagResourcesOutput"}, "errors":[ {"shape":"InvalidParameterException"}, {"shape":"ThrottledException"}, {"shape":"InternalServiceException"} ], "documentation":"

Removes the specified tags from the specified resources. When you specify a tag key, the action removes both that key and its associated value. The operation succeeds even if you attempt to remove tags from a resource that were already removed. Note the following:

" } }, "shapes":{ "AmazonResourceType":{ "type":"string", "max":256, "min":0 }, "ErrorCode":{ "type":"string", "enum":[ "InternalServiceException", "InvalidParameterException" ] }, "ErrorMessage":{"type":"string"}, "ExceptionMessage":{ "type":"string", "max":2048, "min":0 }, "FailedResourcesMap":{ "type":"map", "key":{"shape":"ResourceARN"}, "value":{"shape":"FailureInfo"} }, "FailureInfo":{ "type":"structure", "members":{ "StatusCode":{ "shape":"StatusCode", "documentation":"

The HTTP status code of the common error.

" }, "ErrorCode":{ "shape":"ErrorCode", "documentation":"

The code of the common error. Valid values include InternalServiceException, InvalidParameterException, and any valid error code returned by the AWS service that hosts the resource that you want to tag.

" }, "ErrorMessage":{ "shape":"ErrorMessage", "documentation":"

The message of the common error.

" } }, "documentation":"

Details of the common errors that all actions return.

" }, "GetResourcesInput":{ "type":"structure", "members":{ "PaginationToken":{ "shape":"PaginationToken", "documentation":"

A string that indicates that additional data is available. Leave this value empty for your initial request. If the response includes a PaginationToken, use that string for this value to request an additional page of data.

" }, "TagFilters":{ "shape":"TagFilterList", "documentation":"

A list of tags (keys and values). A request can include up to 50 keys, and each key can include up to 20 values.

If you specify multiple filters connected by an AND operator in a single request, the response returns only those resources that are associated with every specified filter.

If you specify multiple filters connected by an OR operator in a single request, the response returns all resources that are associated with at least one or possibly more of the specified filters.

" }, "ResourcesPerPage":{ "shape":"ResourcesPerPage", "documentation":"

A limit that restricts the number of resources returned by GetResources in paginated output. You can set ResourcesPerPage to a minimum of 1 item and the maximum of 50 items.

" }, "TagsPerPage":{ "shape":"TagsPerPage", "documentation":"

A limit that restricts the number of tags (key and value pairs) returned by GetResources in paginated output. A resource with no tags is counted as having one tag (one key and value pair).

GetResources does not split a resource and its associated tags across pages. If the specified TagsPerPage would cause such a break, a PaginationToken is returned in place of the affected resource and its tags. Use that token in another request to get the remaining data. For example, if you specify a TagsPerPage of 100 and the account has 22 resources with 10 tags each (meaning that each resource has 10 key and value pairs), the output will consist of 3 pages, with the first page displaying the first 10 resources, each with its 10 tags, the second page displaying the next 10 resources each with its 10 tags, and the third page displaying the remaining 2 resources, each with its 10 tags.

You can set TagsPerPage to a minimum of 100 items and the maximum of 500 items.

" }, "ResourceTypeFilters":{ "shape":"ResourceTypeFilterList", "documentation":"

The constraints on the resources that you want returned. The format of each resource type is service[:resourceType]. For example, specifying a resource type of ec2 returns all tagged Amazon EC2 resources (which includes tagged EC2 instances). Specifying a resource type of ec2:instance returns only EC2 instances.

The string for each service name and resource type is the same as that embedded in a resource's Amazon Resource Name (ARN). Consult the AWS General Reference for the following:

" } } }, "GetResourcesOutput":{ "type":"structure", "members":{ "PaginationToken":{ "shape":"PaginationToken", "documentation":"

A string that indicates that the response contains more data than can be returned in a single response. To receive additional data, specify this string for the PaginationToken value in a subsequent request.

" }, "ResourceTagMappingList":{ "shape":"ResourceTagMappingList", "documentation":"

A list of resource ARNs and the tags (keys and values) associated with each.

" } } }, "GetTagKeysInput":{ "type":"structure", "members":{ "PaginationToken":{ "shape":"PaginationToken", "documentation":"

A string that indicates that additional data is available. Leave this value empty for your initial request. If the response includes a PaginationToken, use that string for this value to request an additional page of data.

" } } }, "GetTagKeysOutput":{ "type":"structure", "members":{ "PaginationToken":{ "shape":"PaginationToken", "documentation":"

A string that indicates that the response contains more data than can be returned in a single response. To receive additional data, specify this string for the PaginationToken value in a subsequent request.

" }, "TagKeys":{ "shape":"TagKeyList", "documentation":"

A list of all tag keys in the AWS account.

" } } }, "GetTagValuesInput":{ "type":"structure", "required":["Key"], "members":{ "PaginationToken":{ "shape":"PaginationToken", "documentation":"

A string that indicates that additional data is available. Leave this value empty for your initial request. If the response includes a PaginationToken, use that string for this value to request an additional page of data.

" }, "Key":{ "shape":"TagKey", "documentation":"

The key for which you want to list all existing values in the specified region for the AWS account.

" } } }, "GetTagValuesOutput":{ "type":"structure", "members":{ "PaginationToken":{ "shape":"PaginationToken", "documentation":"

A string that indicates that the response contains more data than can be returned in a single response. To receive additional data, specify this string for the PaginationToken value in a subsequent request.

" }, "TagValues":{ "shape":"TagValuesOutputList", "documentation":"

A list of all tag values for the specified key in the AWS account.

" } } }, "InternalServiceException":{ "type":"structure", "members":{ "Message":{"shape":"ExceptionMessage"} }, "documentation":"

The request processing failed because of an unknown error, exception, or failure. You can retry the request.

", "exception":true, "fault":true }, "InvalidParameterException":{ "type":"structure", "members":{ "Message":{"shape":"ExceptionMessage"} }, "documentation":"

A parameter is missing or a malformed string or invalid or out-of-range value was supplied for the request parameter.

", "exception":true }, "PaginationToken":{ "type":"string", "max":2048, "min":0 }, "PaginationTokenExpiredException":{ "type":"structure", "members":{ "Message":{"shape":"ExceptionMessage"} }, "documentation":"

A PaginationToken is valid for a maximum of 15 minutes. Your request was denied because the specified PaginationToken has expired.

", "exception":true }, "ResourceARN":{ "type":"string", "max":1600, "min":1 }, "ResourceARNList":{ "type":"list", "member":{"shape":"ResourceARN"}, "max":20, "min":1 }, "ResourceTagMapping":{ "type":"structure", "members":{ "ResourceARN":{ "shape":"ResourceARN", "documentation":"

An array of resource ARN(s).

" }, "Tags":{ "shape":"TagList", "documentation":"

The tags that have been applied to one or more AWS resources.

" } }, "documentation":"

A list of resource ARNs and the tags (keys and values) that are associated with each.

" }, "ResourceTagMappingList":{ "type":"list", "member":{"shape":"ResourceTagMapping"} }, "ResourceTypeFilterList":{ "type":"list", "member":{"shape":"AmazonResourceType"} }, "ResourcesPerPage":{"type":"integer"}, "StatusCode":{"type":"integer"}, "Tag":{ "type":"structure", "required":[ "Key", "Value" ], "members":{ "Key":{ "shape":"TagKey", "documentation":"

One part of a key-value pair that make up a tag. A key is a general label that acts like a category for more specific tag values.

" }, "Value":{ "shape":"TagValue", "documentation":"

The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category (key).

" } }, "documentation":"

The metadata that you apply to AWS resources to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. For more information, see Tag Basics in the Amazon EC2 User Guide for Linux Instances.

" }, "TagFilter":{ "type":"structure", "members":{ "Key":{ "shape":"TagKey", "documentation":"

One part of a key-value pair that make up a tag. A key is a general label that acts like a category for more specific tag values.

" }, "Values":{ "shape":"TagValueList", "documentation":"

The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category (key).

" } }, "documentation":"

A list of tags (keys and values) that are used to specify the associated resources.

" }, "TagFilterList":{ "type":"list", "member":{"shape":"TagFilter"}, "max":50, "min":0 }, "TagKey":{ "type":"string", "max":128, "min":1 }, "TagKeyList":{ "type":"list", "member":{"shape":"TagKey"} }, "TagKeyListForUntag":{ "type":"list", "member":{"shape":"TagKey"}, "max":50, "min":1 }, "TagList":{ "type":"list", "member":{"shape":"Tag"} }, "TagMap":{ "type":"map", "key":{"shape":"TagKey"}, "value":{"shape":"TagValue"}, "max":50, "min":1 }, "TagResourcesInput":{ "type":"structure", "required":[ "ResourceARNList", "Tags" ], "members":{ "ResourceARNList":{ "shape":"ResourceARNList", "documentation":"

A list of ARNs. An ARN (Amazon Resource Name) uniquely identifies a resource. You can specify a minimum of 1 and a maximum of 20 ARNs (resources) to tag. An ARN can be set to a maximum of 1600 characters. For more information, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

" }, "Tags":{ "shape":"TagMap", "documentation":"

The tags that you want to add to the specified resources. A tag consists of a key and a value that you define.

" } } }, "TagResourcesOutput":{ "type":"structure", "members":{ "FailedResourcesMap":{ "shape":"FailedResourcesMap", "documentation":"

Details of resources that could not be tagged. An error code, status code, and error message are returned for each failed item.

" } } }, "TagValue":{ "type":"string", "max":256, "min":0 }, "TagValueList":{ "type":"list", "member":{"shape":"TagValue"}, "max":20, "min":0 }, "TagValuesOutputList":{ "type":"list", "member":{"shape":"TagValue"} }, "TagsPerPage":{"type":"integer"}, "ThrottledException":{ "type":"structure", "members":{ "Message":{"shape":"ExceptionMessage"} }, "documentation":"

The request was denied to limit the frequency of submitted requests.

", "exception":true }, "UntagResourcesInput":{ "type":"structure", "required":[ "ResourceARNList", "TagKeys" ], "members":{ "ResourceARNList":{ "shape":"ResourceARNList", "documentation":"

A list of ARNs. An ARN (Amazon Resource Name) uniquely identifies a resource. You can specify a minimum of 1 and a maximum of 20 ARNs (resources) to untag. An ARN can be set to a maximum of 1600 characters. For more information, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

" }, "TagKeys":{ "shape":"TagKeyListForUntag", "documentation":"

A list of the tag keys that you want to remove from the specified resources.

" } } }, "UntagResourcesOutput":{ "type":"structure", "members":{ "FailedResourcesMap":{ "shape":"FailedResourcesMap", "documentation":"

Details of resources that could not be untagged. An error code, status code, and error message are returned for each failed item.

" } } } }, "documentation":"Resource Groups Tagging API

This guide describes the API operations for the resource groups tagging.

A tag is a label that you assign to an AWS resource. A tag consists of a key and a value, both of which you define. For example, if you have two Amazon EC2 instances, you might assign both a tag key of \"Stack.\" But the value of \"Stack\" might be \"Testing\" for one and \"Production\" for the other.

Tagging can help you organize your resources and enables you to simplify resource management, access management and cost allocation. For more information about tagging, see Working with Tag Editor and Working with Resource Groups. For more information about permissions you need to use the resource groups tagging APIs, see Obtaining Permissions for Resource Groups and Obtaining Permissions for Tagging .

You can use the resource groups tagging APIs to complete the following tasks:

Not all resources can have tags. For a lists of resources that you can tag, see Supported Resources in the AWS Resource Groups and Tag Editor User Guide.

To make full use of the resource groups tagging APIs, you might need additional IAM permissions, including permission to access the resources of individual services as well as permission to view and apply tags to those resources. For more information, see Obtaining Permissions for Tagging in the AWS Resource Groups and Tag Editor User Guide.

" }