There are more AWS SDK examples available in the AWS Doc SDK Examples
Use ListPrices
with an AWS SDK
The following code examples show how to use ListPrices
.
Action examples are code excerpts from larger programs and must be run in context. You can see this action in context in the following code example:
- AWS SDK for .NET
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. /// <summary> /// List prices for domain type operations. /// </summary> /// <param name="domainTypes">Domain types to include in the results.</param> /// <returns>The list of domain prices.</returns> public async Task<List<DomainPrice>> ListPrices(List<string> domainTypes) { var results = new List<DomainPrice>(); var paginatePrices = _amazonRoute53Domains.Paginators.ListPrices(new ListPricesRequest()); // Get the entire list using the paginator. await foreach (var prices in paginatePrices.Prices) { results.Add(prices); } return results.Where(p => domainTypes.Contains(p.Name)).ToList(); }
-
For API details, see ListPrices in AWS SDK for .NET API Reference.
-