AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Interface for accessing ResourceGroupsTaggingAPI 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.

Inheritance Hierarchy

Amazon.ResourceGroupsTaggingAPI.IAmazonResourceGroupsTaggingAPI

Namespace: Amazon.ResourceGroupsTaggingAPI
Assembly: AWSSDK.ResourceGroupsTaggingAPI.dll
Version: 3.x.y.z

Syntax

C#
public interface IAmazonResourceGroupsTaggingAPI
         IAmazonService, IDisposable

The IAmazonResourceGroupsTaggingAPI type exposes the following members

Methods

Note:

Asynchronous operations (methods ending with Async) in the table below are for .NET 4.5 or higher. For .NET 3.5 the SDK follows the standard naming convention of BeginMethodName and EndMethodName to indicate asynchronous operations - these method pairs are not shown in the table below.

NameDescription
Public Method GetResources(GetResourcesRequest)

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.

Public Method GetResourcesAsync(GetResourcesRequest, CancellationToken)

Initiates the asynchronous execution of the GetResources operation.

Public Method GetTagKeys(GetTagKeysRequest)

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

Public Method GetTagKeysAsync(GetTagKeysRequest, CancellationToken)

Initiates the asynchronous execution of the GetTagKeys operation.

Public Method GetTagValues(GetTagValuesRequest)

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

Public Method GetTagValuesAsync(GetTagValuesRequest, CancellationToken)

Initiates the asynchronous execution of the GetTagValues operation.

Public Method TagResources(TagResourcesRequest)

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

  • Not all resources can have tags. For a list of resources that support tagging, see Supported Resources in the AWS Resource Groups and Tag Editor User Guide.

  • Each resource can have up to 50 tags. For other limits, see Tag Restrictions in the Amazon EC2 User Guide for Linux Instances.

  • You can only tag resources that are located in the specified region for the AWS account.

  • To add tags to a resource, you need the necessary permissions for the service that the resource belongs to as well as permissions for adding tags. For more information, see Obtaining Permissions for Tagging in the AWS Resource Groups and Tag Editor User Guide.

Public Method TagResourcesAsync(TagResourcesRequest, CancellationToken)

Initiates the asynchronous execution of the TagResources operation.

Public Method UntagResources(UntagResourcesRequest)

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:

  • To remove tags from a resource, you need the necessary permissions for the service that the resource belongs to as well as permissions for removing tags. For more information, see Obtaining Permissions for Tagging in the AWS Resource Groups and Tag Editor User Guide.

  • You can only tag resources that are located in the specified region for the AWS account.

Public Method UntagResourcesAsync(UntagResourcesRequest, CancellationToken)

Initiates the asynchronous execution of the UntagResources operation.

Version Information

.NET Standard:
Supported in: 1.3

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms