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.

Container for the parameters to the ListTagsForResource operation. Lists the tags that have been added to the specified resource. This operation is supported in storage gateways of all types.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.StorageGateway.AmazonStorageGatewayRequest
      Amazon.StorageGateway.Model.ListTagsForResourceRequest

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

Syntax

C#
public class ListTagsForResourceRequest : AmazonStorageGatewayRequest
         IAmazonWebServiceRequest

The ListTagsForResourceRequest type exposes the following members

Constructors

Properties

NameTypeDescription
Public Property Limit System.Int32

Gets and sets the property Limit.

Specifies that the list of tags returned be limited to the specified number of items.

Public Property Marker System.String

Gets and sets the property Marker.

An opaque string that indicates the position at which to begin returning the list of tags.

Public Property ResourceARN System.String

Gets and sets the property ResourceARN.

The Amazon Resource Name (ARN) of the resource for which you want to list tags.

Examples

Lists the tags that have been added to the specified resource.

To list tags that have been added to a resource


var client = new AmazonStorageGatewayClient();
var response = client.ListTagsForResource(new ListTagsForResourceRequest 
{
    Limit = 1,
    Marker = "1",
    ResourceARN = "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-11A2222B"
});

string marker = response.Marker;
string resourceARN = response.ResourceARN;
List<Tag> tags = response.Tags;

            

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

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