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 GetAttributeValues operation. Returns a list of attribute values. Attributes are similar to the details in a Price List API offer file. For a list of available attributes, see Offer File Definitions in the Billing and Cost Management User Guide.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.Pricing.AmazonPricingRequest
      Amazon.Pricing.Model.GetAttributeValuesRequest

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

Syntax

C#
public class GetAttributeValuesRequest : AmazonPricingRequest
         IAmazonWebServiceRequest

The GetAttributeValuesRequest type exposes the following members

Constructors

NameDescription
Public Method GetAttributeValuesRequest()

Properties

NameTypeDescription
Public Property AttributeName System.String

Gets and sets the property AttributeName.

The name of the attribute that you want to retrieve the values for, such as volumeType.

Public Property MaxResults System.Int32

Gets and sets the property MaxResults.

The maximum number of results to return in response.

Public Property NextToken System.String

Gets and sets the property NextToken.

The pagination token that indicates the next set of results that you want to retrieve.

Public Property ServiceCode System.String

Gets and sets the property ServiceCode.

The service code for the service whose attributes you want to retrieve. For example, if you want the retrieve an EC2 attribute, use AmazonEC2.

Examples

This operation returns a list of values available for the given attribute.

To retrieve a list of attribute values


var client = new AmazonPricingClient();
var response = client.GetAttributeValues(new GetAttributeValuesRequest 
{
    AttributeName = "volumeType",
    MaxResults = 2,
    ServiceCode = "AmazonEC2"
});

List<AttributeValue> attributeValues = response.AttributeValues;
string nextToken = response.NextToken;

            

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